From 1f9050db3e03a588cacab6059f1ac5ac4ba3986c Mon Sep 17 00:00:00 2001 From: cbridgha Date: Mon, 14 Feb 2005 20:36:05 +0000 Subject: j2ee core impl and util packages made internal --- .../internal/impl/ArchiveCopyUtility.java | 2 +- .../internal/impl/CommonarchivePackageImpl.java | 16 +- .../internal/impl/EARFileImpl.java | 10 +- .../looseconfig/impl/LooseconfigPackageImpl.java | 16 +- .../internal/strategy/LoadStrategyImpl.java | 6 +- .../internal/validation/CMPBeanClassVRule.java | 2 +- .../model/internal/validation/EarValidator.java | 4 +- .../model/internal/validation/J2EEValidator.java | 4 +- .../internal/validation/ValidationRuleUtility.java | 2 +- .../model/internal/validation/WarValidator.java | 6 +- .../jst/j2ee/application/ApplicationFactory.java | 2 +- .../jst/j2ee/application/ApplicationPackage.java | 2 +- .../application/impl/ApplicationFactoryImpl.java | 121 -- .../jst/j2ee/application/impl/ApplicationImpl.java | 434 ---- .../application/impl/ApplicationPackageImpl.java | 364 ---- .../impl/ApplicationResourceFactory.java | 70 - .../application/impl/ApplicationResourceImpl.java | 147 -- .../j2ee/application/impl/ConnectorModuleImpl.java | 176 -- .../jst/j2ee/application/impl/EjbModuleImpl.java | 177 -- .../application/impl/JavaClientModuleImpl.java | 177 -- .../jst/j2ee/application/impl/ModuleImpl.java | 307 --- .../jst/j2ee/application/impl/WebModuleImpl.java | 233 --- .../util/ApplicationAdapterFactory.java | 248 --- .../j2ee/application/util/ApplicationSwitch.java | 254 --- .../org/eclipse/jst/j2ee/client/ClientFactory.java | 2 +- .../org/eclipse/jst/j2ee/client/ClientPackage.java | 2 +- .../j2ee/client/impl/ApplicationClientImpl.java | 606 ------ .../impl/ApplicationClientResourceFactory.java | 71 - .../client/impl/ApplicationClientResourceImpl.java | 154 -- .../jst/j2ee/client/impl/ClientFactoryImpl.java | 101 - .../jst/j2ee/client/impl/ClientPackageImpl.java | 321 --- .../jst/j2ee/client/util/ClientAdapterFactory.java | 158 -- .../eclipse/jst/j2ee/client/util/ClientSwitch.java | 140 -- .../org/eclipse/jst/j2ee/common/CommonFactory.java | 2 +- .../org/eclipse/jst/j2ee/common/CommonPackage.java | 2 +- .../jst/j2ee/common/J2EEXMIResourceFactory.java | 2 +- .../jst/j2ee/common/impl/CommonFactoryImpl.java | 369 ---- .../jst/j2ee/common/impl/CommonPackageImpl.java | 1502 -------------- .../impl/CompatibilityDescriptionGroupImpl.java | 601 ------ .../j2ee/common/impl/DescriptionGroupAdapter.java | 119 -- .../jst/j2ee/common/impl/DescriptionGroupImpl.java | 221 -- .../jst/j2ee/common/impl/DescriptionImpl.java | 218 -- .../jst/j2ee/common/impl/DisplayNameImpl.java | 218 -- .../jst/j2ee/common/impl/EJBLocalRefImpl.java | 333 ---- .../eclipse/jst/j2ee/common/impl/EjbRefImpl.java | 514 ----- .../eclipse/jst/j2ee/common/impl/EnvEntryImpl.java | 371 ---- .../eclipse/jst/j2ee/common/impl/IconTypeImpl.java | 272 --- .../eclipse/jst/j2ee/common/impl/IdentityImpl.java | 248 --- .../common/impl/J2EEResouceFactorySaxRegistry.java | 53 - .../impl/J2EEResourceFactoryDomRegistry.java | 61 - .../common/impl/J2EEResourceFactoryRegistry.java | 30 - .../jst/j2ee/common/impl/JNDIEnvRefsGroupImpl.java | 454 ----- .../eclipse/jst/j2ee/common/impl/ListenerImpl.java | 267 --- .../j2ee/common/impl/MessageDestinationImpl.java | 262 --- .../common/impl/MessageDestinationRefImpl.java | 412 ---- .../jst/j2ee/common/impl/ParamValueImpl.java | 331 --- .../eclipse/jst/j2ee/common/impl/QNameImpl.java | 416 ---- .../jst/j2ee/common/impl/ResourceEnvRefImpl.java | 323 --- .../jst/j2ee/common/impl/ResourceRefImpl.java | 508 ----- .../common/impl/RunAsSpecifiedIdentityImpl.java | 193 -- .../jst/j2ee/common/impl/SecurityIdentityImpl.java | 214 -- .../jst/j2ee/common/impl/SecurityRoleImpl.java | 289 --- .../jst/j2ee/common/impl/SecurityRoleRefImpl.java | 288 --- .../j2ee/common/impl/UseCallerIdentityImpl.java | 137 -- .../jst/j2ee/common/impl/XMLResourceFactory.java | 53 - .../jst/j2ee/common/impl/XMLResourceImpl.java | 261 --- .../jst/j2ee/common/util/CommonAdapterFactory.java | 464 ----- .../eclipse/jst/j2ee/common/util/CommonSwitch.java | 571 ------ .../eclipse/jst/j2ee/common/util/CommonUtil.java | 82 - .../eclipse/jst/j2ee/common/util/Defaultable.java | 21 - .../jst/j2ee/common/util/DefaultedAdapterImpl.java | 64 - .../eclipse/jst/j2ee/common/util/Defaultor.java | 29 - .../eclipse/jst/j2ee/common/util/IDUtility.java | 77 - .../j2ee/common/util/XmlSpecifiedDataAdapter.java | 31 - .../org/eclipse/jst/j2ee/ejb/EjbFactory.java | 2 +- .../jst/j2ee/ejb/EjbMethodElementHelper.java | 2 +- .../org/eclipse/jst/j2ee/ejb/EjbPackage.java | 2 +- .../AbstractRelationshipRoleAttributeFilter.java | 99 - .../AbstractRequiredRelationshipRoleFilter.java | 115 -- .../jst/j2ee/ejb/impl/ActivationConfigImpl.java | 191 -- .../ejb/impl/ActivationConfigPropertyImpl.java | 218 -- .../jst/j2ee/ejb/impl/AssemblyDescriptorImpl.java | 483 ----- .../jst/j2ee/ejb/impl/CMPAttributeImpl.java | 605 ------ .../eclipse/jst/j2ee/ejb/impl/CMRFieldImpl.java | 470 ----- .../ejb/impl/ContainerManagedEntityFilter.java | 101 - .../j2ee/ejb/impl/ContainerManagedEntityImpl.java | 1142 ----------- .../ejb/impl/EJB20FlattenedRoleShapeStrategy.java | 157 -- .../org/eclipse/jst/j2ee/ejb/impl/EJBJarImpl.java | 817 -------- .../jst/j2ee/ejb/impl/EJBJarResourceFactory.java | 71 - .../jst/j2ee/ejb/impl/EJBMethodCategoryImpl.java | 41 - .../eclipse/jst/j2ee/ejb/impl/EJBRelationImpl.java | 449 ----- .../jst/j2ee/ejb/impl/EJBRelationshipRoleImpl.java | 1012 ---------- .../eclipse/jst/j2ee/ejb/impl/EJBResourceImpl.java | 211 -- .../eclipse/jst/j2ee/ejb/impl/EjbFactoryImpl.java | 503 ----- .../eclipse/jst/j2ee/ejb/impl/EjbPackageImpl.java | 1772 ---------------- .../jst/j2ee/ejb/impl/EnterpriseBeanImpl.java | 1447 -------------- .../org/eclipse/jst/j2ee/ejb/impl/EntityImpl.java | 643 ------ .../eclipse/jst/j2ee/ejb/impl/ExcludeListImpl.java | 245 --- .../impl/KeyRelationshipRoleAttributeFilter.java | 93 - .../j2ee/ejb/impl/KeyRelationshipRoleFilter.java | 56 - .../jst/j2ee/ejb/impl/LocalKeyAttributeFilter.java | 102 - .../LocalModelledPersistentAttributeFilter.java | 59 - .../impl/LocalOppositeRelationshipRoleFilter.java | 57 - .../ejb/impl/LocalPersistentAttributeFilter.java | 103 - .../impl/LocalRelationshipRoleAttributeFilter.java | 92 - .../LocalRelationshipRoleKeyAttributeFilter.java | 52 - .../ejb/impl/MessageDrivenDestinationImpl.java | 359 ---- .../jst/j2ee/ejb/impl/MessageDrivenImpl.java | 982 --------- .../jst/j2ee/ejb/impl/MethodElementImpl.java | 1039 ---------- .../jst/j2ee/ejb/impl/MethodPermissionImpl.java | 465 ----- .../jst/j2ee/ejb/impl/MethodTransactionImpl.java | 432 ---- .../j2ee/ejb/impl/ModelledKeyAttributeFilter.java | 105 - .../impl/ModelledPersistentAttributeFilter.java | 105 - .../j2ee/ejb/impl/NonKeyRequiredRoleFilter.java | 61 - .../org/eclipse/jst/j2ee/ejb/impl/QueryImpl.java | 513 ----- .../eclipse/jst/j2ee/ejb/impl/QueryMethodImpl.java | 373 ---- .../ejb/impl/RelationshipRoleAttributeFilter.java | 92 - .../jst/j2ee/ejb/impl/RelationshipsImpl.java | 313 --- .../impl/RequiredLocalRelationshipRoleFilter.java | 91 - .../ejb/impl/RequiredRelationshipRoleFilter.java | 60 - .../jst/j2ee/ejb/impl/RoleShapeStrategy.java | 171 -- .../eclipse/jst/j2ee/ejb/impl/RoleSourceImpl.java | 330 --- .../org/eclipse/jst/j2ee/ejb/impl/SessionImpl.java | 670 ------- .../j2ee/ejb/impl/SupertypeCMPAttributeFilter.java | 117 -- .../jst/j2ee/ejb/util/CMPFieldDescriptor.java | 66 - .../org/eclipse/jst/j2ee/ejb/util/CMPHelper.java | 263 --- .../ejb/util/CMPKeySynchronizationAdapter.java | 398 ---- ...monRelationshipAttributeMaintenanceAdapter.java | 173 -- .../jst/j2ee/ejb/util/ConvertedEJBAdapter.java | 68 - .../util/EJBAttributeMaintenanceFactoryImpl.java | 47 - .../EJBRelationAttributeMaintenanceAdapter.java | 46 - .../jst/j2ee/ejb/util/EjbAdapterFactory.java | 607 ------ .../org/eclipse/jst/j2ee/ejb/util/EjbSwitch.java | 743 ------- .../jst/j2ee/ejb/util/MethodElementHelper.java | 61 - .../RelationshipsAttributeMaintenanceAdapter.java | 57 - .../org/eclipse/jst/j2ee/internal/J2EEInit.java | 18 +- .../application/impl/ApplicationFactoryImpl.java | 121 ++ .../internal/application/impl/ApplicationImpl.java | 434 ++++ .../application/impl/ApplicationPackageImpl.java | 364 ++++ .../impl/ApplicationResourceFactory.java | 70 + .../application/impl/ApplicationResourceImpl.java | 147 ++ .../application/impl/ConnectorModuleImpl.java | 176 ++ .../internal/application/impl/EjbModuleImpl.java | 177 ++ .../application/impl/JavaClientModuleImpl.java | 177 ++ .../j2ee/internal/application/impl/ModuleImpl.java | 307 +++ .../internal/application/impl/WebModuleImpl.java | 233 +++ .../util/ApplicationAdapterFactory.java | 248 +++ .../application/util/ApplicationSwitch.java | 254 +++ .../client/impl/ApplicationClientImpl.java | 606 ++++++ .../impl/ApplicationClientResourceFactory.java | 71 + .../client/impl/ApplicationClientResourceImpl.java | 154 ++ .../internal/client/impl/ClientFactoryImpl.java | 101 + .../internal/client/impl/ClientPackageImpl.java | 321 +++ .../internal/client/util/ClientAdapterFactory.java | 158 ++ .../j2ee/internal/client/util/ClientSwitch.java | 140 ++ .../internal/common/impl/CommonFactoryImpl.java | 369 ++++ .../internal/common/impl/CommonPackageImpl.java | 1502 ++++++++++++++ .../impl/CompatibilityDescriptionGroupImpl.java | 601 ++++++ .../common/impl/DescriptionGroupAdapter.java | 119 ++ .../internal/common/impl/DescriptionGroupImpl.java | 221 ++ .../j2ee/internal/common/impl/DescriptionImpl.java | 218 ++ .../j2ee/internal/common/impl/DisplayNameImpl.java | 218 ++ .../j2ee/internal/common/impl/EJBLocalRefImpl.java | 333 ++++ .../jst/j2ee/internal/common/impl/EjbRefImpl.java | 514 +++++ .../j2ee/internal/common/impl/EnvEntryImpl.java | 371 ++++ .../j2ee/internal/common/impl/IconTypeImpl.java | 272 +++ .../j2ee/internal/common/impl/IdentityImpl.java | 248 +++ .../common/impl/J2EEResouceFactorySaxRegistry.java | 53 + .../impl/J2EEResourceFactoryDomRegistry.java | 61 + .../common/impl/J2EEResourceFactoryRegistry.java | 30 + .../internal/common/impl/JNDIEnvRefsGroupImpl.java | 454 +++++ .../j2ee/internal/common/impl/ListenerImpl.java | 267 +++ .../common/impl/MessageDestinationImpl.java | 262 +++ .../common/impl/MessageDestinationRefImpl.java | 412 ++++ .../j2ee/internal/common/impl/ParamValueImpl.java | 331 +++ .../jst/j2ee/internal/common/impl/QNameImpl.java | 416 ++++ .../internal/common/impl/ResourceEnvRefImpl.java | 323 +++ .../j2ee/internal/common/impl/ResourceRefImpl.java | 508 +++++ .../common/impl/RunAsSpecifiedIdentityImpl.java | 193 ++ .../internal/common/impl/SecurityIdentityImpl.java | 214 ++ .../internal/common/impl/SecurityRoleImpl.java | 289 +++ .../internal/common/impl/SecurityRoleRefImpl.java | 288 +++ .../common/impl/UseCallerIdentityImpl.java | 137 ++ .../internal/common/impl/XMLResourceFactory.java | 53 + .../j2ee/internal/common/impl/XMLResourceImpl.java | 261 +++ .../internal/common/util/CommonAdapterFactory.java | 464 +++++ .../j2ee/internal/common/util/CommonSwitch.java | 571 ++++++ .../jst/j2ee/internal/common/util/CommonUtil.java | 82 + .../jst/j2ee/internal/common/util/Defaultable.java | 21 + .../internal/common/util/DefaultedAdapterImpl.java | 64 + .../jst/j2ee/internal/common/util/Defaultor.java | 29 + .../jst/j2ee/internal/common/util/IDUtility.java | 77 + .../common/util/XmlSpecifiedDataAdapter.java | 31 + .../AbstractRelationshipRoleAttributeFilter.java | 99 + .../AbstractRequiredRelationshipRoleFilter.java | 115 ++ .../internal/ejb/impl/ActivationConfigImpl.java | 191 ++ .../ejb/impl/ActivationConfigPropertyImpl.java | 218 ++ .../internal/ejb/impl/AssemblyDescriptorImpl.java | 483 +++++ .../j2ee/internal/ejb/impl/CMPAttributeImpl.java | 605 ++++++ .../jst/j2ee/internal/ejb/impl/CMRFieldImpl.java | 470 +++++ .../ejb/impl/ContainerManagedEntityFilter.java | 101 + .../ejb/impl/ContainerManagedEntityImpl.java | 1142 +++++++++++ .../ejb/impl/EJB20FlattenedRoleShapeStrategy.java | 157 ++ .../jst/j2ee/internal/ejb/impl/EJBJarImpl.java | 817 ++++++++ .../internal/ejb/impl/EJBJarResourceFactory.java | 71 + .../internal/ejb/impl/EJBMethodCategoryImpl.java | 41 + .../j2ee/internal/ejb/impl/EJBRelationImpl.java | 449 +++++ .../internal/ejb/impl/EJBRelationshipRoleImpl.java | 1012 ++++++++++ .../j2ee/internal/ejb/impl/EJBResourceImpl.java | 211 ++ .../jst/j2ee/internal/ejb/impl/EjbFactoryImpl.java | 503 +++++ .../jst/j2ee/internal/ejb/impl/EjbPackageImpl.java | 1772 ++++++++++++++++ .../j2ee/internal/ejb/impl/EnterpriseBeanImpl.java | 1447 ++++++++++++++ .../jst/j2ee/internal/ejb/impl/EntityImpl.java | 643 ++++++ .../j2ee/internal/ejb/impl/ExcludeListImpl.java | 245 +++ .../impl/KeyRelationshipRoleAttributeFilter.java | 93 + .../ejb/impl/KeyRelationshipRoleFilter.java | 56 + .../internal/ejb/impl/LocalKeyAttributeFilter.java | 102 + .../LocalModelledPersistentAttributeFilter.java | 59 + .../impl/LocalOppositeRelationshipRoleFilter.java | 57 + .../ejb/impl/LocalPersistentAttributeFilter.java | 103 + .../impl/LocalRelationshipRoleAttributeFilter.java | 92 + .../LocalRelationshipRoleKeyAttributeFilter.java | 52 + .../ejb/impl/MessageDrivenDestinationImpl.java | 359 ++++ .../j2ee/internal/ejb/impl/MessageDrivenImpl.java | 982 +++++++++ .../j2ee/internal/ejb/impl/MethodElementImpl.java | 1039 ++++++++++ .../internal/ejb/impl/MethodPermissionImpl.java | 465 +++++ .../internal/ejb/impl/MethodTransactionImpl.java | 432 ++++ .../ejb/impl/ModelledKeyAttributeFilter.java | 105 + .../impl/ModelledPersistentAttributeFilter.java | 105 + .../ejb/impl/NonKeyRequiredRoleFilter.java | 61 + .../jst/j2ee/internal/ejb/impl/QueryImpl.java | 513 +++++ .../j2ee/internal/ejb/impl/QueryMethodImpl.java | 373 ++++ .../ejb/impl/RelationshipRoleAttributeFilter.java | 92 + .../j2ee/internal/ejb/impl/RelationshipsImpl.java | 313 +++ .../impl/RequiredLocalRelationshipRoleFilter.java | 91 + .../ejb/impl/RequiredRelationshipRoleFilter.java | 60 + .../j2ee/internal/ejb/impl/RoleShapeStrategy.java | 171 ++ .../jst/j2ee/internal/ejb/impl/RoleSourceImpl.java | 330 +++ .../jst/j2ee/internal/ejb/impl/SessionImpl.java | 670 +++++++ .../ejb/impl/SupertypeCMPAttributeFilter.java | 117 ++ .../j2ee/internal/ejb/util/CMPFieldDescriptor.java | 66 + .../jst/j2ee/internal/ejb/util/CMPHelper.java | 263 +++ .../ejb/util/CMPKeySynchronizationAdapter.java | 398 ++++ ...monRelationshipAttributeMaintenanceAdapter.java | 173 ++ .../internal/ejb/util/ConvertedEJBAdapter.java | 68 + .../util/EJBAttributeMaintenanceFactoryImpl.java | 47 + .../EJBRelationAttributeMaintenanceAdapter.java | 46 + .../j2ee/internal/ejb/util/EjbAdapterFactory.java | 607 ++++++ .../jst/j2ee/internal/ejb/util/EjbSwitch.java | 743 +++++++ .../internal/ejb/util/MethodElementHelper.java | 61 + .../RelationshipsAttributeMaintenanceAdapter.java | 57 + .../j2ee/internal/jca/impl/ActivationSpecImpl.java | 223 +++ .../j2ee/internal/jca/impl/AdminObjectImpl.java | 277 +++ .../jca/impl/AuthenticationMechanismImpl.java | 866 ++++++++ .../j2ee/internal/jca/impl/ConfigPropertyImpl.java | 357 ++++ .../jca/impl/ConnectionDefinitionImpl.java | 439 ++++ .../jst/j2ee/internal/jca/impl/ConnectorImpl.java | 508 +++++ .../jca/impl/ConnectorResourceFactory.java | 67 + .../internal/jca/impl/ConnectorResourceImpl.java | 180 ++ .../jca/impl/InboundResourceAdapterImpl.java | 181 ++ .../jst/j2ee/internal/jca/impl/JcaFactoryImpl.java | 422 ++++ .../jst/j2ee/internal/jca/impl/JcaPackageImpl.java | 2107 ++++++++++++++++++++ .../jst/j2ee/internal/jca/impl/LicenseImpl.java | 275 +++ .../j2ee/internal/jca/impl/MessageAdapterImpl.java | 154 ++ .../internal/jca/impl/MessageListenerImpl.java | 248 +++ .../jca/impl/OutboundResourceAdapterImpl.java | 383 ++++ .../jca/impl/RequiredConfigPropertyTypeImpl.java | 223 +++ .../internal/jca/impl/ResourceAdapterImpl.java | 817 ++++++++ .../internal/jca/impl/SecurityPermissionImpl.java | 246 +++ .../internal/jca/util/JCADescriptionHelper.java | 157 ++ .../j2ee/internal/jca/util/JcaAdapterFactory.java | 392 ++++ .../jst/j2ee/internal/jca/util/JcaSwitch.java | 427 ++++ .../jst/j2ee/internal/jsp/impl/JSPConfigImpl.java | 191 ++ .../internal/jsp/impl/JSPPropertyGroupImpl.java | 637 ++++++ .../jst/j2ee/internal/jsp/impl/JspFactoryImpl.java | 102 + .../jst/j2ee/internal/jsp/impl/JspPackageImpl.java | 398 ++++ .../j2ee/internal/jsp/impl/TagLibRefTypeImpl.java | 218 ++ .../j2ee/internal/jsp/util/JspAdapterFactory.java | 196 ++ .../jst/j2ee/internal/jsp/util/JspSwitch.java | 184 ++ .../Connector14SpecificationMigrator.java | 135 ++ .../migration/J2EEMigrationMultiStatus.java | 114 ++ .../internal/migration/J2EEMigrationStatus.java | 232 +++ .../J2EESpecificationMigrationConstants.java | 39 + .../migration/J2EESpecificationMigrator.java | 484 +++++ .../internal/migration/SpecificationMigrator.java | 209 ++ .../migration/War14SpecificationMigrator.java | 202 ++ .../internal/taglib/impl/ExtensibleTypeImpl.java | 164 ++ .../j2ee/internal/taglib/impl/FunctionImpl.java | 431 ++++ .../internal/taglib/impl/JSPTagAttributeImpl.java | 473 +++++ .../jst/j2ee/internal/taglib/impl/JSPTagImpl.java | 599 ++++++ .../j2ee/internal/taglib/impl/JSPVariableImpl.java | 397 ++++ .../jst/j2ee/internal/taglib/impl/TagFileImpl.java | 370 ++++ .../jst/j2ee/internal/taglib/impl/TagLibImpl.java | 594 ++++++ .../internal/taglib/impl/TaglibFactoryImpl.java | 183 ++ .../internal/taglib/impl/TaglibPackageImpl.java | 851 ++++++++ .../internal/taglib/impl/TldExtensionImpl.java | 223 +++ .../j2ee/internal/taglib/impl/ValidatorImpl.java | 245 +++ .../internal/taglib/util/TaglibAdapterFactory.java | 303 +++ .../j2ee/internal/taglib/util/TaglibSwitch.java | 318 +++ .../webapplication/impl/AuthConstraintImpl.java | 318 +++ .../webapplication/impl/ContextParamImpl.java | 332 +++ .../impl/ErrorCodeErrorPageImpl.java | 233 +++ .../webapplication/impl/ErrorPageImpl.java | 258 +++ .../impl/ExceptionTypeErrorPageImpl.java | 248 +++ .../internal/webapplication/impl/FilterImpl.java | 387 ++++ .../webapplication/impl/FilterMappingImpl.java | 341 ++++ .../webapplication/impl/FormLoginConfigImpl.java | 291 +++ .../webapplication/impl/HTTPMethodTypeImpl.java | 164 ++ .../webapplication/impl/InitParamImpl.java | 237 +++ .../internal/webapplication/impl/JSPTypeImpl.java | 153 ++ .../impl/LocalEncodingMappingImpl.java | 218 ++ .../impl/LocalEncodingMappingListImpl.java | 154 ++ .../webapplication/impl/LoginConfigImpl.java | 445 +++++ .../webapplication/impl/MimeMappingImpl.java | 290 +++ .../webapplication/impl/RoleNameTypeImpl.java | 147 ++ .../impl/SecurityConstraintImpl.java | 449 +++++ .../internal/webapplication/impl/ServletImpl.java | 699 +++++++ .../webapplication/impl/ServletMappingImpl.java | 349 ++++ .../webapplication/impl/ServletTypeImpl.java | 150 ++ .../webapplication/impl/SessionConfigImpl.java | 281 +++ .../webapplication/impl/TagLibRefImpl.java | 296 +++ .../webapplication/impl/URLPatternTypeImpl.java | 243 +++ .../impl/UserDataConstraintImpl.java | 376 ++++ .../internal/webapplication/impl/WebAppImpl.java | 1399 +++++++++++++ .../webapplication/impl/WebAppResourceFactory.java | 91 + .../webapplication/impl/WebAppResourceImpl.java | 201 ++ .../impl/WebResourceCollectionImpl.java | 499 +++++ .../internal/webapplication/impl/WebTypeImpl.java | 61 + .../impl/WebapplicationFactoryImpl.java | 402 ++++ .../impl/WebapplicationPackageImpl.java | 1833 +++++++++++++++++ .../webapplication/impl/WelcomeFileImpl.java | 245 +++ .../webapplication/impl/WelcomeFileListImpl.java | 234 +++ .../util/WebapplicationAdapterFactory.java | 700 +++++++ .../webapplication/util/WebapplicationSwitch.java | 776 +++++++ .../webservice/util/DescriptionGroupHelper.java | 1577 +++++++++++++++ .../webservice/util/DescriptionGroupItem.java | 77 + .../j2ee/internal/webservice/util/QNameHelper.java | 130 ++ .../org/eclipse/jst/j2ee/jca/JcaFactory.java | 2 +- .../org/eclipse/jst/j2ee/jca/JcaPackage.java | 2 +- .../jst/j2ee/jca/impl/ActivationSpecImpl.java | 223 --- .../eclipse/jst/j2ee/jca/impl/AdminObjectImpl.java | 277 --- .../j2ee/jca/impl/AuthenticationMechanismImpl.java | 866 -------- .../jst/j2ee/jca/impl/ConfigPropertyImpl.java | 357 ---- .../j2ee/jca/impl/ConnectionDefinitionImpl.java | 439 ---- .../eclipse/jst/j2ee/jca/impl/ConnectorImpl.java | 508 ----- .../j2ee/jca/impl/ConnectorResourceFactory.java | 67 - .../jst/j2ee/jca/impl/ConnectorResourceImpl.java | 180 -- .../j2ee/jca/impl/InboundResourceAdapterImpl.java | 181 -- .../eclipse/jst/j2ee/jca/impl/JcaFactoryImpl.java | 422 ---- .../eclipse/jst/j2ee/jca/impl/JcaPackageImpl.java | 2107 -------------------- .../org/eclipse/jst/j2ee/jca/impl/LicenseImpl.java | 275 --- .../jst/j2ee/jca/impl/MessageAdapterImpl.java | 154 -- .../jst/j2ee/jca/impl/MessageListenerImpl.java | 248 --- .../j2ee/jca/impl/OutboundResourceAdapterImpl.java | 383 ---- .../jca/impl/RequiredConfigPropertyTypeImpl.java | 223 --- .../jst/j2ee/jca/impl/ResourceAdapterImpl.java | 817 -------- .../jst/j2ee/jca/impl/SecurityPermissionImpl.java | 246 --- .../jst/j2ee/jca/util/JCADescriptionHelper.java | 157 -- .../jst/j2ee/jca/util/JcaAdapterFactory.java | 392 ---- .../org/eclipse/jst/j2ee/jca/util/JcaSwitch.java | 427 ---- .../org/eclipse/jst/j2ee/jsp/JspFactory.java | 2 +- .../org/eclipse/jst/j2ee/jsp/JspPackage.java | 2 +- .../eclipse/jst/j2ee/jsp/impl/JSPConfigImpl.java | 191 -- .../jst/j2ee/jsp/impl/JSPPropertyGroupImpl.java | 637 ------ .../eclipse/jst/j2ee/jsp/impl/JspFactoryImpl.java | 102 - .../eclipse/jst/j2ee/jsp/impl/JspPackageImpl.java | 398 ---- .../jst/j2ee/jsp/impl/TagLibRefTypeImpl.java | 218 -- .../jst/j2ee/jsp/util/JspAdapterFactory.java | 196 -- .../org/eclipse/jst/j2ee/jsp/util/JspSwitch.java | 184 -- .../Connector14SpecificationMigrator.java | 135 -- .../j2ee/migration/J2EEMigrationMultiStatus.java | 114 -- .../jst/j2ee/migration/J2EEMigrationStatus.java | 232 --- .../J2EESpecificationMigrationConstants.java | 39 - .../j2ee/migration/J2EESpecificationMigrator.java | 484 ----- .../jst/j2ee/migration/SpecificationMigrator.java | 209 -- .../j2ee/migration/War14SpecificationMigrator.java | 202 -- .../org/eclipse/jst/j2ee/taglib/TaglibFactory.java | 2 +- .../org/eclipse/jst/j2ee/taglib/TaglibPackage.java | 2 +- .../jst/j2ee/taglib/impl/ExtensibleTypeImpl.java | 164 -- .../eclipse/jst/j2ee/taglib/impl/FunctionImpl.java | 431 ---- .../jst/j2ee/taglib/impl/JSPTagAttributeImpl.java | 473 ----- .../eclipse/jst/j2ee/taglib/impl/JSPTagImpl.java | 599 ------ .../jst/j2ee/taglib/impl/JSPVariableImpl.java | 397 ---- .../eclipse/jst/j2ee/taglib/impl/TagFileImpl.java | 370 ---- .../eclipse/jst/j2ee/taglib/impl/TagLibImpl.java | 594 ------ .../jst/j2ee/taglib/impl/TaglibFactoryImpl.java | 183 -- .../jst/j2ee/taglib/impl/TaglibPackageImpl.java | 851 -------- .../jst/j2ee/taglib/impl/TldExtensionImpl.java | 223 --- .../jst/j2ee/taglib/impl/ValidatorImpl.java | 245 --- .../jst/j2ee/taglib/util/TaglibAdapterFactory.java | 303 --- .../eclipse/jst/j2ee/taglib/util/TaglibSwitch.java | 318 --- .../j2ee/webapplication/WebapplicationFactory.java | 2 +- .../j2ee/webapplication/WebapplicationPackage.java | 2 +- .../webapplication/impl/AuthConstraintImpl.java | 318 --- .../j2ee/webapplication/impl/ContextParamImpl.java | 332 --- .../impl/ErrorCodeErrorPageImpl.java | 233 --- .../j2ee/webapplication/impl/ErrorPageImpl.java | 258 --- .../impl/ExceptionTypeErrorPageImpl.java | 248 --- .../jst/j2ee/webapplication/impl/FilterImpl.java | 387 ---- .../webapplication/impl/FilterMappingImpl.java | 341 ---- .../webapplication/impl/FormLoginConfigImpl.java | 291 --- .../webapplication/impl/HTTPMethodTypeImpl.java | 164 -- .../j2ee/webapplication/impl/InitParamImpl.java | 237 --- .../jst/j2ee/webapplication/impl/JSPTypeImpl.java | 153 -- .../impl/LocalEncodingMappingImpl.java | 218 -- .../impl/LocalEncodingMappingListImpl.java | 154 -- .../j2ee/webapplication/impl/LoginConfigImpl.java | 445 ----- .../j2ee/webapplication/impl/MimeMappingImpl.java | 290 --- .../j2ee/webapplication/impl/RoleNameTypeImpl.java | 147 -- .../impl/SecurityConstraintImpl.java | 449 ----- .../jst/j2ee/webapplication/impl/ServletImpl.java | 699 ------- .../webapplication/impl/ServletMappingImpl.java | 349 ---- .../j2ee/webapplication/impl/ServletTypeImpl.java | 150 -- .../webapplication/impl/SessionConfigImpl.java | 281 --- .../j2ee/webapplication/impl/TagLibRefImpl.java | 296 --- .../webapplication/impl/URLPatternTypeImpl.java | 243 --- .../impl/UserDataConstraintImpl.java | 376 ---- .../jst/j2ee/webapplication/impl/WebAppImpl.java | 1399 ------------- .../webapplication/impl/WebAppResourceFactory.java | 91 - .../webapplication/impl/WebAppResourceImpl.java | 201 -- .../impl/WebResourceCollectionImpl.java | 499 ----- .../jst/j2ee/webapplication/impl/WebTypeImpl.java | 61 - .../impl/WebapplicationFactoryImpl.java | 402 ---- .../impl/WebapplicationPackageImpl.java | 1833 ----------------- .../j2ee/webapplication/impl/WelcomeFileImpl.java | 245 --- .../webapplication/impl/WelcomeFileListImpl.java | 234 --- .../util/WebapplicationAdapterFactory.java | 700 ------- .../webapplication/util/WebapplicationSwitch.java | 776 ------- .../wsclient/impl/ComponentScopedRefsImpl.java | 223 +++ .../internal/wsclient/impl/HandlerImpl.java | 473 +++++ .../wsclient/impl/PortComponentRefImpl.java | 226 +++ .../internal/wsclient/impl/ServiceRefImpl.java | 575 ++++++ .../wsclient/impl/WebServicesClientImpl.java | 191 ++ .../impl/WebServicesClientResourceFactory.java | 71 + .../wsclient/impl/WebServicesResourceImpl.java | 145 ++ .../impl/Webservice_clientFactoryImpl.java | 127 ++ .../impl/Webservice_clientPackageImpl.java | 531 +++++ .../util/Webservice_clientAdapterFactory.java | 231 +++ .../wsclient/util/Webservice_clientSwitch.java | 230 +++ .../wscommon/impl/DescriptionTypeImpl.java | 113 ++ .../wscommon/impl/DisplayNameTypeImpl.java | 113 ++ .../internal/wscommon/impl/InitParamImpl.java | 332 +++ .../internal/wscommon/impl/PortNameImpl.java | 165 ++ .../internal/wscommon/impl/SOAPHeaderImpl.java | 133 ++ .../internal/wscommon/impl/SOAPRoleImpl.java | 165 ++ .../wscommon/impl/WscommonFactoryImpl.java | 140 ++ .../wscommon/impl/WscommonPackageImpl.java | 409 ++++ .../wscommon/util/WscommonAdapterFactory.java | 269 +++ .../internal/wscommon/util/WscommonSwitch.java | 268 +++ .../internal/wsdd/impl/BeanLinkImpl.java | 48 + .../webservice/internal/wsdd/impl/EJBLinkImpl.java | 164 ++ .../webservice/internal/wsdd/impl/HandlerImpl.java | 431 ++++ .../internal/wsdd/impl/PortComponentImpl.java | 829 ++++++++ .../internal/wsdd/impl/ServiceImplBeanImpl.java | 316 +++ .../internal/wsdd/impl/ServletLinkImpl.java | 164 ++ .../internal/wsdd/impl/WSDLPortImpl.java | 133 ++ .../wsdd/impl/WebServiceDescriptionImpl.java | 969 +++++++++ .../internal/wsdd/impl/WebServicesImpl.java | 241 +++ .../internal/wsdd/impl/WsddFactoryImpl.java | 176 ++ .../internal/wsdd/impl/WsddPackageImpl.java | 783 ++++++++ .../internal/wsdd/impl/WsddResourceImpl.java | 181 ++ .../internal/wsdd/util/WsddAdapterFactory.java | 323 +++ .../webservice/internal/wsdd/util/WsddSwitch.java | 338 ++++ .../webservice/util/DescriptionGroupHelper.java | 1577 --------------- .../j2ee/webservice/util/DescriptionGroupItem.java | 77 - .../jst/j2ee/webservice/util/QNameHelper.java | 130 -- .../wsclient/Webservice_clientFactory.java | 2 +- .../wsclient/Webservice_clientPackage.java | 2 +- .../wsclient/impl/ComponentScopedRefsImpl.java | 223 --- .../j2ee/webservice/wsclient/impl/HandlerImpl.java | 473 ----- .../wsclient/impl/PortComponentRefImpl.java | 226 --- .../webservice/wsclient/impl/ServiceRefImpl.java | 575 ------ .../wsclient/impl/WebServicesClientImpl.java | 191 -- .../impl/WebServicesClientResourceFactory.java | 71 - .../wsclient/impl/WebServicesResourceImpl.java | 145 -- .../impl/Webservice_clientFactoryImpl.java | 127 -- .../impl/Webservice_clientPackageImpl.java | 531 ----- .../util/Webservice_clientAdapterFactory.java | 231 --- .../wsclient/util/Webservice_clientSwitch.java | 230 --- .../j2ee/webservice/wscommon/WscommonFactory.java | 2 +- .../j2ee/webservice/wscommon/WscommonPackage.java | 2 +- .../wscommon/impl/DescriptionTypeImpl.java | 113 -- .../wscommon/impl/DisplayNameTypeImpl.java | 113 -- .../webservice/wscommon/impl/InitParamImpl.java | 332 --- .../webservice/wscommon/impl/PortNameImpl.java | 165 -- .../webservice/wscommon/impl/SOAPHeaderImpl.java | 133 -- .../webservice/wscommon/impl/SOAPRoleImpl.java | 165 -- .../wscommon/impl/WscommonFactoryImpl.java | 140 -- .../wscommon/impl/WscommonPackageImpl.java | 409 ---- .../wscommon/util/WscommonAdapterFactory.java | 269 --- .../webservice/wscommon/util/WscommonSwitch.java | 268 --- .../jst/j2ee/webservice/wsdd/WsddFactory.java | 2 +- .../jst/j2ee/webservice/wsdd/WsddPackage.java | 2 +- .../j2ee/webservice/wsdd/WsddResourceFactory.java | 4 +- .../j2ee/webservice/wsdd/impl/BeanLinkImpl.java | 48 - .../jst/j2ee/webservice/wsdd/impl/EJBLinkImpl.java | 164 -- .../jst/j2ee/webservice/wsdd/impl/HandlerImpl.java | 431 ---- .../webservice/wsdd/impl/PortComponentImpl.java | 829 -------- .../webservice/wsdd/impl/ServiceImplBeanImpl.java | 316 --- .../j2ee/webservice/wsdd/impl/ServletLinkImpl.java | 164 -- .../j2ee/webservice/wsdd/impl/WSDLPortImpl.java | 133 -- .../wsdd/impl/WebServiceDescriptionImpl.java | 969 --------- .../j2ee/webservice/wsdd/impl/WebServicesImpl.java | 241 --- .../j2ee/webservice/wsdd/impl/WsddFactoryImpl.java | 176 -- .../j2ee/webservice/wsdd/impl/WsddPackageImpl.java | 783 -------- .../webservice/wsdd/impl/WsddResourceImpl.java | 181 -- .../webservice/wsdd/util/WsddAdapterFactory.java | 323 --- .../jst/j2ee/webservice/wsdd/util/WsddSwitch.java | 338 ---- .../jaxrpcmap/impl/JaxrpcmapPackageImpl.java | 6 +- .../jaxrpcmap/impl/JaxrpcmapResourceImpl.java | 2 +- .../jaxrpcmap/impl/RootTypeQnameImpl.java | 2 +- .../webservice/jaxrpcmap/impl/WSDLBindingImpl.java | 2 +- .../webservice/jaxrpcmap/impl/WSDLMessageImpl.java | 2 +- .../jaxrpcmap/impl/WSDLPortTypeImpl.java | 2 +- .../jaxrpcmap/impl/WSDLServiceNameImpl.java | 2 +- plugins/org.eclipse.jst.j2ee.jca.ui/plugin.xml | 20 +- .../j2ee/internal/jca/providers/JcaEditPlugin.java | 2 +- .../providers/JcaItemProviderAdapterFactory.java | 2 +- .../j2ee/navigator/internal/J2EELabelProvider.java | 2 +- .../j2ee/navigator/internal/J2EEViewerSorter.java | 2 +- .../j2ee/internal/actions/J2EEDeleteAction.java | 2 +- .../j2ee/internal/actions/J2EERenameAction.java | 2 +- .../J2EEPasteFromClipboardOverrideCommand.java | 2 +- .../provider/AbstractMethodsContentProvider.java | 2 +- .../ejb/provider/ExcludeListContentProvider.java | 2 +- .../provider/MethodPermissionsContentProvider.java | 2 +- .../provider/MethodTransactionContentProvider.java | 2 +- .../jst/j2ee/internal/plugin/J2EEViewerSorter.java | 2 +- .../provider/J2EEAdapterFactoryLabelProvider.java | 4 +- .../provider/J2EEApplicationItemProvider.java | 2 +- .../internal/provider/MethodsProviderDelegate.java | 2 +- plugins/org.eclipse.jst.j2ee.ui/plugin.xml | 22 +- .../web/operations/RemoveFilterOperation.java | 2 +- .../web/operations/RemoveServletOperation.java | 2 +- .../jst/j2ee/internal/web/plugin/WebPlugin.java | 2 +- .../providers/JspItemProviderAdapterFactory.java | 2 +- .../WebapplicationItemProviderAdapterFactory.java | 2 +- .../webservice/adapter/AdapterQNameElement.java | 2 +- .../webservice/command/CommandModifyNSURI.java | 2 +- .../webservice/constants/ATKUIConstants.java | 2 +- .../editmodel/AbstractEditModelOwner.java | 2 +- ...ebservice_clientItemProviderAdapterFactory.java | 2 +- .../WscommonItemProviderAdapterFactory.java | 2 +- .../provider/WsddItemProviderAdapterFactory.java | 2 +- .../ApplicationItemProviderAdapterFactory.java | 2 +- .../provider/ClientItemProviderAdapterFactory.java | 2 +- .../operations/EARProjectLoadStrategyImpl.java | 2 +- .../archive/operations/J2EELoadStrategyImpl.java | 2 +- .../CMPJavaChangeSynchronizationAdapter.java | 2 +- .../operations/J2EEModifierHelperCreator.java | 2 +- .../operations/RemoveSecurityRoleOperation.java | 2 +- .../provider/CommonItemProviderAdapterFactory.java | 2 +- .../AddArchiveProjectToEAROperation.java | 2 +- .../modulemap/ModulemapPackageImpl.java | 4 +- .../J2EEModuleWorkbenchURIConverterImpl.java | 4 +- .../jst/j2ee/internal/project/J2EENature.java | 2 +- .../reference/EJBReferenceCreationOperation.java | 2 +- .../internal/reference/EJBReferenceDataModel.java | 2 +- .../MessageDestReferenceCreationOperation.java | 2 +- ...ourceEnvironmentReferenceCreationOperation.java | 2 +- .../ResourceReferenceCreationOperation.java | 2 +- .../ServiceReferenceCreationOperation.java | 2 +- .../jst/j2ee/internal/plugin/J2EEPlugin.java | 4 +- .../jst/j2ee/internal/validation/EarHelper.java | 2 +- plugins/org.eclipse.jst.servlet.ui/plugin.xml | 14 +- 565 files changed, 78457 insertions(+), 78457 deletions(-) delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ConnectorModuleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/EjbModuleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/JavaClientModuleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ModuleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/WebModuleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CompatibilityDescriptionGroupImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DisplayNameImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EJBLocalRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EjbRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EnvEntryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IconTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IdentityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResouceFactorySaxRegistry.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryDomRegistry.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryRegistry.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/JNDIEnvRefsGroupImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ListenerImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ParamValueImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/QNameImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceEnvRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/RunAsSpecifiedIdentityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityIdentityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/UseCallerIdentityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonUtil.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultable.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/DefaultedAdapterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultor.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/IDUtility.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/XmlSpecifiedDataAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRelationshipRoleAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRequiredRelationshipRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigPropertyImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AssemblyDescriptorImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMPAttributeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMRFieldImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJB20FlattenedRoleShapeStrategy.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBMethodCategoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationshipRoleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EnterpriseBeanImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EntityImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ExcludeListImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalKeyAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalModelledPersistentAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalOppositeRelationshipRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalPersistentAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenDestinationImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodElementImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodPermissionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodTransactionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledKeyAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledPersistentAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/NonKeyRequiredRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryMethodImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipRoleAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipsImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredLocalRelationshipRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredRelationshipRoleFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleShapeStrategy.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleSourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SessionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SupertypeCMPAttributeFilter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPFieldDescriptor.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPKeySynchronizationAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CommonRelationshipAttributeMaintenanceAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/ConvertedEJBAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBAttributeMaintenanceFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBRelationAttributeMaintenanceAdapter.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/MethodElementHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/RelationshipsAttributeMaintenanceAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ConnectorModuleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/EjbModuleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/JavaClientModuleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ModuleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/WebModuleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CompatibilityDescriptionGroupImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DisplayNameImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EJBLocalRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EjbRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EnvEntryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IconTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IdentityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResouceFactorySaxRegistry.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryDomRegistry.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryRegistry.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/JNDIEnvRefsGroupImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ListenerImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ParamValueImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/QNameImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceEnvRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/RunAsSpecifiedIdentityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityIdentityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/UseCallerIdentityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonUtil.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultable.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/DefaultedAdapterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultor.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/IDUtility.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/XmlSpecifiedDataAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRelationshipRoleAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRequiredRelationshipRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigPropertyImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AssemblyDescriptorImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMPAttributeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMRFieldImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJB20FlattenedRoleShapeStrategy.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBMethodCategoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationshipRoleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EnterpriseBeanImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EntityImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ExcludeListImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalKeyAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalModelledPersistentAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalOppositeRelationshipRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalPersistentAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenDestinationImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodElementImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodPermissionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodTransactionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledKeyAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledPersistentAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/NonKeyRequiredRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryMethodImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipRoleAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipsImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredLocalRelationshipRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredRelationshipRoleFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleShapeStrategy.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleSourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SessionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SupertypeCMPAttributeFilter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPFieldDescriptor.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPHelper.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPKeySynchronizationAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CommonRelationshipAttributeMaintenanceAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/ConvertedEJBAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBAttributeMaintenanceFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBRelationAttributeMaintenanceAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/MethodElementHelper.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/RelationshipsAttributeMaintenanceAdapter.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ActivationSpecImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AdminObjectImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AuthenticationMechanismImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConfigPropertyImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectionDefinitionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/InboundResourceAdapterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/LicenseImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageAdapterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageListenerImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/OutboundResourceAdapterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/RequiredConfigPropertyTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ResourceAdapterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/SecurityPermissionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JCADescriptionHelper.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPConfigImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPPropertyGroupImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/TagLibRefTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/Connector14SpecificationMigrator.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationMultiStatus.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationStatus.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrationConstants.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrator.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/SpecificationMigrator.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/War14SpecificationMigrator.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ExtensibleTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/FunctionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagAttributeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPVariableImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagFileImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagLibImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TldExtensionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ValidatorImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/AuthConstraintImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ContextParamImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorCodeErrorPageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorPageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ExceptionTypeErrorPageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterMappingImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FormLoginConfigImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/HTTPMethodTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/InitParamImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/JSPTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingListImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LoginConfigImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/MimeMappingImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/RoleNameTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SecurityConstraintImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletMappingImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SessionConfigImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/TagLibRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/URLPatternTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/UserDataConstraintImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebResourceCollectionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileListImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/DescriptionGroupHelper.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/DescriptionGroupItem.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/QNameHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ActivationSpecImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AdminObjectImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AuthenticationMechanismImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConfigPropertyImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectionDefinitionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/InboundResourceAdapterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/LicenseImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageAdapterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageListenerImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/OutboundResourceAdapterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/RequiredConfigPropertyTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ResourceAdapterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/SecurityPermissionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JCADescriptionHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPConfigImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPPropertyGroupImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/TagLibRefTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/Connector14SpecificationMigrator.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationMultiStatus.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationStatus.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrationConstants.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrator.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/SpecificationMigrator.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/War14SpecificationMigrator.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ExtensibleTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/FunctionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagAttributeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPVariableImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagFileImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagLibImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TldExtensionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ValidatorImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/AuthConstraintImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ContextParamImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorCodeErrorPageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorPageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ExceptionTypeErrorPageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterMappingImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FormLoginConfigImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/HTTPMethodTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/InitParamImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/JSPTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingListImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LoginConfigImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/MimeMappingImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/RoleNameTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SecurityConstraintImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletMappingImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SessionConfigImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/TagLibRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/URLPatternTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/UserDataConstraintImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebResourceCollectionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileListImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ComponentScopedRefsImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/HandlerImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/PortComponentRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ServiceRefImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientResourceFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DescriptionTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DisplayNameTypeImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/InitParamImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/PortNameImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPHeaderImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPRoleImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonSwitch.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/BeanLinkImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/EJBLinkImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/HandlerImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/PortComponentImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServiceImplBeanImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServletLinkImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WSDLPortImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServiceDescriptionImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServicesImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddFactoryImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddPackageImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddResourceImpl.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddAdapterFactory.java create mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/DescriptionGroupHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/DescriptionGroupItem.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/QNameHelper.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ComponentScopedRefsImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/HandlerImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/PortComponentRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ServiceRefImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientResourceFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DescriptionTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DisplayNameTypeImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/InitParamImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/PortNameImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPHeaderImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPRoleImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonSwitch.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/BeanLinkImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/EJBLinkImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/HandlerImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/PortComponentImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServiceImplBeanImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServletLinkImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WSDLPortImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServiceDescriptionImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServicesImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddFactoryImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddPackageImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddResourceImpl.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddAdapterFactory.java delete mode 100644 plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddSwitch.java diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ArchiveCopyUtility.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ArchiveCopyUtility.java index 3c155532a..3ad128cd4 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ArchiveCopyUtility.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ArchiveCopyUtility.java @@ -23,7 +23,6 @@ import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.util.Defaultable; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveResourceHandler; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory; @@ -37,6 +36,7 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; +import org.eclipse.jst.j2ee.internal.common.util.Defaultable; import org.eclipse.jst.j2ee.webapplication.FilterMapping; import org.eclipse.wst.common.emf.utilities.CopyGroup; import org.eclipse.wst.common.emf.utilities.EtoolsCopySession; diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/CommonarchivePackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/CommonarchivePackageImpl.java index c501891e4..714955afa 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/CommonarchivePackageImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/CommonarchivePackageImpl.java @@ -19,10 +19,7 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.emf.ecore.impl.EcorePackageImpl; import org.eclipse.jem.java.impl.JavaRefPackageImpl; import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.ApplicationClientFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.ClientModuleRef; @@ -43,13 +40,16 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.WebModuleRef; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseconfigPackage; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.impl.LooseconfigPackageImpl; import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; /** diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/EARFileImpl.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/EARFileImpl.java index c02a69441..a3619f4ab 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/EARFileImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/EARFileImpl.java @@ -44,11 +44,9 @@ import org.eclipse.jst.j2ee.application.JavaClientModule; import org.eclipse.jst.j2ee.application.Module; import org.eclipse.jst.j2ee.application.WebModule; import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.impl.ApplicationClientResourceFactory; import org.eclipse.jst.j2ee.common.EjbRef; import org.eclipse.jst.j2ee.common.SecurityRole; import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveResourceHandler; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage; @@ -75,11 +73,13 @@ import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EJBResource; import org.eclipse.jst.j2ee.ejb.EjbPackage; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.impl.EJBJarResourceFactory; +import org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientResourceFactory; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.ejb.impl.EJBJarResourceFactory; +import org.eclipse.jst.j2ee.internal.jca.impl.ConnectorResourceFactory; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppResourceFactory; import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.impl.ConnectorResourceFactory; import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.impl.WebAppResourceFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/looseconfig/impl/LooseconfigPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/looseconfig/impl/LooseconfigPackageImpl.java index 21beb3c8a..c61470fac 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/looseconfig/impl/LooseconfigPackageImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/looseconfig/impl/LooseconfigPackageImpl.java @@ -18,9 +18,6 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.emf.ecore.impl.EcorePackageImpl; import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage; import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchivePackageImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseApplication; @@ -31,11 +28,14 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseModule; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseWARFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseconfigFactory; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseconfigPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; /** diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/strategy/LoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/strategy/LoadStrategyImpl.java index 3b7445cf2..e6883e123 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/strategy/LoadStrategyImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/strategy/LoadStrategyImpl.java @@ -34,9 +34,6 @@ import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.URIConverter; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.jem.internal.java.adapters.jdk.JavaJDKAdapterFactory; -import org.eclipse.jst.j2ee.common.impl.J2EEResouceFactorySaxRegistry; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryDomRegistry; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveResourceHandler; @@ -53,6 +50,9 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.FileIteratorImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseArchive; import org.eclipse.jst.j2ee.commonarchivecore.internal.looseconfig.LooseConfigRegister; import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResouceFactorySaxRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryDomRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; import com.ibm.wtp.common.logger.proxy.Logger; diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/CMPBeanClassVRule.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/CMPBeanClassVRule.java index 19f5e8dd2..18a95f3a5 100644 --- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/CMPBeanClassVRule.java +++ b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/CMPBeanClassVRule.java @@ -24,7 +24,7 @@ import org.eclipse.jst.j2ee.ejb.CMRField; import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.impl.LocalModelledPersistentAttributeFilter; +import org.eclipse.jst.j2ee.internal.ejb.impl.LocalModelledPersistentAttributeFilter; import org.eclipse.wst.validation.core.IMessage; import org.eclipse.wst.validation.core.ValidationException; diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/EarValidator.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/EarValidator.java index abd1a9093..8f576de5d 100644 --- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/EarValidator.java +++ b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/EarValidator.java @@ -29,7 +29,6 @@ import org.eclipse.jst.j2ee.application.Application; import org.eclipse.jst.j2ee.application.Module; import org.eclipse.jst.j2ee.application.WebModule; import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.impl.ApplicationClientImpl; import org.eclipse.jst.j2ee.common.EJBLocalRef; import org.eclipse.jst.j2ee.common.EjbRef; import org.eclipse.jst.j2ee.common.MessageDestinationRef; @@ -38,7 +37,6 @@ import org.eclipse.jst.j2ee.common.ResourceRef; import org.eclipse.jst.j2ee.common.SecurityRole; import org.eclipse.jst.j2ee.common.SecurityRoleRef; import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.EjbRefImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleRef; @@ -49,6 +47,8 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadExc import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl; +import org.eclipse.jst.j2ee.internal.common.impl.EjbRefImpl; import org.eclipse.jst.j2ee.webapplication.WebApp; import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; import org.eclipse.wst.validation.core.IFileDelta; diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/J2EEValidator.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/J2EEValidator.java index 13df0d985..a04b68550 100644 --- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/J2EEValidator.java +++ b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/J2EEValidator.java @@ -19,8 +19,8 @@ import java.util.Set; import org.eclipse.emf.common.util.EList; import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.impl.ResourceRefImpl; -import org.eclipse.jst.j2ee.common.impl.SecurityRoleImpl; +import org.eclipse.jst.j2ee.internal.common.impl.ResourceRefImpl; +import org.eclipse.jst.j2ee.internal.common.impl.SecurityRoleImpl; import org.eclipse.wst.validation.core.IFileDelta; import org.eclipse.wst.validation.core.IHelper; import org.eclipse.wst.validation.core.IMessage; diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/ValidationRuleUtility.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/ValidationRuleUtility.java index 0b189b46e..ea2616a4d 100644 --- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/ValidationRuleUtility.java +++ b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/ValidationRuleUtility.java @@ -42,8 +42,8 @@ import org.eclipse.jst.j2ee.ejb.QueryMethod; import org.eclipse.jst.j2ee.ejb.Session; import org.eclipse.jst.j2ee.ejb.SessionType; import org.eclipse.jst.j2ee.ejb.TransactionType; -import org.eclipse.jst.j2ee.ejb.impl.LocalModelledPersistentAttributeFilter; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.ejb.impl.LocalModelledPersistentAttributeFilter; import com.ibm.wtp.common.logger.LogEntry; import com.ibm.wtp.common.logger.proxy.Logger; diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/WarValidator.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/WarValidator.java index a160fc278..b537e2e5b 100644 --- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/WarValidator.java +++ b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/WarValidator.java @@ -25,13 +25,13 @@ import org.eclipse.jem.java.JavaRefFactory; import org.eclipse.jst.j2ee.common.EnvEntry; import org.eclipse.jst.j2ee.common.SecurityRole; import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.impl.EJBLocalRefImpl; -import org.eclipse.jst.j2ee.common.impl.EjbRefImpl; -import org.eclipse.jst.j2ee.common.impl.ResourceRefImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.EJBLocalRefImpl; +import org.eclipse.jst.j2ee.internal.common.impl.EjbRefImpl; +import org.eclipse.jst.j2ee.internal.common.impl.ResourceRefImpl; import org.eclipse.jst.j2ee.webapplication.AuthConstraint; import org.eclipse.jst.j2ee.webapplication.ContextParam; import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationFactory.java index 32f5c2ddf..ba302e1f6 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationFactory.java @@ -21,7 +21,7 @@ public interface ApplicationFactory extends EFactory{ * * @generated */ - ApplicationFactory eINSTANCE = new org.eclipse.jst.j2ee.application.impl.ApplicationFactoryImpl(); + ApplicationFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.application.impl.ApplicationFactoryImpl(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationPackage.java index a9285cf87..53dc8cfee 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/ApplicationPackage.java @@ -260,7 +260,7 @@ public interface ApplicationPackage extends EPackage{ * * @generated */ - ApplicationPackage eINSTANCE = org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl.init(); + ApplicationPackage eINSTANCE = org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationFactoryImpl.java deleted file mode 100644 index 9d2f92851..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationFactoryImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationFactory; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.ConnectorModule; -import org.eclipse.jst.j2ee.application.EjbModule; -import org.eclipse.jst.j2ee.application.JavaClientModule; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.WebModule; - -/** - * @generated - */ -public class ApplicationFactoryImpl extends EFactoryImpl implements ApplicationFactory{ - - public ApplicationFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ApplicationPackage.APPLICATION: return createApplication(); - case ApplicationPackage.MODULE: return createModule(); - case ApplicationPackage.WEB_MODULE: return createWebModule(); - case ApplicationPackage.JAVA_CLIENT_MODULE: return createJavaClientModule(); - case ApplicationPackage.EJB_MODULE: return createEjbModule(); - case ApplicationPackage.CONNECTOR_MODULE: return createConnectorModule(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - -public static ApplicationFactory getActiveFactory() { - return (ApplicationFactory) getPackage().getEFactoryInstance(); -} - /** - * @generated This field/method will be replaced during code generation. - */ - public Application createApplication() { - ApplicationImpl application = new ApplicationImpl(); - return application; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Module createModule() { - ModuleImpl module = new ModuleImpl(); - return module; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WebModule createWebModule() { - WebModuleImpl webModule = new WebModuleImpl(); - return webModule; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JavaClientModule createJavaClientModule() { - JavaClientModuleImpl javaClientModule = new JavaClientModuleImpl(); - return javaClientModule; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EjbModule createEjbModule() { - EjbModuleImpl ejbModule = new EjbModuleImpl(); - return ejbModule; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ConnectorModule createConnectorModule() { - ConnectorModuleImpl connectorModule = new ConnectorModuleImpl(); - return connectorModule; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ApplicationPackage getApplicationPackage() { - return (ApplicationPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static ApplicationPackage getPackage() { - return ApplicationPackage.eINSTANCE; - } -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationImpl.java deleted file mode 100644 index 5ba83acd2..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationImpl.java +++ /dev/null @@ -1,434 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.common.util.CommonUtil; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.wst.common.internal.emf.utilities.StringUtil; - - -/** - * The application element is the root element of a J2EE application deployment descriptor. - - */ -public class ApplicationImpl extends CompatibilityDescriptionGroupImpl implements Application{ - - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected static final String VERSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected String version = VERSION_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityRoles = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList modules = null; - public ApplicationImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getApplication(); - } - -/** - * @see org.eclipse.jst.j2ee.internal.application.Application - */ -public boolean containsSecurityRole(java.lang.String name) { - return getSecurityRoleNamed(name) != null; -} -public Module getModule(String uri) { - return getFirstModule(uri); -} - -public Module getModule(String uri, String altDD) { - List allModules = getModules(); - for (int i = 0; i < allModules.size(); i++) { - Module aModule = (Module) allModules.get(i); - if (StringUtil.stringsEqual(uri, aModule.getUri()) && StringUtil.stringsEqual(altDD, aModule.getAltDD())) - return aModule; - } - return null; -} - /** - * Gets the first module matching the specified uri - * @param uri The uri of a module to find. - * @return The first matching module or null if no module is found. - */ - public Module getFirstModule(String uri){ - if (uri == null) return null; - java.util.Iterator allModules = getModules().iterator(); - while (allModules.hasNext()){ - Module aModule = (Module)allModules.next(); - if(uri.equals(aModule.getUri())) return aModule; - } - return null; - } -/** - * @see org.eclipse.jst.j2ee.internal.application.Application - */ -public Module getModuleHavingAltDD(java.lang.String uri) { - if (uri == null) - return null; - List aModules = getModules(); - for (int i = 0; i < aModules.size(); i++) { - Module aModule = (Module) aModules.get(i); - if (uri.equals(aModule.getAltDD())) - return aModule; - } - return null; -} -public SecurityRole getSecurityRoleNamed(String roleName) { - java.util.List tempRoles = getSecurityRoles(); - SecurityRole role; - for (int i = 0; i < tempRoles.size(); i++) { - role = (SecurityRole) tempRoles.get(i); - if (role.getRoleName().equals(roleName)) - return role; - } - return null; -} - -/** - * Return boolean indicating if this Application was populated from an Applcation1.2 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_2Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.APPLICATION_SYSTEMID_1_2); -} -/** - * Return boolean indicating if this Application was populated from an Application1.3 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_3Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.APPLICATION_SYSTEMID_1_3); -} - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * - * - * @generated - */ - public String getVersion() { - return version; - } - - /** - This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ - public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getModuleVersionID(); - } - /** - *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level - */ - public int getJ2EEVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getJ2EEVersionID(); - } - - /** - * - * - * @generated - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.APPLICATION__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains the definitions of security roles which are - * global to the application. - */ - public EList getSecurityRoles() { - if (securityRoles == null) { - securityRoles = new EObjectContainmentEList(SecurityRole.class, this, ApplicationPackage.APPLICATION__SECURITY_ROLES); - } - return securityRoles; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getModules() { - if (modules == null) { - modules = new EObjectContainmentWithInverseEList(Module.class, this, ApplicationPackage.APPLICATION__MODULES, ApplicationPackage.MODULE__APPLICATION); - } - return modules; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.APPLICATION__MODULES: - return ((InternalEList)getModules()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.APPLICATION__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case ApplicationPackage.APPLICATION__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case ApplicationPackage.APPLICATION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case ApplicationPackage.APPLICATION__SECURITY_ROLES: - return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); - case ApplicationPackage.APPLICATION__MODULES: - return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.APPLICATION__ICONS: - return getIcons(); - case ApplicationPackage.APPLICATION__DISPLAY_NAMES: - return getDisplayNames(); - case ApplicationPackage.APPLICATION__DESCRIPTIONS: - return getDescriptions(); - case ApplicationPackage.APPLICATION__SMALL_ICON: - return getSmallIcon(); - case ApplicationPackage.APPLICATION__LARGE_ICON: - return getLargeIcon(); - case ApplicationPackage.APPLICATION__DESCRIPTION: - return getDescription(); - case ApplicationPackage.APPLICATION__DISPLAY_NAME: - return getDisplayName(); - case ApplicationPackage.APPLICATION__VERSION: - return getVersion(); - case ApplicationPackage.APPLICATION__SECURITY_ROLES: - return getSecurityRoles(); - case ApplicationPackage.APPLICATION__MODULES: - return getModules(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.APPLICATION__ICONS: - return icons != null && !icons.isEmpty(); - case ApplicationPackage.APPLICATION__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case ApplicationPackage.APPLICATION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case ApplicationPackage.APPLICATION__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case ApplicationPackage.APPLICATION__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case ApplicationPackage.APPLICATION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case ApplicationPackage.APPLICATION__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case ApplicationPackage.APPLICATION__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case ApplicationPackage.APPLICATION__SECURITY_ROLES: - return securityRoles != null && !securityRoles.isEmpty(); - case ApplicationPackage.APPLICATION__MODULES: - return modules != null && !modules.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.APPLICATION__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case ApplicationPackage.APPLICATION__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case ApplicationPackage.APPLICATION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case ApplicationPackage.APPLICATION__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case ApplicationPackage.APPLICATION__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case ApplicationPackage.APPLICATION__DESCRIPTION: - setDescription((String)newValue); - return; - case ApplicationPackage.APPLICATION__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case ApplicationPackage.APPLICATION__VERSION: - setVersion((String)newValue); - return; - case ApplicationPackage.APPLICATION__SECURITY_ROLES: - getSecurityRoles().clear(); - getSecurityRoles().addAll((Collection)newValue); - return; - case ApplicationPackage.APPLICATION__MODULES: - getModules().clear(); - getModules().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.APPLICATION__ICONS: - getIcons().clear(); - return; - case ApplicationPackage.APPLICATION__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case ApplicationPackage.APPLICATION__DESCRIPTIONS: - getDescriptions().clear(); - return; - case ApplicationPackage.APPLICATION__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case ApplicationPackage.APPLICATION__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case ApplicationPackage.APPLICATION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case ApplicationPackage.APPLICATION__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case ApplicationPackage.APPLICATION__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case ApplicationPackage.APPLICATION__SECURITY_ROLES: - getSecurityRoles().clear(); - return; - case ApplicationPackage.APPLICATION__MODULES: - getModules().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (version: "); //$NON-NLS-1$ - result.append(version); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationPackageImpl.java deleted file mode 100644 index 5ee284b9e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationPackageImpl.java +++ /dev/null @@ -1,364 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationFactory; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.ConnectorModule; -import org.eclipse.jst.j2ee.application.EjbModule; -import org.eclipse.jst.j2ee.application.JavaClientModule; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.WebModule; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class ApplicationPackageImpl extends EPackageImpl implements ApplicationPackage, EPackage { - /** - * - * - * @generated - */ - private EClass applicationEClass = null; - - /** - * - * - * @generated - */ - private EClass moduleEClass = null; - - /** - * - * - * @generated - */ - private EClass webModuleEClass = null; - - /** - * - * - * @generated - */ - private EClass javaClientModuleEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbModuleEClass = null; - - /** - * - * - * @generated - */ - private EClass connectorModuleEClass = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private ApplicationPackageImpl() { - super(eNS_URI, ApplicationFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static ApplicationPackage init() { - if (isInited) return (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI); - - // Obtain or create and register package. - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ApplicationPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); - - // Step 1: create meta-model objects - theApplicationPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theApplicationPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theApplicationPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getApplication() { - return applicationEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getApplication_Version() { - return (EAttribute)applicationEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplication_SecurityRoles() { - return (EReference)applicationEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplication_Modules() { - return (EReference)applicationEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getModule() { - return moduleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getModule_Uri() { - return (EAttribute)moduleEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getModule_AltDD() { - return (EAttribute)moduleEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getModule_Application() { - return (EReference)moduleEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWebModule() { - return webModuleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getWebModule_ContextRoot() { - return (EAttribute)webModuleEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getJavaClientModule() { - return javaClientModuleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEjbModule() { - return ejbModuleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getConnectorModule() { - return connectorModuleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ApplicationFactory getApplicationFactory() { - return (ApplicationFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - applicationEClass = createEClass(APPLICATION); - createEAttribute(applicationEClass, APPLICATION__VERSION); - createEReference(applicationEClass, APPLICATION__SECURITY_ROLES); - createEReference(applicationEClass, APPLICATION__MODULES); - - moduleEClass = createEClass(MODULE); - createEAttribute(moduleEClass, MODULE__URI); - createEAttribute(moduleEClass, MODULE__ALT_DD); - createEReference(moduleEClass, MODULE__APPLICATION); - - webModuleEClass = createEClass(WEB_MODULE); - createEAttribute(webModuleEClass, WEB_MODULE__CONTEXT_ROOT); - - javaClientModuleEClass = createEClass(JAVA_CLIENT_MODULE); - - ejbModuleEClass = createEClass(EJB_MODULE); - - connectorModuleEClass = createEClass(CONNECTOR_MODULE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - - // Add supertypes to classes - applicationEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - webModuleEClass.getESuperTypes().add(this.getModule()); - javaClientModuleEClass.getESuperTypes().add(this.getModule()); - ejbModuleEClass.getESuperTypes().add(this.getModule()); - connectorModuleEClass.getESuperTypes().add(this.getModule()); - - // Initialize classes and features; add operations and parameters - initEClass(applicationEClass, Application.class, "Application", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getApplication_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplication_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplication_Modules(), this.getModule(), this.getModule_Application(), "modules", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getModule_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getModule_AltDD(), ecorePackage.getEString(), "altDD", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getModule_Application(), this.getApplication(), this.getApplication_Modules(), "application", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(webModuleEClass, WebModule.class, "WebModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getWebModule_ContextRoot(), ecorePackage.getEString(), "contextRoot", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(javaClientModuleEClass, JavaClientModule.class, "JavaClientModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(ejbModuleEClass, EjbModule.class, "EjbModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(connectorModuleEClass, ConnectorModule.class, "ConnectorModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } -} //ApplicationPackageImpl - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceFactory.java deleted file mode 100644 index e775a065d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceFactory.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -public class ApplicationResourceFactory extends TranslatorResourceFactory { - - /** - * Method registerDtds. - */ - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SYSTEMID_1_2, "application_1_2.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SYSTEMID_1_3, "application_1_3.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SCHEMA_LOC_1_4, "application_1_4.xsd"); //$NON-NLS-1$ - // moved to the web svcs J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SCHEMA_LOC_1_1, "j2ee_web_services_client_1_1.xsd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.J2EE_1_4_XSD_SHORT_NAME, J2EEConstants.J2EE_1_4_XSD_SHORT_NAME); - } - - /** - * @param aRendererFactory - */ - public ApplicationResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) - */ - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new ApplicationResourceImpl(uri, aRenderer); - } - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(aRendererFactory)); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.APPLICATION_DD_URI_OBJ); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceImpl.java deleted file mode 100644 index 10d2584e6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ApplicationResourceImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationResource; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.model.translator.application.ApplicationTranslator; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - - -public class ApplicationResourceImpl extends XMLResourceImpl implements ApplicationResource { - /** - * @param uri - * @param aRenderer - */ - public ApplicationResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - - } - - /** - * @param aRenderer - */ - public ApplicationResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - /** - * Return the first element in the EList. */ - public Application getApplication() { - return (Application) getRootObject(); - } - - - public int getType() { - return APPLICATION_TYPE; - } - - - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.APPLICATION_DOCTYPE; - default : - return null; - } - - } - /* App version is always the same as the J2EE version - */ - public int getJ2EEVersionID() { - return getModuleVersionID(); - } - public Translator getRootTranslator() { - return ApplicationTranslator.INSTANCE; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.APPLICATION_SYSTEMID_1_2; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.APPLICATION_SYSTEMID_1_3; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.APPLICATION_PUBLICID_1_2; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.APPLICATION_PUBLICID_1_3; - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (J2EE_1_4_ID) : - super.setDoctypeValues(null, null); - break; - case (J2EE_1_3_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (J2EE_1_2_ID) : - super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version(Same as J2EE Version for Application) - */ - public void setJ2EEVersionID(int id) { - primSetVersionID(id); - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - } - syncVersionOfRootObject(); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - Application app = getApplication(); - if (app == null) - return; - - String version = app.getVersion(); - String newVersion = getModuleVersionString(); - if (!newVersion.equals(version)) - app.setVersion(newVersion); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ConnectorModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ConnectorModuleImpl.java deleted file mode 100644 index 3911066d3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ConnectorModuleImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.ConnectorModule; -import org.eclipse.jst.j2ee.application.Module; - -/** - * Specifies the URI of a resource adapter archive file, relative to the top level of the application package. - */ -public class ConnectorModuleImpl extends ModuleImpl implements ConnectorModule, Module{ - - public ConnectorModuleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getConnectorModule(); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, ApplicationPackage.CONNECTOR_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - return eBasicSetContainer(null, ApplicationPackage.CONNECTOR_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.CONNECTOR_MODULE__URI: - return getUri(); - case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: - return getAltDD(); - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - return getApplication(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.CONNECTOR_MODULE__URI: - setUri((String)newValue); - return; - case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: - setAltDD((String)newValue); - return; - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - setApplication((Application)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.CONNECTOR_MODULE__URI: - setUri(URI_EDEFAULT); - return; - case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: - setAltDD(ALT_DD_EDEFAULT); - return; - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - setApplication((Application)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.CONNECTOR_MODULE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: - return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); - case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: - return getApplication() != null; - } - return eDynamicIsSet(eFeature); - } - -public boolean isConnectorModule() { - return true; -} -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/EjbModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/EjbModuleImpl.java deleted file mode 100644 index 7db74a7ba..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/EjbModuleImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.EjbModule; -import org.eclipse.jst.j2ee.application.Module; - -/** - * Specifies the URI of a ejb-jar, relative to the top level of the application package. - - */ -public class EjbModuleImpl extends ModuleImpl implements EjbModule, Module { - - public EjbModuleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getEjbModule(); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.EJB_MODULE__APPLICATION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, ApplicationPackage.EJB_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.EJB_MODULE__APPLICATION: - return eBasicSetContainer(null, ApplicationPackage.EJB_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case ApplicationPackage.EJB_MODULE__APPLICATION: - return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.EJB_MODULE__URI: - return getUri(); - case ApplicationPackage.EJB_MODULE__ALT_DD: - return getAltDD(); - case ApplicationPackage.EJB_MODULE__APPLICATION: - return getApplication(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.EJB_MODULE__URI: - setUri((String)newValue); - return; - case ApplicationPackage.EJB_MODULE__ALT_DD: - setAltDD((String)newValue); - return; - case ApplicationPackage.EJB_MODULE__APPLICATION: - setApplication((Application)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.EJB_MODULE__URI: - setUri(URI_EDEFAULT); - return; - case ApplicationPackage.EJB_MODULE__ALT_DD: - setAltDD(ALT_DD_EDEFAULT); - return; - case ApplicationPackage.EJB_MODULE__APPLICATION: - setApplication((Application)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.EJB_MODULE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ApplicationPackage.EJB_MODULE__ALT_DD: - return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); - case ApplicationPackage.EJB_MODULE__APPLICATION: - return getApplication() != null; - } - return eDynamicIsSet(eFeature); - } - -public boolean isEjbModule() { - return true; -} -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/JavaClientModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/JavaClientModuleImpl.java deleted file mode 100644 index d81ff6387..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/JavaClientModuleImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.JavaClientModule; -import org.eclipse.jst.j2ee.application.Module; - -/** - * specifies the URI of a java application client module, relative to the top level of the application package. - - */ -public class JavaClientModuleImpl extends ModuleImpl implements JavaClientModule, Module { - - public JavaClientModuleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getJavaClientModule(); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - return eBasicSetContainer(null, ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__URI: - return getUri(); - case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: - return getAltDD(); - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - return getApplication(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__URI: - setUri((String)newValue); - return; - case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: - setAltDD((String)newValue); - return; - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - setApplication((Application)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__URI: - setUri(URI_EDEFAULT); - return; - case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: - setAltDD(ALT_DD_EDEFAULT); - return; - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - setApplication((Application)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.JAVA_CLIENT_MODULE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: - return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); - case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: - return getApplication() != null; - } - return eDynamicIsSet(eFeature); - } - -public boolean isJavaModule() { - return true; -} -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ModuleImpl.java deleted file mode 100644 index 969758a8a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/ModuleImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.Module; - - -/** - * The module element represents a single J2EE module and contains an ejb, java, or web element, which indicates the module type and contains a path to the module file, and an optional alt-dd element, which specifies an optional URI to the post-assembly version of the deployment descriptor. The application deployment descriptor must have one module element for each J2EE module in the application package. - - */ -public class ModuleImpl extends EObjectImpl implements Module, EObject { - - /** - * The default value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected static final String URI_EDEFAULT = null; - - protected static final char FORWARD_SLASH = '/'; - protected static final char BACKWARD_SLASH = '\\'; - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String uri = URI_EDEFAULT; - /** - * The default value of the '{@link #getAltDD() Alt DD}' attribute. - * - * - * @see #getAltDD() - * @generated - * @ordered - */ - protected static final String ALT_DD_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String altDD = ALT_DD_EDEFAULT; - public ModuleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getModule(); - } - -public boolean isConnectorModule() { - return false; -} -/* Returns false by default - * - */ -public boolean isEjbModule() { - return false; -} -/* - * Returns false by default - */ -public boolean isJavaModule() { - return false; -} -/* - * Returns false by default - */ -public boolean isWebModule() { - return false; -} - /** - * @generated This field/method will be replaced during code generation - * Specifies the URI of a module, relative to the top level of the application package. - - */ - public String getUri() { - return uri; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUri(String newUri) { - String oldUri = uri; - uri = newUri; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__URI, oldUri, uri)); - } - - /** - * @generated This field/method will be replaced during code generation - * The alt-dd element specifies an optional URI to the post-assembly version of the deployment descriptor file for a particular J2EE module. The URI must specify the full pathname of the deployment descriptor file relative to the application's root directory. If alt-dd is not specified, the deployer must read the deployment descriptor from the default location and file name required by the respective component specification. - - */ - public String getAltDD() { - return altDD; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAltDD(String newAltDD) { - String oldAltDD = altDD; - altDD = newAltDD; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__ALT_DD, oldAltDD, altDD)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public Application getApplication() { - if (eContainerFeatureID != ApplicationPackage.MODULE__APPLICATION) return null; - return (Application)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setApplication(Application newApplication) { - if (newApplication != eContainer || (eContainerFeatureID != ApplicationPackage.MODULE__APPLICATION && newApplication != null)) { - if (EcoreUtil.isAncestor(this, newApplication)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newApplication != null) - msgs = ((InternalEObject)newApplication).eInverseAdd(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newApplication, ApplicationPackage.MODULE__APPLICATION, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__APPLICATION, newApplication, newApplication)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.MODULE__APPLICATION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, ApplicationPackage.MODULE__APPLICATION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.MODULE__APPLICATION: - return eBasicSetContainer(null, ApplicationPackage.MODULE__APPLICATION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case ApplicationPackage.MODULE__APPLICATION: - return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.MODULE__URI: - return getUri(); - case ApplicationPackage.MODULE__ALT_DD: - return getAltDD(); - case ApplicationPackage.MODULE__APPLICATION: - return getApplication(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.MODULE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ApplicationPackage.MODULE__ALT_DD: - return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); - case ApplicationPackage.MODULE__APPLICATION: - return getApplication() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.MODULE__URI: - setUri((String)newValue); - return; - case ApplicationPackage.MODULE__ALT_DD: - setAltDD((String)newValue); - return; - case ApplicationPackage.MODULE__APPLICATION: - setApplication((Application)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.MODULE__URI: - setUri(URI_EDEFAULT); - return; - case ApplicationPackage.MODULE__ALT_DD: - setAltDD(ALT_DD_EDEFAULT); - return; - case ApplicationPackage.MODULE__APPLICATION: - setApplication((Application)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (uri: "); //$NON-NLS-1$ - result.append(uri); - result.append(", altDD: "); //$NON-NLS-1$ - result.append(altDD); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/WebModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/WebModuleImpl.java deleted file mode 100644 index 6b7342406..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/impl/WebModuleImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.WebModule; - - -/** - * Contains the web-uri and context-root of a web application module. - - */ -public class WebModuleImpl extends ModuleImpl implements WebModule, Module { - - /** - * The default value of the '{@link #getContextRoot() Context Root}' attribute. - * - * - * @see #getContextRoot() - * @generated - * @ordered - */ - protected static final String CONTEXT_ROOT_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String contextRoot = CONTEXT_ROOT_EDEFAULT; - public WebModuleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ApplicationPackage.eINSTANCE.getWebModule(); - } - -public boolean isWebModule() { - return true; -} - /** - * @generated This field/method will be replaced during code generation - * The context-root element specifies the context root of a web application - - */ - public String getContextRoot() { - return contextRoot; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setContextRoot(String newContextRoot) { - String oldContextRoot = contextRoot; - contextRoot = newContextRoot; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.WEB_MODULE__CONTEXT_ROOT, oldContextRoot, contextRoot)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.WEB_MODULE__APPLICATION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, ApplicationPackage.WEB_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ApplicationPackage.WEB_MODULE__APPLICATION: - return eBasicSetContainer(null, ApplicationPackage.WEB_MODULE__APPLICATION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case ApplicationPackage.WEB_MODULE__APPLICATION: - return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.WEB_MODULE__URI: - return getUri(); - case ApplicationPackage.WEB_MODULE__ALT_DD: - return getAltDD(); - case ApplicationPackage.WEB_MODULE__APPLICATION: - return getApplication(); - case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: - return getContextRoot(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.WEB_MODULE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ApplicationPackage.WEB_MODULE__ALT_DD: - return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); - case ApplicationPackage.WEB_MODULE__APPLICATION: - return getApplication() != null; - case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: - return CONTEXT_ROOT_EDEFAULT == null ? contextRoot != null : !CONTEXT_ROOT_EDEFAULT.equals(contextRoot); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.WEB_MODULE__URI: - setUri((String)newValue); - return; - case ApplicationPackage.WEB_MODULE__ALT_DD: - setAltDD((String)newValue); - return; - case ApplicationPackage.WEB_MODULE__APPLICATION: - setApplication((Application)newValue); - return; - case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: - setContextRoot((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ApplicationPackage.WEB_MODULE__URI: - setUri(URI_EDEFAULT); - return; - case ApplicationPackage.WEB_MODULE__ALT_DD: - setAltDD(ALT_DD_EDEFAULT); - return; - case ApplicationPackage.WEB_MODULE__APPLICATION: - setApplication((Application)null); - return; - case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: - setContextRoot(CONTEXT_ROOT_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (contextRoot: "); //$NON-NLS-1$ - result.append(contextRoot); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationAdapterFactory.java deleted file mode 100644 index 306d886d5..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationAdapterFactory.java +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.ConnectorModule; -import org.eclipse.jst.j2ee.application.EjbModule; -import org.eclipse.jst.j2ee.application.JavaClientModule; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.WebModule; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; - - - -public class ApplicationAdapterFactory extends AdapterFactoryImpl { - protected static ApplicationPackage modelPackage; - - public ApplicationAdapterFactory() { - if (modelPackage == null) { - modelPackage = (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - protected ApplicationSwitch sw = new ApplicationSwitch() { - public Object caseApplication(Application object) { - return createApplicationAdapter(); - } - public Object caseModule(Module object) { - return createModuleAdapter(); - } - public Object caseWebModule(WebModule object) { - return createWebModuleAdapter(); - } - public Object caseJavaClientModule(JavaClientModule object) { - return createJavaClientModuleAdapter(); - } - public Object caseEjbModule(EjbModule object) { - return createEjbModuleAdapter(); - } - public Object caseConnectorModule(ConnectorModule object) { - return createConnectorModuleAdapter(); - } - }; - - public Adapter createAdapter(Notifier target) { - return (Adapter)sw.doSwitch((EObject)target); - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createApplicationAdapter() { - return null; - } - - public Adapter createModuleAdapter() { - return null; - } - - public Adapter createWebModuleAdapter() { - return null; - } - - public Adapter createJavaClientModuleAdapter() { - return null; - } - - public Adapter createEjbModuleAdapter() { - return null; - } - - public Adapter createConnectorModuleAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected ApplicationSwitch modelSwitch = - new ApplicationSwitch() { - public Object caseApplication(Application object) { - return createApplicationAdapter(); - } - public Object caseModule(Module object) { - return createModuleAdapter(); - } - public Object caseWebModule(WebModule object) { - return createWebModuleAdapter(); - } - public Object caseJavaClientModule(JavaClientModule object) { - return createJavaClientModuleAdapter(); - } - public Object caseEjbModule(EjbModule object) { - return createEjbModuleAdapter(); - } - public Object caseConnectorModule(ConnectorModule object) { - return createConnectorModuleAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createApplicationAdapterGen() { - - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createModuleAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWebModuleAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createJavaClientModuleAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEjbModuleAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createConnectorModuleAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //ApplicationAdapterFactory - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationSwitch.java deleted file mode 100644 index 390d2ca2e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/application/util/ApplicationSwitch.java +++ /dev/null @@ -1,254 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.application.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.ConnectorModule; -import org.eclipse.jst.j2ee.application.EjbModule; -import org.eclipse.jst.j2ee.application.JavaClientModule; -import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.WebModule; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.application.ApplicationPackage - * @generated - */ -public class ApplicationSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static ApplicationPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public ApplicationSwitch() { - if (modelPackage == null) { - modelPackage = ApplicationPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case ApplicationPackage.APPLICATION: { - Application application = (Application)theEObject; - Object result = caseApplication(application); - if (result == null) result = caseCompatibilityDescriptionGroup(application); - if (result == null) result = caseDescriptionGroup(application); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackage.MODULE: { - Module module = (Module)theEObject; - Object result = caseModule(module); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackage.WEB_MODULE: { - WebModule webModule = (WebModule)theEObject; - Object result = caseWebModule(webModule); - if (result == null) result = caseModule(webModule); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackage.JAVA_CLIENT_MODULE: { - JavaClientModule javaClientModule = (JavaClientModule)theEObject; - Object result = caseJavaClientModule(javaClientModule); - if (result == null) result = caseModule(javaClientModule); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackage.EJB_MODULE: { - EjbModule ejbModule = (EjbModule)theEObject; - Object result = caseEjbModule(ejbModule); - if (result == null) result = caseModule(ejbModule); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackage.CONNECTOR_MODULE: { - ConnectorModule connectorModule = (ConnectorModule)theEObject; - Object result = caseConnectorModule(connectorModule); - if (result == null) result = caseModule(connectorModule); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Application'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Application'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseApplication(Application object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Module'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Module'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseModule(Module object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Module'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Module'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebModule(WebModule object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Java Client Module'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Java Client Module'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJavaClientModule(JavaClientModule object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Ejb Module'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Ejb Module'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEjbModule(EjbModule object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Connector Module'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Connector Module'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseConnectorModule(ConnectorModule object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //ApplicationSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientFactory.java index ddd859479..abdcd9d43 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientFactory.java @@ -21,7 +21,7 @@ public interface ClientFactory extends EFactory{ * * @generated */ - ClientFactory eINSTANCE = new org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl(); + ClientFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientPackage.java index 4e62f927e..42056b1cc 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/ClientPackage.java @@ -176,7 +176,7 @@ public interface ClientPackage extends EPackage{ * * @generated */ - ClientPackage eINSTANCE = org.eclipse.jst.j2ee.client.impl.ClientPackageImpl.init(); + ClientPackage eINSTANCE = org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientImpl.java deleted file mode 100644 index 205ba4663..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientImpl.java +++ /dev/null @@ -1,606 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.common.util.CommonUtil; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; - - -/** - * The application-client element is the root element of an application client deployment descriptor. The application client deployment descriptor describes the EJB components and external resources referenced by the application client. - - */ -public class ApplicationClientImpl extends CompatibilityDescriptionGroupImpl implements ApplicationClient { - - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected static final String VERSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected String version = VERSION_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList resourceRefs = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList environmentProps = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList ejbReferences = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList resourceEnvRefs = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass callbackHandler = null; - /** - * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. - * - * - * @see #getServiceRefs() - * @generated - * @ordered - */ - protected EList serviceRefs = null; - - /** - * The cached value of the '{@link #getMessageDestinationRefs() Message Destination Refs}' containment reference list. - * - * - * @see #getMessageDestinationRefs() - * @generated - * @ordered - */ - protected EList messageDestinationRefs = null; - - /** - * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. - * - * - * @see #getMessageDestinations() - * @generated - * @ordered - */ - protected EList messageDestinations = null; - - public ApplicationClientImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return ClientPackage.eINSTANCE.getApplicationClient(); - } - -/** - * createClassRef - return a JavaURL reference to the named Java class - */ -public JavaClass createClassRef(String targetName) { - return JavaRefFactory.eINSTANCE.createClassRef(targetName); -} -public String getCallbackHandlerClassName() { - getCallbackHandler(); - return (callbackHandler == null) ? null : callbackHandler.getQualifiedName(); -} -/** - * Return boolean indicating if this Application Client was populated from an Application Client 1.2 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_2Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.APP_CLIENT_SYSTEMID_1_2); -} -/** - * Return boolean indicating if this Application client was populated from an Application Client 1.3 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_3Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.APP_CLIENT_SYSTEMID_1_3); -} -/** - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_4Descriptor() { - return version != null && J2EEConstants.J2EE_1_4_TEXT.equals(version); -} -public void setCallbackHandlerClassName(String callbackHandlerClassName) { - eSet(ClientPackage.eINSTANCE.getApplicationClient_CallbackHandler(), createClassRef(callbackHandlerClassName)); -} -/** - *This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ -public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getModuleVersionID(); -} -/** - *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level - */ -public int getJ2EEVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getJ2EEVersionID(); -} - /** - * - * - * @generated - */ - public String getVersion() { - return version; - } - - /** - * - * - * @generated - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClientPackage.APPLICATION_CLIENT__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains declarations of the application clients's references to an external - * resources. - */ - public EList getResourceRefs() { - if (resourceRefs == null) { - resourceRefs = new EObjectContainmentEList(ResourceRef.class, this, ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS); - } - return resourceRefs; - } - - /** - * @generated This field/method will be replaced during code generation - * The env-entry element contains the declaration of an application client's - * environment entries. Each declaration consists of an optional description, the - * name of the environment entry, and an optional value. - */ - public EList getEnvironmentProps() { - if (environmentProps == null) { - environmentProps = new EObjectContainmentEList(EnvEntry.class, this, ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS); - } - return environmentProps; - } - - /** - * @generated This field/method will be replaced during code generation - * Contains a list of ejb-ref elements used for the declaration of a reference to - * an enterprise - * bean's home. - */ - public EList getEjbReferences() { - if (ejbReferences == null) { - ejbReferences = new EObjectContainmentEList(EjbRef.class, this, ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES); - } - return ejbReferences; - } - - /** - * @generated This field/method will be replaced during code generation - * The resource-env-ref element contains a declaration of an application client's - * reference to an administered object associated with a resource in the - * application client's environment. It consists of an optional - * description, the resource environment reference name, and an indication of the - * resource environment reference type expected by the application client code. - * - * Used in: application-client - * - * Example: - * - * - * jms//StockQueue - * javax.jms.Queue - * - - */ - public EList getResourceEnvRefs() { - if (resourceEnvRefs == null) { - resourceEnvRefs = new EObjectContainmentEList(ResourceEnvRef.class, this, ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS); - } - return resourceEnvRefs; - } - - /** - * @generated This field/method will be replaced during code generation - * A class provided by the application. The class must have a no args constructor and must implement the javax.security.auth.callback.CallbackHandler interface. The class will be instantiated by the application client container and used by the container to collect authentication information from the user. - */ - public JavaClass getCallbackHandler() { - if (callbackHandler != null && callbackHandler.eIsProxy()) { - JavaClass oldCallbackHandler = callbackHandler; - callbackHandler = (JavaClass)eResolveProxy((InternalEObject)callbackHandler); - if (callbackHandler != oldCallbackHandler) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER, oldCallbackHandler, callbackHandler)); - } - } - return callbackHandler; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetCallbackHandler() { - return callbackHandler; - } - - /** - */ - public void setCallbackHandler(JavaClass newCallbackHandler) { - if ((callbackHandler == null || callbackHandler.getQualifiedName() == null) - && (newCallbackHandler == null || newCallbackHandler.getQualifiedName() == null)) { - return; - } - JavaClass oldCallbackHandler = callbackHandler; - callbackHandler = newCallbackHandler; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER, oldCallbackHandler, callbackHandler)); - } - - /** - * - * - * @generated - */ - public EList getServiceRefs() { - if (serviceRefs == null) { - serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, ClientPackage.APPLICATION_CLIENT__SERVICE_REFS); - } - return serviceRefs; - } - - /** - * - * - * @generated - */ - public EList getMessageDestinationRefs() { - if (messageDestinationRefs == null) { - messageDestinationRefs = new EObjectContainmentEList(MessageDestinationRef.class, this, ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS); - } - return messageDestinationRefs; - } - - /** - * - * - * @generated - */ - public EList getMessageDestinations() { - if (messageDestinations == null) { - messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS); - } - return messageDestinations; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case ClientPackage.APPLICATION_CLIENT__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: - return ((InternalEList)getEnvironmentProps()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: - return ((InternalEList)getEjbReferences()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: - return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ClientPackage.APPLICATION_CLIENT__ICONS: - return getIcons(); - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: - return getDisplayNames(); - case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: - return getDescriptions(); - case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: - return getSmallIcon(); - case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: - return getLargeIcon(); - case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: - return getDescription(); - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: - return getDisplayName(); - case ClientPackage.APPLICATION_CLIENT__VERSION: - return getVersion(); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: - return getResourceRefs(); - case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: - return getEnvironmentProps(); - case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: - return getEjbReferences(); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: - if (resolve) return getCallbackHandler(); - return basicGetCallbackHandler(); - case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: - return getServiceRefs(); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: - return getMessageDestinations(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ClientPackage.APPLICATION_CLIENT__ICONS: - return icons != null && !icons.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case ClientPackage.APPLICATION_CLIENT__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: - return environmentProps != null && !environmentProps.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: - return ejbReferences != null && !ejbReferences.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: - return callbackHandler != null; - case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: - return messageDestinations != null && !messageDestinations.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ClientPackage.APPLICATION_CLIENT__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: - setDescription((String)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__VERSION: - setVersion((String)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: - getEnvironmentProps().clear(); - getEnvironmentProps().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: - getEjbReferences().clear(); - getEjbReferences().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: - setCallbackHandler((JavaClass)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - getMessageDestinations().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case ClientPackage.APPLICATION_CLIENT__ICONS: - getIcons().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: - getDescriptions().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case ClientPackage.APPLICATION_CLIENT__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: - getEnvironmentProps().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: - getEjbReferences().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: - setCallbackHandler((JavaClass)null); - return; - case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: - getServiceRefs().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (version: "); //$NON-NLS-1$ - result.append(version); - result.append(')'); - return result.toString(); - } - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceFactory.java deleted file mode 100644 index 4e3ee891e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.impl; - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -public class ApplicationClientResourceFactory extends TranslatorResourceFactory { - - /** - * Method registerDtds. - */ - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SYSTEMID_1_2, "application-client_1_2.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SYSTEMID_1_3, "application-client_1_3.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SCHEMA_LOC_1_4, "application-client_1_4.xsd"); //$NON-NLS-1$ - - } - - /** - * Constructor for ApplicationClientResourceFactory. - * @param aRendererFactory - */ - public ApplicationClientResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - - /** - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(URI, Renderer) - */ - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new ApplicationClientResourceImpl(uri, aRenderer); - } - - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(aRendererFactory)); - } - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.APP_CLIENT_DD_URI_OBJ); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceImpl.java deleted file mode 100644 index e549baced..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ApplicationClientResourceImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.impl; - - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ApplicationClientResource; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.model.translator.client.ApplicationClientTranslator; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - -public class ApplicationClientResourceImpl extends XMLResourceImpl implements ApplicationClientResource { - /** - * Constructor for ApplicationClientResourceImpl. - * @param uri - * @param aRenderer - */ - public ApplicationClientResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - /** - * Constructor for ApplicationClientResourceImpl. - * @param aRenderer - */ - public ApplicationClientResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /** - * Return the first element in the EList. - */ - public ApplicationClient getApplicationClient() { - return (ApplicationClient) getRootObject(); - } - - - public int getType() { - return APP_CLIENT_TYPE; - } - - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.APP_CLIENT_SYSTEMID_1_2; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.APP_CLIENT_SYSTEMID_1_3; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.APP_CLIENT_PUBLICID_1_2; - } - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.APP_CLIENT_PUBLICID_1_3; - } - - - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.APP_CLIENT_DOCTYPE; - default : - return null; - } - } - - /** - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return ApplicationClientTranslator.INSTANCE; - } - - /* App client version is always the same as the J2EE version - */ - public int getJ2EEVersionID() { - return getModuleVersionID(); - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (J2EE_1_4_ID) : - super.setDoctypeValues(null, null); - break; - case (J2EE_1_3_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (J2EE_1_2_ID) : - super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version(Same as J2EE Version for App client) - */ - public void setJ2EEVersionID(int id) { - primSetVersionID(id); - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - } - syncVersionOfRootObject(); - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - ApplicationClient clt = getApplicationClient(); - if (clt == null) - return; - - String version = clt.getVersion(); - String newVersion = getModuleVersionString(); - if (!newVersion.equals(version)) - clt.setVersion(newVersion); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientFactoryImpl.java deleted file mode 100644 index c89529706..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientFactoryImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ClientFactory; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.ResAuthApplicationType; - -/** - * @generated - */ -public class ClientFactoryImpl extends EFactoryImpl implements ClientFactory{ - - public ClientFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ClientPackage.APPLICATION_CLIENT: return createApplicationClient(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case ClientPackage.RES_AUTH_APPLICATION_TYPE: - return ResAuthApplicationType.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case ClientPackage.RES_AUTH_APPLICATION_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - -public static ClientFactory getActiveFactory() { - return (ClientFactory) getPackage().getEFactoryInstance(); -} - /** - * @generated This field/method will be replaced during code generation. - */ - public ApplicationClient createApplicationClient() { - ApplicationClientImpl applicationClient = new ApplicationClientImpl(); - return applicationClient; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ClientPackage getClientPackage() { - return (ClientPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static ClientPackage getPackage() { - return ClientPackage.eINSTANCE; - } -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientPackageImpl.java deleted file mode 100644 index e840d087f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/impl/ClientPackageImpl.java +++ /dev/null @@ -1,321 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ClientFactory; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.ResAuthApplicationType; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.internal.J2EEInit; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class ClientPackageImpl extends EPackageImpl implements ClientPackage, EPackage { - /** - * - * - * @generated - */ - private EClass applicationClientEClass = null; - - /** - * - * - * @generated - */ - private EEnum resAuthApplicationTypeEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private ClientPackageImpl() { - super(eNS_URI, ClientFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static ClientPackage init() { - if (isInited) return (ClientPackage)EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI); - - // Obtain or create and register package. - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ClientPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - // init J2EE in case its not already initialized... - J2EEInit.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); - - // Step 1: create meta-model objects - theClientPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theClientPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theClientPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getApplicationClient() { - return applicationClientEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getApplicationClient_Version() { - return (EAttribute)applicationClientEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplicationClient_ResourceRefs() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplicationClient_EnvironmentProps() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplicationClient_EjbReferences() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplicationClient_ResourceEnvRefs() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getApplicationClient_CallbackHandler() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getApplicationClient_ServiceRefs() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getApplicationClient_MessageDestinationRefs() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EReference getApplicationClient_MessageDestinations() { - return (EReference)applicationClientEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EEnum getResAuthApplicationType() { - return resAuthApplicationTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ClientFactory getClientFactory() { - return (ClientFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - applicationClientEClass = createEClass(APPLICATION_CLIENT); - createEAttribute(applicationClientEClass, APPLICATION_CLIENT__VERSION); - createEReference(applicationClientEClass, APPLICATION_CLIENT__RESOURCE_REFS); - createEReference(applicationClientEClass, APPLICATION_CLIENT__ENVIRONMENT_PROPS); - createEReference(applicationClientEClass, APPLICATION_CLIENT__EJB_REFERENCES); - createEReference(applicationClientEClass, APPLICATION_CLIENT__RESOURCE_ENV_REFS); - createEReference(applicationClientEClass, APPLICATION_CLIENT__CALLBACK_HANDLER); - createEReference(applicationClientEClass, APPLICATION_CLIENT__SERVICE_REFS); - createEReference(applicationClientEClass, APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS); - createEReference(applicationClientEClass, APPLICATION_CLIENT__MESSAGE_DESTINATIONS); - - // Create enums - resAuthApplicationTypeEEnum = createEEnum(RES_AUTH_APPLICATION_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); - - // Add supertypes to classes - applicationClientEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(applicationClientEClass, ApplicationClient.class, "ApplicationClient", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getApplicationClient_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_ResourceRefs(), theCommonPackage.getResourceRef(), null, "resourceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_EnvironmentProps(), theCommonPackage.getEnvEntry(), null, "environmentProps", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_EjbReferences(), theCommonPackage.getEjbRef(), null, "ejbReferences", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_ResourceEnvRefs(), theCommonPackage.getResourceEnvRef(), null, "resourceEnvRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_CallbackHandler(), theJavaRefPackage.getJavaClass(), null, "callbackHandler", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_ServiceRefs(), theWebservice_clientPackage.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_MessageDestinationRefs(), theCommonPackage.getMessageDestinationRef(), null, "messageDestinationRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getApplicationClient_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(resAuthApplicationTypeEEnum, ResAuthApplicationType.class, "ResAuthApplicationType"); //$NON-NLS-1$ - addEEnumLiteral(resAuthApplicationTypeEEnum, ResAuthApplicationType.APPLICATION_LITERAL); - addEEnumLiteral(resAuthApplicationTypeEEnum, ResAuthApplicationType.CONTAINER_LITERAL); - - // Create resource - createResource(eNS_URI); - } -} //ClientPackageImpl - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientAdapterFactory.java deleted file mode 100644 index 71a357cc3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientAdapterFactory.java +++ /dev/null @@ -1,158 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; - - - -public class ClientAdapterFactory extends AdapterFactoryImpl { - protected static ClientPackage modelPackage; - - public ClientAdapterFactory() { - if (modelPackage == null) { - modelPackage = (ClientPackage)EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - protected ClientSwitch sw = new ClientSwitch() { - public Object caseApplicationClient(ApplicationClient object) { - return createApplicationClientAdapter(); - } - }; - - public Adapter createAdapter(Notifier target) { - return (Adapter)sw.doSwitch((EObject)target); - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createApplicationClientAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected ClientSwitch modelSwitch = - new ClientSwitch() { - public Object caseApplicationClient(ApplicationClient object) { - return createApplicationClientAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createApplicationClientAdapterGen() { - - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //ClientAdapterFactory - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientSwitch.java deleted file mode 100644 index c408702eb..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/client/util/ClientSwitch.java +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.client.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.client.ClientPackage - * @generated - */ -public class ClientSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static ClientPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public ClientSwitch() { - if (modelPackage == null) { - modelPackage = ClientPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case ClientPackage.APPLICATION_CLIENT: { - ApplicationClient applicationClient = (ApplicationClient)theEObject; - Object result = caseApplicationClient(applicationClient); - if (result == null) result = caseCompatibilityDescriptionGroup(applicationClient); - if (result == null) result = caseDescriptionGroup(applicationClient); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Application Client'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Application Client'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseApplicationClient(ApplicationClient object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //ClientSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonFactory.java index c452ae644..bdf88055c 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonFactory.java @@ -27,7 +27,7 @@ public interface CommonFactory extends EFactory{ * * @generated */ - CommonFactory eINSTANCE = new org.eclipse.jst.j2ee.common.impl.CommonFactoryImpl(); + CommonFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.common.impl.CommonFactoryImpl(); /** * Returns a new object of class 'Ejb Ref'. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonPackage.java index 589739e47..8d1739e7a 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/CommonPackage.java @@ -1234,7 +1234,7 @@ public interface CommonPackage extends EPackage{ * * @generated */ - CommonPackage eINSTANCE = org.eclipse.jst.j2ee.common.impl.CommonPackageImpl.init(); + CommonPackage eINSTANCE = org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/J2EEXMIResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/J2EEXMIResourceFactory.java index ca6a101aa..b95c677a1 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/J2EEXMIResourceFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/J2EEXMIResourceFactory.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.common; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.wst.common.internal.emf.resource.CompatibilityResourceFactory; diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonFactoryImpl.java deleted file mode 100644 index 5d08caf1e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonFactoryImpl.java +++ /dev/null @@ -1,369 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EjbRefType; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.EnvEntryType; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.Identity; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.ResAuthTypeBase; -import org.eclipse.jst.j2ee.common.ResSharingScopeType; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.UseCallerIdentity; - - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory { - /** - * Creates and instance of the factory. - * - * - * @generated - */ - public CommonFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case CommonPackage.EJB_REF: return createEjbRef(); - case CommonPackage.ENV_ENTRY: return createEnvEntry(); - case CommonPackage.RESOURCE_REF: return createResourceRef(); - case CommonPackage.SECURITY_ROLE_REF: return createSecurityRoleRef(); - case CommonPackage.SECURITY_ROLE: return createSecurityRole(); - case CommonPackage.RESOURCE_ENV_REF: return createResourceEnvRef(); - case CommonPackage.EJB_LOCAL_REF: return createEJBLocalRef(); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY: return createRunAsSpecifiedIdentity(); - case CommonPackage.IDENTITY: return createIdentity(); - case CommonPackage.ICON_TYPE: return createIconType(); - case CommonPackage.DISPLAY_NAME: return createDisplayName(); - case CommonPackage.MESSAGE_DESTINATION_REF: return createMessageDestinationRef(); - case CommonPackage.MESSAGE_DESTINATION: return createMessageDestination(); - case CommonPackage.PARAM_VALUE: return createParamValue(); - case CommonPackage.DESCRIPTION_GROUP: return createDescriptionGroup(); - case CommonPackage.SECURITY_IDENTITY: return createSecurityIdentity(); - case CommonPackage.USE_CALLER_IDENTITY: return createUseCallerIdentity(); - case CommonPackage.DESCRIPTION: return createDescription(); - case CommonPackage.QNAME: return createQName(); - case CommonPackage.LISTENER: return createListener(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP: return createCompatibilityDescriptionGroup(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case CommonPackage.ENV_ENTRY_TYPE: - return EnvEntryType.get(initialValue); - case CommonPackage.RES_AUTH_TYPE_BASE: - return ResAuthTypeBase.get(initialValue); - case CommonPackage.EJB_REF_TYPE: - return EjbRefType.get(initialValue); - case CommonPackage.RES_SHARING_SCOPE_TYPE: - return ResSharingScopeType.get(initialValue); - case CommonPackage.MESSAGE_DESTINATION_USAGE_TYPE: - return MessageDestinationUsageType.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case CommonPackage.ENV_ENTRY_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case CommonPackage.RES_AUTH_TYPE_BASE: - return instanceValue == null ? null : instanceValue.toString(); - case CommonPackage.EJB_REF_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case CommonPackage.RES_SHARING_SCOPE_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case CommonPackage.MESSAGE_DESTINATION_USAGE_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public EjbRef createEjbRef() { - EjbRefImpl ejbRef = new EjbRefImpl(); - return ejbRef; - } - - /** - * - * - * @generated - */ - public EnvEntry createEnvEntry() { - EnvEntryImpl envEntry = new EnvEntryImpl(); - return envEntry; - } - - /** - * - * - * @generated - */ - public ResourceRef createResourceRef() { - ResourceRefImpl resourceRef = new ResourceRefImpl(); - return resourceRef; - } - - /** - * - * - * @generated - */ - public SecurityRoleRef createSecurityRoleRef() { - SecurityRoleRefImpl securityRoleRef = new SecurityRoleRefImpl(); - return securityRoleRef; - } - - /** - * - * - * @generated - */ - public SecurityRole createSecurityRole() { - SecurityRoleImpl securityRole = new SecurityRoleImpl(); - return securityRole; - } - - /** - * - * - * @generated - */ - public ResourceEnvRef createResourceEnvRef() { - ResourceEnvRefImpl resourceEnvRef = new ResourceEnvRefImpl(); - return resourceEnvRef; - } - - /** - * - * - * @generated - */ - public EJBLocalRef createEJBLocalRef() { - EJBLocalRefImpl ejbLocalRef = new EJBLocalRefImpl(); - return ejbLocalRef; - } - - /** - * - * - * @generated - */ - public RunAsSpecifiedIdentity createRunAsSpecifiedIdentity() { - RunAsSpecifiedIdentityImpl runAsSpecifiedIdentity = new RunAsSpecifiedIdentityImpl(); - return runAsSpecifiedIdentity; - } - - /** - * - * - * @generated - */ - public Identity createIdentity() { - IdentityImpl identity = new IdentityImpl(); - return identity; - } - - /** - * - * - * @generated - */ - public IconType createIconType() { - IconTypeImpl iconType = new IconTypeImpl(); - return iconType; - } - - /** - * - * - * @generated - */ - public DisplayName createDisplayName() { - DisplayNameImpl displayName = new DisplayNameImpl(); - return displayName; - } - - /** - * - * - * @generated - */ - public MessageDestinationRef createMessageDestinationRef() { - MessageDestinationRefImpl messageDestinationRef = new MessageDestinationRefImpl(); - return messageDestinationRef; - } - - /** - * - * - * @generated - */ - public MessageDestination createMessageDestination() { - MessageDestinationImpl messageDestination = new MessageDestinationImpl(); - return messageDestination; - } - - /** - * - * - * @generated - */ - public ParamValue createParamValue() { - ParamValueImpl paramValue = new ParamValueImpl(); - return paramValue; - } - - /** - * - * - * @generated - */ - public DescriptionGroup createDescriptionGroup() { - DescriptionGroupImpl descriptionGroup = new DescriptionGroupImpl(); - return descriptionGroup; - } - - /** - * - * - * @generated - */ - public SecurityIdentity createSecurityIdentity() { - SecurityIdentityImpl securityIdentity = new SecurityIdentityImpl(); - return securityIdentity; - } - - /** - * - * - * @generated - */ - public UseCallerIdentity createUseCallerIdentity() { - UseCallerIdentityImpl useCallerIdentity = new UseCallerIdentityImpl(); - return useCallerIdentity; - } - - /** - * - * - * @generated - */ - public Description createDescription() { - DescriptionImpl description = new DescriptionImpl(); - return description; - } - - /** - * - * - * @generated - */ - public QName createQName() { - QNameImpl qName = new QNameImpl(); - return qName; - } - - /** - * - * - * @generated - */ - public Listener createListener() { - ListenerImpl listener = new ListenerImpl(); - return listener; - } - - /** - * - * - * @generated - */ - public CompatibilityDescriptionGroup createCompatibilityDescriptionGroup() { - CompatibilityDescriptionGroupImpl compatibilityDescriptionGroup = new CompatibilityDescriptionGroupImpl(); - return compatibilityDescriptionGroup; - } - - /** - * - * - * @generated - */ - public CommonPackage getCommonPackage() { - return (CommonPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static CommonPackage getPackage() { - return CommonPackage.eINSTANCE; - } -} //CommonFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonPackageImpl.java deleted file mode 100644 index 7567787d5..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CommonPackageImpl.java +++ /dev/null @@ -1,1502 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EjbRefType; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.EnvEntryType; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.Identity; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.ResAuthTypeBase; -import org.eclipse.jst.j2ee.common.ResSharingScopeType; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.UseCallerIdentity; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class CommonPackageImpl extends EPackageImpl implements CommonPackage, EPackage { - /** - * - * - * @generated - */ - private EClass ejbRefEClass = null; - - /** - * - * - * @generated - */ - private EClass envEntryEClass = null; - - /** - * - * - * @generated - */ - private EClass resourceRefEClass = null; - - /** - * - * - * @generated - */ - private EClass securityRoleRefEClass = null; - - /** - * - * - * @generated - */ - private EClass securityRoleEClass = null; - - /** - * - * - * @generated - */ - private EClass resourceEnvRefEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbLocalRefEClass = null; - - /** - * - * - * @generated - */ - private EClass runAsSpecifiedIdentityEClass = null; - - /** - * - * - * @generated - */ - private EClass securityIdentityEClass = null; - - /** - * - * - * @generated - */ - private EClass identityEClass = null; - - /** - * - * - * @generated - */ - private EClass iconTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass displayNameEClass = null; - - /** - * - * - * @generated - */ - private EClass messageDestinationRefEClass = null; - - /** - * - * - * @generated - */ - private EClass messageDestinationEClass = null; - - /** - * - * - * @generated - */ - private EClass paramValueEClass = null; - - /** - * - * - * @generated - */ - private EClass descriptionGroupEClass = null; - - /** - * - * - * @generated - */ - private EClass jndiEnvRefsGroupEClass = null; - - /** - * - * - * @generated - */ - private EClass useCallerIdentityEClass = null; - - /** - * - * - * @generated - */ - private EClass descriptionEClass = null; - - /** - * - * - * @generated - */ - private EClass qNameEClass = null; - - /** - * - * - * @generated - */ - private EClass listenerEClass = null; - - /** - * - * - * @generated - */ - private EClass compatibilityDescriptionGroupEClass = null; - - /** - * - * - * @generated - */ - private EEnum envEntryTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum resAuthTypeBaseEEnum = null; - - /** - * - * - * @generated - */ - private EEnum ejbRefTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum resSharingScopeTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum messageDestinationUsageTypeEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private CommonPackageImpl() { - super(eNS_URI, CommonFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static CommonPackage init() { - if (isInited) return (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - - // Obtain or create and register package. - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new CommonPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); - - // Step 1: create meta-model objects - theCommonPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - - // Step 2: complete initialization - theCommonPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - - return theCommonPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSecurityRole() { - return securityRoleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityRole_Description() { - return (EAttribute)securityRoleEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityRole_RoleName() { - return (EAttribute)securityRoleEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getSecurityRole_Descriptions() { - return (EReference)securityRoleEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getResourceRef() { - return resourceRefEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_Description() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_Name() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_Type() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_Auth() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_Link() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceRef_ResSharingScope() { - return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getResourceRef_Descriptions() { - return (EReference)resourceRefEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEjbRef() { - return ejbRefEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Name() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Type() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Home() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Remote() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Link() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEjbRef_Description() { - return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getEjbRef_Descriptions() { - return (EReference)ejbRefEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEJBLocalRef() { - return ejbLocalRefEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getEJBLocalRef_LocalHome() { - return (EAttribute)ejbLocalRefEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getEJBLocalRef_Local() { - return (EAttribute)ejbLocalRefEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEnvEntry() { - return envEntryEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEnvEntry_Description() { - return (EAttribute)envEntryEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEnvEntry_Name() { - return (EAttribute)envEntryEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEnvEntry_Value() { - return (EAttribute)envEntryEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEnvEntry_Type() { - return (EAttribute)envEntryEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getEnvEntry_Descriptions() { - return (EReference)envEntryEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSecurityRoleRef() { - return securityRoleRefEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityRoleRef_Name() { - return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityRoleRef_Description() { - return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityRoleRef_Link() { - return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getSecurityRoleRef_Descriptions() { - return (EReference)securityRoleRefEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getRunAsSpecifiedIdentity() { - return runAsSpecifiedIdentityEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getRunAsSpecifiedIdentity_Identity() { - return (EReference)runAsSpecifiedIdentityEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSecurityIdentity() { - return securityIdentityEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityIdentity_Description() { - return (EAttribute)securityIdentityEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSecurityIdentity_Descriptions() { - return (EReference)securityIdentityEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getUseCallerIdentity() { - return useCallerIdentityEClass; - } - - /** - * - * - * @generated - */ - public EClass getDescription() { - return descriptionEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getDescription_Lang() { - return (EAttribute)descriptionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDescription_Value() { - return (EAttribute)descriptionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getQName() { - return qNameEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getQName_NamespaceURI() { - return (EAttribute)qNameEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getQName_LocalPart() { - return (EAttribute)qNameEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getQName_CombinedQName() { - return (EAttribute)qNameEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getQName_InternalPrefixOrNsURI() { - return (EAttribute)qNameEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getListener() { - return listenerEClass; - } - - /** - * - * - * @generated - */ - public EReference getListener_ListenerClass() { - return (EReference)listenerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getCompatibilityDescriptionGroup() { - return compatibilityDescriptionGroupEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getCompatibilityDescriptionGroup_SmallIcon() { - return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getCompatibilityDescriptionGroup_LargeIcon() { - return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getCompatibilityDescriptionGroup_Description() { - return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getCompatibilityDescriptionGroup_DisplayName() { - return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getIdentity() { - return identityEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getIdentity_Description() { - return (EAttribute)identityEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getIdentity_RoleName() { - return (EAttribute)identityEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getIdentity_Descriptions() { - return (EReference)identityEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getIconType() { - return iconTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getIconType_SmallIcon() { - return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getIconType_LargeIcon() { - return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getIconType_Lang() { - return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getDisplayName() { - return displayNameEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getDisplayName_Lang() { - return (EAttribute)displayNameEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDisplayName_Value() { - return (EAttribute)displayNameEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getMessageDestinationRef() { - return messageDestinationRefEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDestinationRef_Name() { - return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDestinationRef_Type() { - return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDestinationRef_Usage() { - return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDestinationRef_Link() { - return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getMessageDestinationRef_Descriptions() { - return (EReference)messageDestinationRefEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getMessageDestination() { - return messageDestinationEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDestination_Name() { - return (EAttribute)messageDestinationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getParamValue() { - return paramValueEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getParamValue_Name() { - return (EAttribute)paramValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getParamValue_Value() { - return (EAttribute)paramValueEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getParamValue_Description() { - return (EAttribute)paramValueEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getParamValue_Descriptions() { - return (EReference)paramValueEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getDescriptionGroup() { - return descriptionGroupEClass; - } - - /** - * - * - * @generated - */ - public EReference getDescriptionGroup_Icons() { - return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getDescriptionGroup_DisplayNames() { - return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getDescriptionGroup_Descriptions() { - return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getJNDIEnvRefsGroup() { - return jndiEnvRefsGroupEClass; - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_EnvironmentProperties() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_ResourceRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_EjbRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_ResourceEnvRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_EjbLocalRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_MessageDestinationRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getJNDIEnvRefsGroup_ServiceRefs() { - return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getResourceEnvRef() { - return resourceEnvRefEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceEnvRef_Description() { - return (EAttribute)resourceEnvRefEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceEnvRef_Name() { - return (EAttribute)resourceEnvRefEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getResourceEnvRef_Type() { - return (EReference)resourceEnvRefEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getResourceEnvRef_Descriptions() { - return (EReference)resourceEnvRefEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getEjbRefType() { - return ejbRefTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getEnvEntryType() { - return envEntryTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getResAuthTypeBase() { - return resAuthTypeBaseEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getResSharingScopeType() { - return resSharingScopeTypeEEnum; - } - - /** - * - * - * @generated - */ - public EEnum getMessageDestinationUsageType() { - return messageDestinationUsageTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public CommonFactory getCommonFactory() { - return (CommonFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - ejbRefEClass = createEClass(EJB_REF); - createEAttribute(ejbRefEClass, EJB_REF__NAME); - createEAttribute(ejbRefEClass, EJB_REF__TYPE); - createEAttribute(ejbRefEClass, EJB_REF__HOME); - createEAttribute(ejbRefEClass, EJB_REF__REMOTE); - createEAttribute(ejbRefEClass, EJB_REF__LINK); - createEAttribute(ejbRefEClass, EJB_REF__DESCRIPTION); - createEReference(ejbRefEClass, EJB_REF__DESCRIPTIONS); - - envEntryEClass = createEClass(ENV_ENTRY); - createEAttribute(envEntryEClass, ENV_ENTRY__DESCRIPTION); - createEAttribute(envEntryEClass, ENV_ENTRY__NAME); - createEAttribute(envEntryEClass, ENV_ENTRY__VALUE); - createEAttribute(envEntryEClass, ENV_ENTRY__TYPE); - createEReference(envEntryEClass, ENV_ENTRY__DESCRIPTIONS); - - resourceRefEClass = createEClass(RESOURCE_REF); - createEAttribute(resourceRefEClass, RESOURCE_REF__DESCRIPTION); - createEAttribute(resourceRefEClass, RESOURCE_REF__NAME); - createEAttribute(resourceRefEClass, RESOURCE_REF__TYPE); - createEAttribute(resourceRefEClass, RESOURCE_REF__AUTH); - createEAttribute(resourceRefEClass, RESOURCE_REF__LINK); - createEAttribute(resourceRefEClass, RESOURCE_REF__RES_SHARING_SCOPE); - createEReference(resourceRefEClass, RESOURCE_REF__DESCRIPTIONS); - - securityRoleRefEClass = createEClass(SECURITY_ROLE_REF); - createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__NAME); - createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__DESCRIPTION); - createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__LINK); - createEReference(securityRoleRefEClass, SECURITY_ROLE_REF__DESCRIPTIONS); - - securityRoleEClass = createEClass(SECURITY_ROLE); - createEAttribute(securityRoleEClass, SECURITY_ROLE__DESCRIPTION); - createEAttribute(securityRoleEClass, SECURITY_ROLE__ROLE_NAME); - createEReference(securityRoleEClass, SECURITY_ROLE__DESCRIPTIONS); - - resourceEnvRefEClass = createEClass(RESOURCE_ENV_REF); - createEAttribute(resourceEnvRefEClass, RESOURCE_ENV_REF__DESCRIPTION); - createEAttribute(resourceEnvRefEClass, RESOURCE_ENV_REF__NAME); - createEReference(resourceEnvRefEClass, RESOURCE_ENV_REF__TYPE); - createEReference(resourceEnvRefEClass, RESOURCE_ENV_REF__DESCRIPTIONS); - - ejbLocalRefEClass = createEClass(EJB_LOCAL_REF); - createEAttribute(ejbLocalRefEClass, EJB_LOCAL_REF__LOCAL_HOME); - createEAttribute(ejbLocalRefEClass, EJB_LOCAL_REF__LOCAL); - - runAsSpecifiedIdentityEClass = createEClass(RUN_AS_SPECIFIED_IDENTITY); - createEReference(runAsSpecifiedIdentityEClass, RUN_AS_SPECIFIED_IDENTITY__IDENTITY); - - identityEClass = createEClass(IDENTITY); - createEAttribute(identityEClass, IDENTITY__DESCRIPTION); - createEAttribute(identityEClass, IDENTITY__ROLE_NAME); - createEReference(identityEClass, IDENTITY__DESCRIPTIONS); - - iconTypeEClass = createEClass(ICON_TYPE); - createEAttribute(iconTypeEClass, ICON_TYPE__SMALL_ICON); - createEAttribute(iconTypeEClass, ICON_TYPE__LARGE_ICON); - createEAttribute(iconTypeEClass, ICON_TYPE__LANG); - - displayNameEClass = createEClass(DISPLAY_NAME); - createEAttribute(displayNameEClass, DISPLAY_NAME__LANG); - createEAttribute(displayNameEClass, DISPLAY_NAME__VALUE); - - messageDestinationRefEClass = createEClass(MESSAGE_DESTINATION_REF); - createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__NAME); - createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__TYPE); - createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__USAGE); - createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__LINK); - createEReference(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__DESCRIPTIONS); - - messageDestinationEClass = createEClass(MESSAGE_DESTINATION); - createEAttribute(messageDestinationEClass, MESSAGE_DESTINATION__NAME); - - paramValueEClass = createEClass(PARAM_VALUE); - createEAttribute(paramValueEClass, PARAM_VALUE__NAME); - createEAttribute(paramValueEClass, PARAM_VALUE__VALUE); - createEAttribute(paramValueEClass, PARAM_VALUE__DESCRIPTION); - createEReference(paramValueEClass, PARAM_VALUE__DESCRIPTIONS); - - descriptionGroupEClass = createEClass(DESCRIPTION_GROUP); - createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__ICONS); - createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__DISPLAY_NAMES); - createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__DESCRIPTIONS); - - jndiEnvRefsGroupEClass = createEClass(JNDI_ENV_REFS_GROUP); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__RESOURCE_REFS); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__EJB_REFS); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS); - createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__SERVICE_REFS); - - securityIdentityEClass = createEClass(SECURITY_IDENTITY); - createEAttribute(securityIdentityEClass, SECURITY_IDENTITY__DESCRIPTION); - createEReference(securityIdentityEClass, SECURITY_IDENTITY__DESCRIPTIONS); - - useCallerIdentityEClass = createEClass(USE_CALLER_IDENTITY); - - descriptionEClass = createEClass(DESCRIPTION); - createEAttribute(descriptionEClass, DESCRIPTION__LANG); - createEAttribute(descriptionEClass, DESCRIPTION__VALUE); - - qNameEClass = createEClass(QNAME); - createEAttribute(qNameEClass, QNAME__NAMESPACE_URI); - createEAttribute(qNameEClass, QNAME__LOCAL_PART); - createEAttribute(qNameEClass, QNAME__COMBINED_QNAME); - createEAttribute(qNameEClass, QNAME__INTERNAL_PREFIX_OR_NS_URI); - - listenerEClass = createEClass(LISTENER); - createEReference(listenerEClass, LISTENER__LISTENER_CLASS); - - compatibilityDescriptionGroupEClass = createEClass(COMPATIBILITY_DESCRIPTION_GROUP); - createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON); - createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON); - createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION); - createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME); - - // Create enums - envEntryTypeEEnum = createEEnum(ENV_ENTRY_TYPE); - resAuthTypeBaseEEnum = createEEnum(RES_AUTH_TYPE_BASE); - ejbRefTypeEEnum = createEEnum(EJB_REF_TYPE); - resSharingScopeTypeEEnum = createEEnum(RES_SHARING_SCOPE_TYPE); - messageDestinationUsageTypeEEnum = createEEnum(MESSAGE_DESTINATION_USAGE_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); - - // Add supertypes to classes - ejbLocalRefEClass.getESuperTypes().add(this.getEjbRef()); - runAsSpecifiedIdentityEClass.getESuperTypes().add(this.getSecurityIdentity()); - messageDestinationEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); - jndiEnvRefsGroupEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); - useCallerIdentityEClass.getESuperTypes().add(this.getSecurityIdentity()); - listenerEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); - compatibilityDescriptionGroupEClass.getESuperTypes().add(this.getDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(ejbRefEClass, EjbRef.class, "EjbRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEjbRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEjbRef_Type(), this.getEjbRefType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEjbRef_Home(), ecorePackage.getEString(), "home", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEjbRef_Remote(), ecorePackage.getEString(), "remote", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEjbRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEjbRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEjbRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(envEntryEClass, EnvEntry.class, "EnvEntry", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEnvEntry_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEnvEntry_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEnvEntry_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEnvEntry_Type(), this.getEnvEntryType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnvEntry_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(resourceRefEClass, ResourceRef.class, "ResourceRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getResourceRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceRef_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceRef_Auth(), this.getResAuthTypeBase(), "auth", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceRef_ResSharingScope(), this.getResSharingScopeType(), "resSharingScope", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getResourceRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(securityRoleRefEClass, SecurityRoleRef.class, "SecurityRoleRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getSecurityRoleRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getSecurityRoleRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getSecurityRoleRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getSecurityRoleRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(securityRoleEClass, SecurityRole.class, "SecurityRole", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getSecurityRole_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getSecurityRole_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getSecurityRole_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(resourceEnvRefEClass, ResourceEnvRef.class, "ResourceEnvRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getResourceEnvRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getResourceEnvRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getResourceEnvRef_Type(), theJavaRefPackage.getJavaClass(), null, "type", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getResourceEnvRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(ejbLocalRefEClass, EJBLocalRef.class, "EJBLocalRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEJBLocalRef_LocalHome(), ecorePackage.getEString(), "localHome", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBLocalRef_Local(), ecorePackage.getEString(), "local", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(runAsSpecifiedIdentityEClass, RunAsSpecifiedIdentity.class, "RunAsSpecifiedIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getRunAsSpecifiedIdentity_Identity(), this.getIdentity(), null, "identity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(identityEClass, Identity.class, "Identity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getIdentity_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getIdentity_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getIdentity_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(iconTypeEClass, IconType.class, "IconType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getIconType_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getIconType_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getIconType_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(displayNameEClass, DisplayName.class, "DisplayName", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDisplayName_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getDisplayName_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(messageDestinationRefEClass, MessageDestinationRef.class, "MessageDestinationRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMessageDestinationRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDestinationRef_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDestinationRef_Usage(), this.getMessageDestinationUsageType(), "usage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDestinationRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDestinationRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(messageDestinationEClass, MessageDestination.class, "MessageDestination", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMessageDestination_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(paramValueEClass, ParamValue.class, "ParamValue", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getParamValue_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getParamValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getParamValue_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getParamValue_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(descriptionGroupEClass, DescriptionGroup.class, "DescriptionGroup", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDescriptionGroup_Icons(), this.getIconType(), null, "icons", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getDescriptionGroup_DisplayNames(), this.getDisplayName(), null, "displayNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getDescriptionGroup_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(jndiEnvRefsGroupEClass, JNDIEnvRefsGroup.class, "JNDIEnvRefsGroup", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_EnvironmentProperties(), this.getEnvEntry(), null, "environmentProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_ResourceRefs(), this.getResourceRef(), null, "resourceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_EjbRefs(), this.getEjbRef(), null, "ejbRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_ResourceEnvRefs(), this.getResourceEnvRef(), null, "resourceEnvRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_EjbLocalRefs(), this.getEJBLocalRef(), null, "ejbLocalRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_MessageDestinationRefs(), this.getMessageDestinationRef(), null, "messageDestinationRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getJNDIEnvRefsGroup_ServiceRefs(), theWebservice_clientPackage.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(securityIdentityEClass, SecurityIdentity.class, "SecurityIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getSecurityIdentity_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getSecurityIdentity_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(useCallerIdentityEClass, UseCallerIdentity.class, "UseCallerIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(descriptionEClass, Description.class, "Description", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDescription_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getDescription_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(qNameEClass, QName.class, "QName", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getQName_NamespaceURI(), ecorePackage.getEString(), "namespaceURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getQName_LocalPart(), ecorePackage.getEString(), "localPart", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getQName_CombinedQName(), ecorePackage.getEString(), "combinedQName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getQName_InternalPrefixOrNsURI(), ecorePackage.getEString(), "internalPrefixOrNsURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(listenerEClass, Listener.class, "Listener", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getListener_ListenerClass(), theJavaRefPackage.getJavaClass(), null, "listenerClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(compatibilityDescriptionGroupEClass, CompatibilityDescriptionGroup.class, "CompatibilityDescriptionGroup", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getCompatibilityDescriptionGroup_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getCompatibilityDescriptionGroup_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getCompatibilityDescriptionGroup_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getCompatibilityDescriptionGroup_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(envEntryTypeEEnum, EnvEntryType.class, "EnvEntryType"); //$NON-NLS-1$ - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.STRING_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.INTEGER_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.BOOLEAN_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.DOUBLE_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.BYTE_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.SHORT_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.LONG_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.FLOAT_LITERAL); - addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.CHARACTER_LITERAL); - - initEEnum(resAuthTypeBaseEEnum, ResAuthTypeBase.class, "ResAuthTypeBase"); //$NON-NLS-1$ - addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.CONTAINER_LITERAL); - addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.APPLICATION_LITERAL); - addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.SERVLET_LITERAL); - - initEEnum(ejbRefTypeEEnum, EjbRefType.class, "EjbRefType"); //$NON-NLS-1$ - addEEnumLiteral(ejbRefTypeEEnum, EjbRefType.SESSION_LITERAL); - addEEnumLiteral(ejbRefTypeEEnum, EjbRefType.ENTITY_LITERAL); - - initEEnum(resSharingScopeTypeEEnum, ResSharingScopeType.class, "ResSharingScopeType"); //$NON-NLS-1$ - addEEnumLiteral(resSharingScopeTypeEEnum, ResSharingScopeType.SHAREABLE_LITERAL); - addEEnumLiteral(resSharingScopeTypeEEnum, ResSharingScopeType.UNSHAREABLE_LITERAL); - - initEEnum(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.class, "MessageDestinationUsageType"); //$NON-NLS-1$ - addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.CONSUMES_LITERAL); - addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.PRODUCES_LITERAL); - addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.CONSUMES_PRODUCES_LITERAL); - - // Create resource - createResource(eNS_URI); - } -} //CommonPackageImpl - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CompatibilityDescriptionGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CompatibilityDescriptionGroupImpl.java deleted file mode 100644 index fe517929a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/CompatibilityDescriptionGroupImpl.java +++ /dev/null @@ -1,601 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - - -/** - * - * An implementation of the model object 'Compatibility Description Group'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getSmallIcon Small Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getLargeIcon Large Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getDescription Description}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getDisplayName Display Name}
  • - *
- *

- * - * @generated - */ -public class CompatibilityDescriptionGroupImpl extends DescriptionGroupImpl implements CompatibilityDescriptionGroup { - /** - * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected static final String SMALL_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected String smallIcon = SMALL_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected static final String LARGE_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected String largeIcon = LARGE_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * The default value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected static final String DISPLAY_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected String displayName = DISPLAY_NAME_EDEFAULT; - - /** - * - * - * - */ - protected CompatibilityDescriptionGroupImpl() { - super(); - eAdapters().add(new DescriptionGroupAdapter()); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup(); - } - - public String getSmallIcon() { - if(eResource() == null) - return getSmallIconGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getSmallIconGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getIcons().size() > 0) - return ((IconType)getIcons().get(0)).getSmallIcon(); - } - return null; - } - - public void setSmallIcon(String newSmallIcon) { - if(eResource() == null) { - setSmallIconGen(newSmallIcon); - internalSetSmallIconInList(newSmallIcon); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setSmallIconGen(newSmallIcon); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetSmallIconInList(newSmallIcon); - break; - } - } - /** - * @param newSmallIcon - */ - protected void internalSetSmallIconInList(String newSmallIcon) { - IconType newValue = null; - if(getIcons().size() > 0) { - newValue = (IconType) getIcons().get(0); - newValue.setSmallIcon(newSmallIcon); - } - else { - newValue = CommonFactory.eINSTANCE.createIconType(); - newValue.setSmallIcon(newSmallIcon); - getIcons().add(newValue); - } - } - - /** - * - * - * @generated - */ - public String getSmallIconGen() { - return smallIcon; - } - - /** - * - * - * @generated - */ - public void setSmallIconGen(String newSmallIcon) { - String oldSmallIcon = smallIcon; - smallIcon = newSmallIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON, oldSmallIcon, smallIcon)); - } - - public String getLargeIcon() { - if(eResource() == null) - return getLargeIconGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getLargeIconGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getIcons().size() > 0) - return ((IconType)getIcons().get(0)).getLargeIcon(); - } - return null; - } - - public void setLargeIcon(String newLargeIcon) { - if(eResource() == null) { - setLargeIconGen(newLargeIcon); - internalSetLargeIconInList(newLargeIcon); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setLargeIconGen(newLargeIcon); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetLargeIconInList(newLargeIcon); - break; - } - } - - /** - * @param newLargeIcon - */ - protected void internalSetLargeIconInList(String newLargeIcon) { - IconType newValue = null; - if(getIcons().size() > 0) { - newValue = (IconType) getIcons().get(0); - newValue.setLargeIcon(newLargeIcon); - } - else { - newValue = CommonFactory.eINSTANCE.createIconType(); - newValue.setLargeIcon(newLargeIcon); - getIcons().add(newValue); - } - - } - - /** - * - * - * @generated - */ - public String getLargeIconGen() { - return largeIcon; - } - - /** - * - * - * @generated - */ - public void setLargeIconGen(String newLargeIcon) { - String oldLargeIcon = largeIcon; - largeIcon = newLargeIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON, oldLargeIcon, largeIcon)); - } - - public String getDescription() { - if(eResource() == null) - return getDescriptionGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getDescriptionGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getDescriptions().size() > 0) - return ((Description)getDescriptions().get(0)).getValue(); - } - return null; - } - - public void setDescription(String newDescription) { - if(eResource() == null) { - setDescriptionGen(newDescription); - internalSetDescriptionInList(newDescription); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setDescriptionGen(newDescription); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetDescriptionInList(newDescription); - break; - } - } - - /** - * @param newDescription - */ - protected void internalSetDescriptionInList(String newDescription) { - Description newValue = null; - if(getDescriptions().size() > 0) { - newValue = (Description) getDescriptions().get(0); - newValue.setValue(newDescription); - } - else { - newValue = CommonFactory.eINSTANCE.createDescription(); - newValue.setValue(newDescription); - getDescriptions().add(newValue); - } - - } - - /** - * - * - * @generated - */ - public String getDescriptionGen() { - return description; - } - - /** - * - * - * @generated - */ - public void setDescriptionGen(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION, oldDescription, description)); - } - - public String getDisplayName() { - if(eResource() == null) - return getDisplayNameGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getDisplayNameGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getDisplayNames().size() > 0) - return ((DisplayName)getDisplayNames().get(0)).getValue(); - } - return null; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#setDisplayName(java.lang.String) - */ - public void setDisplayName(String newDisplayName) { - if(eResource() == null) { - setDisplayNameGen(newDisplayName); - internalSetDisplayNameInList(newDisplayName); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setDisplayNameGen(newDisplayName); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetDisplayNameInList(newDisplayName); - break; - } - } - - /** - * @param newDisplayName - */ - protected void internalSetDisplayNameInList(String newDisplayName) { - DisplayName newValue = null; - if(getDisplayNames().size() > 0) { - newValue = (DisplayName) getDisplayNames().get(0); - newValue.setValue(newDisplayName); - } - else { - newValue = CommonFactory.eINSTANCE.createDisplayName(); - newValue.setValue(newDisplayName); - getDisplayNames().add(newValue); - } - - } - - /** - * - * - * @generated - */ - public String getDisplayNameGen() { - return displayName; - } - - /** - * - * - * @generated - */ - public void setDisplayNameGen(String newDisplayName) { - String oldDisplayName = displayName; - displayName = newDisplayName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME, oldDisplayName, displayName)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: - return getIcons(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: - return getDisplayNames(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: - return getSmallIcon(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: - return getLargeIcon(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: - return getDescription(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: - return getDisplayName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: - getIcons().clear(); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: - return icons != null && !icons.isEmpty(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (smallIcon: "); //$NON-NLS-1$ - result.append(smallIcon); - result.append(", largeIcon: "); //$NON-NLS-1$ - result.append(largeIcon); - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(", displayName: "); //$NON-NLS-1$ - result.append(displayName); - result.append(')'); - return result.toString(); - } - -} //CompatibilityDescriptionGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupAdapter.java deleted file mode 100644 index 8349ac2fe..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupAdapter.java +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 3, 2004 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.IconType; - - - -/** - * @author cbridgha - * - * To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ - public class DescriptionGroupAdapter extends AdapterImpl { - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification) - */ - public void notifyChanged(Notification msg) { - if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Icons() || - msg.getFeature() == CommonPackage.eINSTANCE.getIconType_LargeIcon() || - msg.getFeature() == CommonPackage.eINSTANCE.getIconType_SmallIcon()) { - synchIcons(); - return; - } - else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Descriptions() || - msg.getFeature() == CommonPackage.eINSTANCE.getDescription_Value()) { - synchDescription(); - return; - } - else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames() || - msg.getFeature() == CommonPackage.eINSTANCE.getDisplayName_Value()) { - synchDisplayName(); - return; - } - - } - - /** - * - */ - private void synchDescription() { - CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); - if (myTarget.getDescriptions().isEmpty()) - myTarget.setDescriptionGen(null); - else { - Description aDescription = (Description)myTarget.getDescriptions().get(0); - if (!aDescription.eAdapters().contains(this)) - aDescription.eAdapters().add(this); - else - myTarget.setDescriptionGen(aDescription.getValue()); - } - } - - /** - * - */ - private void synchDisplayName() { - CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); - if (myTarget.getDisplayNames().isEmpty()) - myTarget.setDisplayNameGen(null); - else { - DisplayName aDisplayName = (DisplayName)myTarget.getDisplayNames().get(0); - if (!aDisplayName.eAdapters().contains(this)) - aDisplayName.eAdapters().add(this); - myTarget.setDisplayNameGen(aDisplayName.getValue()); - } - } - - /** - * - */ - private void synchIcons() { - CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); - if (myTarget.getIcons().isEmpty()) { - myTarget.setLargeIconGen(null); - myTarget.setSmallIconGen(null); - } - else { - IconType anIcon = (IconType)myTarget.getIcons().get(0); - if (!anIcon.eAdapters().contains(this)) - anIcon.eAdapters().add(this); - else { - myTarget.setLargeIconGen(anIcon.getLargeIcon()); - myTarget.setSmallIconGen(anIcon.getSmallIcon()); - } - } - } - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier) - */ - public void setTarget(Notifier newTarget) { - if (newTarget instanceof CompatibilityDescriptionGroup) - super.setTarget(newTarget); - } -} \ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupImpl.java deleted file mode 100644 index 5da7ec05f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionGroupImpl.java +++ /dev/null @@ -1,221 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - - -/** - * An implementation of the model object 'Description Group'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getIcons Icons}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getDisplayNames Display Names}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getDescriptions Descriptions}
  • - *
- *

- * - * @generated - */ -public class DescriptionGroupImpl extends EObjectImpl implements DescriptionGroup { - /** - * The cached value of the '{@link #getIcons() Icons}' containment reference list. - * - * - * @see #getIcons() @generated @ordered - */ - protected EList icons = null; - - /** - * The cached value of the '{@link #getDisplayNames() Display Names}' containment - * reference list. - * - * @see #getDisplayNames() @generated @ordered - */ - protected EList displayNames = null; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment - * reference list. - * - * @see #getDescriptions() @generated @ordered - */ - protected EList descriptions = null; - - /** - * @generated - */ - protected DescriptionGroupImpl() { - super(); - } - - /** - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getDescriptionGroup(); - } - - /** - * @generated - */ - public EList getIcons() { - if (icons == null) { - icons = new EObjectContainmentEList(IconType.class, this, CommonPackage.DESCRIPTION_GROUP__ICONS); - } - return icons; - } - - /** - * @generated - */ - public EList getDisplayNames() { - if (displayNames == null) { - displayNames = new EObjectContainmentEList(DisplayName.class, this, CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES); - } - return displayNames; - } - - /** - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS); - } - return descriptions; - } - - /** - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.DESCRIPTION_GROUP__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION_GROUP__ICONS: - return getIcons(); - case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: - return getDisplayNames(); - case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION_GROUP__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION_GROUP__ICONS: - getIcons().clear(); - return; - case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION_GROUP__ICONS: - return icons != null && !icons.isEmpty(); - case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#getJ2EEVersionID() - */ - public int getJ2EEVersionID() throws IllegalStateException { - - try { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) - throw new IllegalStateException(); - return res.getJ2EEVersionID(); - } catch (ClassCastException exception) { - return J2EEVersionConstants.J2EE_1_3_ID; - } - - } - -} //DescriptionGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionImpl.java deleted file mode 100644 index f59b62501..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DescriptionImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; - - -/** - * - * An implementation of the model object 'Description'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionImpl#getLang Lang}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionImpl#getValue Value}
  • - *
- *

- * - * @generated - */ -public class DescriptionImpl extends EObjectImpl implements Description { - /** - * The default value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected static final String LANG_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected String lang = LANG_EDEFAULT; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * - * - * @generated - */ - protected DescriptionImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getDescription(); - } - - /** - * - * - * @generated - */ - public String getLang() { - return lang; - } - - /** - * - * - * @generated - */ - public void setLang(String newLang) { - String oldLang = lang; - lang = newLang; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DESCRIPTION__LANG, oldLang, lang)); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DESCRIPTION__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION__LANG: - return getLang(); - case CommonPackage.DESCRIPTION__VALUE: - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION__LANG: - setLang((String)newValue); - return; - case CommonPackage.DESCRIPTION__VALUE: - setValue((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION__LANG: - setLang(LANG_EDEFAULT); - return; - case CommonPackage.DESCRIPTION__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DESCRIPTION__LANG: - return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); - case CommonPackage.DESCRIPTION__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (lang: "); //$NON-NLS-1$ - result.append(lang); - result.append(", value: "); //$NON-NLS-1$ - result.append(value); - result.append(')'); - return result.toString(); - } - -} //DescriptionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DisplayNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DisplayNameImpl.java deleted file mode 100644 index d2c29d765..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/DisplayNameImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.DisplayName; - - -/** - * - * An implementation of the model object 'Display Name'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DisplayNameImpl#getLang Lang}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DisplayNameImpl#getValue Value}
  • - *
- *

- * - * @generated - */ -public class DisplayNameImpl extends EObjectImpl implements DisplayName { - /** - * The default value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected static final String LANG_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected String lang = LANG_EDEFAULT; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * - * - * @generated - */ - protected DisplayNameImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getDisplayName(); - } - - /** - * - * - * @generated - */ - public String getLang() { - return lang; - } - - /** - * - * - * @generated - */ - public void setLang(String newLang) { - String oldLang = lang; - lang = newLang; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DISPLAY_NAME__LANG, oldLang, lang)); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DISPLAY_NAME__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DISPLAY_NAME__LANG: - return getLang(); - case CommonPackage.DISPLAY_NAME__VALUE: - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DISPLAY_NAME__LANG: - setLang((String)newValue); - return; - case CommonPackage.DISPLAY_NAME__VALUE: - setValue((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DISPLAY_NAME__LANG: - setLang(LANG_EDEFAULT); - return; - case CommonPackage.DISPLAY_NAME__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.DISPLAY_NAME__LANG: - return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); - case CommonPackage.DISPLAY_NAME__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (lang: "); //$NON-NLS-1$ - result.append(lang); - result.append(", value: "); //$NON-NLS-1$ - result.append(value); - result.append(')'); - return result.toString(); - } - -} //DisplayNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EJBLocalRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EJBLocalRefImpl.java deleted file mode 100644 index 768b7c9dc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EJBLocalRefImpl.java +++ /dev/null @@ -1,333 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EjbRefType; - -/** - * The ejb-local-ref element is used for the declaration of a reference to another enterprise bean's local home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing enterprise bean; the expected type of the referenced enterprise bean; the expected local home and local interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. - * Used in: entity, session, message-driven - */ -public class EJBLocalRefImpl extends EjbRefImpl implements EJBLocalRef, EjbRef{ - - /** - * The default value of the '{@link #getLocalHome() Local Home}' attribute. - * - * - * @see #getLocalHome() - * @generated - * @ordered - */ - protected static final String LOCAL_HOME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocalHome() Local Home}' attribute. - * - * - * @see #getLocalHome() - * @generated - * @ordered - */ - protected String localHome = LOCAL_HOME_EDEFAULT; - - /** - * The default value of the '{@link #getLocal() Local}' attribute. - * - * - * @see #getLocal() - * @generated - * @ordered - */ - protected static final String LOCAL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocal() Local}' attribute. - * - * - * @see #getLocal() - * @generated - * @ordered - */ - protected String local = LOCAL_EDEFAULT; - - public EJBLocalRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getEJBLocalRef(); - } - - /** - * - * - * @generated - */ - public String getLocalHome() { - return localHome; - } - - /** - * - * - * @generated - */ - public void setLocalHome(String newLocalHome) { - String oldLocalHome = localHome; - localHome = newLocalHome; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_LOCAL_REF__LOCAL_HOME, oldLocalHome, localHome)); - } - - /** - * - * - * @generated - */ - public String getLocal() { - return local; - } - - /** - * - * - * @generated - */ - public void setLocal(String newLocal) { - String oldLocal = local; - local = newLocal; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_LOCAL_REF__LOCAL, oldLocal, local)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_LOCAL_REF__NAME: - return getName(); - case CommonPackage.EJB_LOCAL_REF__TYPE: - return getType(); - case CommonPackage.EJB_LOCAL_REF__HOME: - return getHome(); - case CommonPackage.EJB_LOCAL_REF__REMOTE: - return getRemote(); - case CommonPackage.EJB_LOCAL_REF__LINK: - return getLink(); - case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: - return getDescription(); - case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: - return getLocalHome(); - case CommonPackage.EJB_LOCAL_REF__LOCAL: - return getLocal(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_LOCAL_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__TYPE: - setType((EjbRefType)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__HOME: - setHome((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__REMOTE: - setRemote((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__LINK: - setLink((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: - setLocalHome((String)newValue); - return; - case CommonPackage.EJB_LOCAL_REF__LOCAL: - setLocal((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_LOCAL_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__TYPE: - unsetType(); - return; - case CommonPackage.EJB_LOCAL_REF__HOME: - setHome(HOME_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__REMOTE: - setRemote(REMOTE_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__LINK: - setLink(LINK_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: - setLocalHome(LOCAL_HOME_EDEFAULT); - return; - case CommonPackage.EJB_LOCAL_REF__LOCAL: - setLocal(LOCAL_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_LOCAL_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.EJB_LOCAL_REF__TYPE: - return isSetType(); - case CommonPackage.EJB_LOCAL_REF__HOME: - return HOME_EDEFAULT == null ? home != null : !HOME_EDEFAULT.equals(home); - case CommonPackage.EJB_LOCAL_REF__REMOTE: - return REMOTE_EDEFAULT == null ? remote != null : !REMOTE_EDEFAULT.equals(remote); - case CommonPackage.EJB_LOCAL_REF__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: - return LOCAL_HOME_EDEFAULT == null ? localHome != null : !LOCAL_HOME_EDEFAULT.equals(localHome); - case CommonPackage.EJB_LOCAL_REF__LOCAL: - return LOCAL_EDEFAULT == null ? local != null : !LOCAL_EDEFAULT.equals(local); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (localHome: "); //$NON-NLS-1$ - result.append(localHome); - result.append(", local: "); //$NON-NLS-1$ - result.append(local); - result.append(')'); - return result.toString(); - } - -/** - * Return true if the ejbref is for a local ejb interface. - */ -public boolean isLocal(){ - return true; -} - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.EjbRef#getRemote() - */ - public String getRemote() { - return getLocal(); //forward to the local - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.EjbRef#setRemote(java.lang.String) - */ - public void setRemote(String value) { - setLocal(value); //forward to the local - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.EjbRef#getHome() - */ - public String getHome() { - return getLocalHome(); //forward to the local home - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.EjbRef#setHome(java.lang.String) - */ - public void setHome(String value) { - setLocalHome(value); //forward to the local home - } -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EjbRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EjbRefImpl.java deleted file mode 100644 index fba104405..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EjbRefImpl.java +++ /dev/null @@ -1,514 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EjbRefType; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; - -/** - * The ejb-ref element is used for the declaration of a reference to an enterprise bean's home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing application client; the expected type of the referenced enterprise bean; the expected home and remote interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. - */ -public class EjbRefImpl extends EObjectImpl implements EjbRef, EObject{ - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final EjbRefType TYPE_EDEFAULT = EjbRefType.SESSION_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EjbRefType type = TYPE_EDEFAULT; - /** - * This is true if the Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean typeESet = false; - - /** - * The default value of the '{@link #getHome() Home}' attribute. - * - * - * @see #getHome() - * @generated - * @ordered - */ - protected static final String HOME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String home = HOME_EDEFAULT; - /** - * The default value of the '{@link #getRemote() Remote}' attribute. - * - * - * @see #getRemote() - * @generated - * @ordered - */ - protected static final String REMOTE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String remote = REMOTE_EDEFAULT; - /** - * The default value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected static final String LINK_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String link = LINK_EDEFAULT; - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public EjbRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getEjbRef(); - } - -/** - * Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter. - * The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise - * return null - */ -public EnterpriseBean getLinkedEjb(EJBJar ejbJar) { - if (getLink() == null) { - return null; - } - return ejbJar.getEnterpiseBeanFromRef(this); -}/** - * Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter. - * The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise - * return null - */ -public boolean isEquivalent(EjbRef anEjbRef) { - if (anEjbRef == null) return false; - boolean equiv = true; - equiv = getName() == anEjbRef.getName() || (getName() != null && getName().equals(anEjbRef.getName())); - if (equiv) - equiv = getHome() == anEjbRef.getHome() || (getHome() != null && getHome().equals(anEjbRef.getHome())); - if (equiv) - equiv = getRemote() == anEjbRef.getRemote() || (getRemote() != null && getRemote().equals(anEjbRef.getRemote())); - if (equiv) - equiv = getLink() == anEjbRef.getLink() || (getLink() != null && getLink().equals(anEjbRef.getLink())); - return equiv; -} -public boolean isLinked(EnterpriseBean anEJB) { - if (getLink() == null) - return false; - return getLink().equals(anEJB.getName()); -} -/** - * Return true if the ejbref is for a local ejb interface. - */ -public boolean isLocal(){ - return false; -} - /** - * @generated This field/method will be replaced during code generation - * The ejb-ref-name element contains the name of an EJB reference. This is the JNDI name that the servlet code uses to get a reference to the enterprise bean. - * Example: ejb//Payroll - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * The ejb-ref-type element contains the expected type of the referenced enterprise bean. The ejb-ref-type element must be one of the following: - * Entity - * Session - */ - public EjbRefType getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(EjbRefType newType) { - EjbRefType oldType = type; - type = newType == null ? TYPE_EDEFAULT : newType; - boolean oldTypeESet = typeESet; - typeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__TYPE, oldType, type, !oldTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetType() { - EjbRefType oldType = type; - boolean oldTypeESet = typeESet; - type = TYPE_EDEFAULT; - typeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.EJB_REF__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetType() { - return typeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The home element contains the fully-qualified name of the enterprise bean's home interface. - * Example: com.aardvark.payroll.PayrollHome - */ - public String getHome() { - return home; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setHome(String newHome) { - String oldHome = home; - home = newHome; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__HOME, oldHome, home)); - } - - /** - * @generated This field/method will be replaced during code generation - * The remote element contains the fully-qualified name of the enterprise bean's remote interface. - */ - public String getRemote() { - return remote; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRemote(String newRemote) { - String oldRemote = remote; - remote = newRemote; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__REMOTE, oldRemote, remote)); - } - - /** - * @generated This field/method will be replaced during code generation - * The ejb-link element is used in the ejb-ref element to specify that an EJB reference is linked to an enterprise bean in the encompassing J2EE Application package. The value of the ejb-link element must be the ejb-name of an enterprise bean in the same J2EE Application package. - * Example: EmployeeRecord - */ - public String getLink() { - return link; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLink(String newLink) { - String oldLink = link; - link = newLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__LINK, oldLink, link)); - } - - /** - * @generated This field/method will be replaced during code generation The - * description element is used by the ejb-jar file producer to - * provide text describing the parent element. The description - * element should include any information that the ejb-jar file - * producer wants to provide to the consumer of the ejb-jar file - * (i.e. to the Deployer). Typically, the tools used by the - * ejb-jar file consumer will display the description when - * processing the parent element. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - d.setValue(newDescription); - } - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__DESCRIPTION, oldDescription, description)); - } - - public String getDescription() { - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - description = d.getValue(); - } - return description; - } - - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.EJB_REF__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.EJB_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_REF__NAME: - return getName(); - case CommonPackage.EJB_REF__TYPE: - return getType(); - case CommonPackage.EJB_REF__HOME: - return getHome(); - case CommonPackage.EJB_REF__REMOTE: - return getRemote(); - case CommonPackage.EJB_REF__LINK: - return getLink(); - case CommonPackage.EJB_REF__DESCRIPTION: - return getDescription(); - case CommonPackage.EJB_REF__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.EJB_REF__TYPE: - return isSetType(); - case CommonPackage.EJB_REF__HOME: - return HOME_EDEFAULT == null ? home != null : !HOME_EDEFAULT.equals(home); - case CommonPackage.EJB_REF__REMOTE: - return REMOTE_EDEFAULT == null ? remote != null : !REMOTE_EDEFAULT.equals(remote); - case CommonPackage.EJB_REF__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case CommonPackage.EJB_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.EJB_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.EJB_REF__TYPE: - setType((EjbRefType)newValue); - return; - case CommonPackage.EJB_REF__HOME: - setHome((String)newValue); - return; - case CommonPackage.EJB_REF__REMOTE: - setRemote((String)newValue); - return; - case CommonPackage.EJB_REF__LINK: - setLink((String)newValue); - return; - case CommonPackage.EJB_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.EJB_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.EJB_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.EJB_REF__TYPE: - unsetType(); - return; - case CommonPackage.EJB_REF__HOME: - setHome(HOME_EDEFAULT); - return; - case CommonPackage.EJB_REF__REMOTE: - setRemote(REMOTE_EDEFAULT); - return; - case CommonPackage.EJB_REF__LINK: - setLink(LINK_EDEFAULT); - return; - case CommonPackage.EJB_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.EJB_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", type: "); //$NON-NLS-1$ - if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ - result.append(", home: "); //$NON-NLS-1$ - result.append(home); - result.append(", remote: "); //$NON-NLS-1$ - result.append(remote); - result.append(", link: "); //$NON-NLS-1$ - result.append(link); - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EnvEntryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EnvEntryImpl.java deleted file mode 100644 index 949b15b11..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/EnvEntryImpl.java +++ /dev/null @@ -1,371 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.EnvEntryType; - -/** - * The env-entry element contains the declaration of an application client's environment entries. The declaration consists of an optional description, the name of the environment entry, and an optional value. - */ -public class EnvEntryImpl extends EObjectImpl implements EnvEntry, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String value = VALUE_EDEFAULT; - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final EnvEntryType TYPE_EDEFAULT = EnvEntryType.STRING_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EnvEntryType type = TYPE_EDEFAULT; - /** - * This is true if the Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean typeESet = false; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public EnvEntryImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getEnvEntry(); - } - - /** - * @generated This field/method will be replaced during code generation - * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The env-entry-name element contains the name of an application client's environment entry. - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * The env-entry-value element contains the value of an application client's environment entry. The value must be a String that is valid for the constructor of the specified type that takes a single String parameter. - * Used in: env-entry - * Example: - * //datasources//MyDatabase - */ - public String getValue() { - return value; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__VALUE, oldValue, value)); - } - - /** - * @generated This field/method will be replaced during code generation - * The env-entry-type element contains the fully-qualified Java type of the environment entry value that is expected by the application client's code. The following are the legal values of env-entry-type: java.lang.Bool-ean, java.lang.String, java.lang.Integer, java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, and java.lang.Float. - * Example: java.lang.Boolean - */ - public EnvEntryType getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(EnvEntryType newType) { - EnvEntryType oldType = type; - type = newType == null ? TYPE_EDEFAULT : newType; - boolean oldTypeESet = typeESet; - typeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__TYPE, oldType, type, !oldTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetType() { - EnvEntryType oldType = type; - boolean oldTypeESet = typeESet; - type = TYPE_EDEFAULT; - typeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.ENV_ENTRY__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetType() { - return typeESet; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.ENV_ENTRY__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.ENV_ENTRY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ENV_ENTRY__DESCRIPTION: - return getDescription(); - case CommonPackage.ENV_ENTRY__NAME: - return getName(); - case CommonPackage.ENV_ENTRY__VALUE: - return getValue(); - case CommonPackage.ENV_ENTRY__TYPE: - return getType(); - case CommonPackage.ENV_ENTRY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ENV_ENTRY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.ENV_ENTRY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.ENV_ENTRY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - case CommonPackage.ENV_ENTRY__TYPE: - return isSetType(); - case CommonPackage.ENV_ENTRY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ENV_ENTRY__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.ENV_ENTRY__NAME: - setName((String)newValue); - return; - case CommonPackage.ENV_ENTRY__VALUE: - setValue((String)newValue); - return; - case CommonPackage.ENV_ENTRY__TYPE: - setType((EnvEntryType)newValue); - return; - case CommonPackage.ENV_ENTRY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ENV_ENTRY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.ENV_ENTRY__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.ENV_ENTRY__VALUE: - setValue(VALUE_EDEFAULT); - return; - case CommonPackage.ENV_ENTRY__TYPE: - unsetType(); - return; - case CommonPackage.ENV_ENTRY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", name: "); //$NON-NLS-1$ - result.append(name); - result.append(", value: "); //$NON-NLS-1$ - result.append(value); - result.append(", type: "); //$NON-NLS-1$ - if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IconTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IconTypeImpl.java deleted file mode 100644 index 7ec4f749d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IconTypeImpl.java +++ /dev/null @@ -1,272 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.IconType; - - -/** - * - * An implementation of the model object 'Icon Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getSmallIcon Small Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getLargeIcon Large Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getLang Lang}
  • - *
- *

- * - * @generated - */ -public class IconTypeImpl extends EObjectImpl implements IconType { - /** - * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected static final String SMALL_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected String smallIcon = SMALL_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected static final String LARGE_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected String largeIcon = LARGE_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected static final String LANG_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLang() Lang}' attribute. - * - * - * @see #getLang() - * @generated - * @ordered - */ - protected String lang = LANG_EDEFAULT; - - /** - * - * - * @generated - */ - protected IconTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getIconType(); - } - - /** - * - * - * @generated - */ - public String getSmallIcon() { - return smallIcon; - } - - /** - * - * - * @generated - */ - public void setSmallIcon(String newSmallIcon) { - String oldSmallIcon = smallIcon; - smallIcon = newSmallIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__SMALL_ICON, oldSmallIcon, smallIcon)); - } - - /** - * - * - * @generated - */ - public String getLargeIcon() { - return largeIcon; - } - - /** - * - * - * @generated - */ - public void setLargeIcon(String newLargeIcon) { - String oldLargeIcon = largeIcon; - largeIcon = newLargeIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__LARGE_ICON, oldLargeIcon, largeIcon)); - } - - /** - * - * - * @generated - */ - public String getLang() { - return lang; - } - - /** - * - * - * @generated - */ - public void setLang(String newLang) { - String oldLang = lang; - lang = newLang; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__LANG, oldLang, lang)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ICON_TYPE__SMALL_ICON: - return getSmallIcon(); - case CommonPackage.ICON_TYPE__LARGE_ICON: - return getLargeIcon(); - case CommonPackage.ICON_TYPE__LANG: - return getLang(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ICON_TYPE__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case CommonPackage.ICON_TYPE__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case CommonPackage.ICON_TYPE__LANG: - setLang((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ICON_TYPE__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case CommonPackage.ICON_TYPE__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case CommonPackage.ICON_TYPE__LANG: - setLang(LANG_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.ICON_TYPE__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case CommonPackage.ICON_TYPE__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case CommonPackage.ICON_TYPE__LANG: - return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (smallIcon: "); //$NON-NLS-1$ - result.append(smallIcon); - result.append(", largeIcon: "); //$NON-NLS-1$ - result.append(largeIcon); - result.append(", lang: "); //$NON-NLS-1$ - result.append(lang); - result.append(')'); - return result.toString(); - } - -} //IconTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IdentityImpl.java deleted file mode 100644 index c7eb66fe9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/IdentityImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.Identity; - - -/** - * Specifies the run-as identity to be used for the execution of the methods of an enterprise bean. It contains an optional description, and the name of a security role. - - */ -public class IdentityImpl extends EObjectImpl implements Identity, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getRoleName() Role Name}' attribute. - * - * - * @see #getRoleName() - * @generated - * @ordered - */ - protected static final String ROLE_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String roleName = ROLE_NAME_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public IdentityImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getIdentity(); - } - - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing the run as identity. - * - * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.IDENTITY__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The role-name element contains the name of a security role. - * - * The name must conform to the lexical rules for an NMTOKEN. - */ - public String getRoleName() { - return roleName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRoleName(String newRoleName) { - String oldRoleName = roleName; - roleName = newRoleName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.IDENTITY__ROLE_NAME, oldRoleName, roleName)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.IDENTITY__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.IDENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.IDENTITY__DESCRIPTION: - return getDescription(); - case CommonPackage.IDENTITY__ROLE_NAME: - return getRoleName(); - case CommonPackage.IDENTITY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.IDENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.IDENTITY__ROLE_NAME: - return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); - case CommonPackage.IDENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.IDENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.IDENTITY__ROLE_NAME: - setRoleName((String)newValue); - return; - case CommonPackage.IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.IDENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.IDENTITY__ROLE_NAME: - setRoleName(ROLE_NAME_EDEFAULT); - return; - case CommonPackage.IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", roleName: "); //$NON-NLS-1$ - result.append(roleName); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResouceFactorySaxRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResouceFactorySaxRegistry.java deleted file mode 100644 index 52d2ccca0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResouceFactorySaxRegistry.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 11, 2004 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.common.impl; -import org.eclipse.jst.j2ee.application.impl.ApplicationResourceFactory; -import org.eclipse.jst.j2ee.client.impl.ApplicationClientResourceFactory; -import org.eclipse.jst.j2ee.ejb.impl.EJBJarResourceFactory; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.jca.impl.ConnectorResourceFactory; -import org.eclipse.jst.j2ee.webapplication.impl.WebAppResourceFactory; -import org.eclipse.jst.j2ee.webservice.WebServiceConstants; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.WebServicesClientResourceFactory; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddResourceFactory; -import org.eclipse.wst.common.internal.emf.resource.EMF2SAXRendererFactory; - -/** - * @author jsholl - * - * To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code - * and Comments - */ -public class J2EEResouceFactorySaxRegistry extends J2EEResourceFactoryRegistry { - public static J2EEResourceFactoryRegistry INSTANCE = new J2EEResouceFactorySaxRegistry(); - - public J2EEResouceFactorySaxRegistry() { - super(); - initRegistration(); - } - private void initRegistration() { - EMF2SAXRendererFactory.INSTANCE.setValidating(false); - registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - registerLastFileSegment(WebServiceConstants.WEBSERVICE_DD_SHORT_NAME, new WsddResourceFactory(EMF2SAXRendererFactory.INSTANCE)); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryDomRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryDomRegistry.java deleted file mode 100644 index 9ec43b872..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryDomRegistry.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on May 20, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.jst.j2ee.application.impl.ApplicationResourceFactory; -import org.eclipse.jst.j2ee.client.impl.ApplicationClientResourceFactory; -import org.eclipse.jst.j2ee.ejb.impl.EJBJarResourceFactory; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.jca.impl.ConnectorResourceFactory; -import org.eclipse.jst.j2ee.webapplication.impl.WebAppResourceFactory; -import org.eclipse.jst.j2ee.webservice.WebServiceConstants; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.WebServicesClientResourceFactory; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddResourceFactory; -import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactory; -import org.eclipse.wst.common.internal.emf.resource.EMF2SAXRendererFactory; - - - -/** - * @author mdelder - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -public class J2EEResourceFactoryDomRegistry - extends J2EEResourceFactoryRegistry { - - /** - * - */ - public J2EEResourceFactoryDomRegistry() { - super(); - initRegistration(); - } - - private void initRegistration() { - EMF2SAXRendererFactory.INSTANCE.setValidating(false); - registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - registerLastFileSegment(WebServiceConstants.WEBSERVICE_DD_SHORT_NAME, new WsddResourceFactory(EMF2DOMRendererFactory.INSTANCE)); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryRegistry.java deleted file mode 100644 index b28c26e15..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/J2EEResourceFactoryRegistry.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry; - - -public class J2EEResourceFactoryRegistry extends FileNameResourceFactoryRegistry { - - public static J2EEResourceFactoryRegistry INSTANCE = new J2EEResourceFactoryRegistry(); - - public J2EEResourceFactoryRegistry() { - super(); - } - - public Resource.Factory delegatedGetFactory(URI uri) { - if (J2EEResourceFactoryRegistry.INSTANCE == this) - return super.delegatedGetFactory(uri); - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(uri); - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/JNDIEnvRefsGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/JNDIEnvRefsGroupImpl.java deleted file mode 100644 index 6b1a26bd8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/JNDIEnvRefsGroupImpl.java +++ /dev/null @@ -1,454 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; - - -/** - * - * An implementation of the model object 'JNDI Env Refs Group'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEnvironmentProperties Environment Properties}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getResourceRefs Resource Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEjbRefs Ejb Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getResourceEnvRefs Resource Env Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEjbLocalRefs Ejb Local Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getMessageDestinationRefs Message Destination Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getServiceRefs Service Refs}
  • - *
- *

- * - * @generated - */ -public abstract class JNDIEnvRefsGroupImpl extends CompatibilityDescriptionGroupImpl implements JNDIEnvRefsGroup { - /** - * The cached value of the '{@link #getEnvironmentProperties() Environment Properties}' containment reference list. - * - * - * @see #getEnvironmentProperties() - * @generated - * @ordered - */ - protected EList environmentProperties = null; - - /** - * The cached value of the '{@link #getResourceRefs() Resource Refs}' containment reference list. - * - * - * @see #getResourceRefs() - * @generated - * @ordered - */ - protected EList resourceRefs = null; - - /** - * The cached value of the '{@link #getEjbRefs() Ejb Refs}' containment reference list. - * - * - * @see #getEjbRefs() - * @generated - * @ordered - */ - protected EList ejbRefs = null; - - /** - * The cached value of the '{@link #getResourceEnvRefs() Resource Env Refs}' containment reference list. - * - * - * @see #getResourceEnvRefs() - * @generated - * @ordered - */ - protected EList resourceEnvRefs = null; - - /** - * The cached value of the '{@link #getEjbLocalRefs() Ejb Local Refs}' containment reference list. - * - * - * @see #getEjbLocalRefs() - * @generated - * @ordered - */ - protected EList ejbLocalRefs = null; - - /** - * The cached value of the '{@link #getMessageDestinationRefs() Message Destination Refs}' containment reference list. - * - * - * @see #getMessageDestinationRefs() - * @generated - * @ordered - */ - protected EList messageDestinationRefs = null; - - /** - * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. - * - * - * @see #getServiceRefs() - * @generated - * @ordered - */ - protected EList serviceRefs = null; - - /** - * - * - * @generated - */ - protected JNDIEnvRefsGroupImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getJNDIEnvRefsGroup(); - } - - /** - * - * - * @generated - */ - public EList getEnvironmentProperties() { - if (environmentProperties == null) { - environmentProperties = new EObjectContainmentEList(EnvEntry.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES); - } - return environmentProperties; - } - - /** - * - * - * @generated - */ - public EList getResourceRefs() { - if (resourceRefs == null) { - resourceRefs = new EObjectContainmentEList(ResourceRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS); - } - return resourceRefs; - } - - /** - * - * - * @generated - */ - public EList getEjbRefs() { - if (ejbRefs == null) { - ejbRefs = new EObjectContainmentEList(EjbRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS); - } - return ejbRefs; - } - - /** - * - * - * @generated - */ - public EList getResourceEnvRefs() { - if (resourceEnvRefs == null) { - resourceEnvRefs = new EObjectContainmentEList(ResourceEnvRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS); - } - return resourceEnvRefs; - } - - /** - * - * - * @generated - */ - public EList getEjbLocalRefs() { - if (ejbLocalRefs == null) { - ejbLocalRefs = new EObjectContainmentEList(EJBLocalRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS); - } - return ejbLocalRefs; - } - - /** - * - * - * @generated - */ - public EList getMessageDestinationRefs() { - if (messageDestinationRefs == null) { - messageDestinationRefs = new EObjectContainmentEList(MessageDestinationRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS); - } - return messageDestinationRefs; - } - - /** - * - * - * @generated - */ - public EList getServiceRefs() { - if (serviceRefs == null) { - serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS); - } - return serviceRefs; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: - return getIcons(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: - return getDisplayNames(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: - return getSmallIcon(); - case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: - return getLargeIcon(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: - return getDescription(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: - return getDisplayName(); - case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: - return getResourceRefs(); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: - return getEjbRefs(); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: - return getServiceRefs(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: - getIcons().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: - getEjbRefs().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: - getServiceRefs().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: - return icons != null && !icons.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //JNDIEnvRefsGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ListenerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ListenerImpl.java deleted file mode 100644 index ba4aca53e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ListenerImpl.java +++ /dev/null @@ -1,267 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Listener; - - -/** - * Declares a class in the application must be registered as a web application listener bean. - */ -public class ListenerImpl extends CompatibilityDescriptionGroupImpl implements Listener { - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass listenerClass = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected ListenerImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getListener(); - } - - /** - * @generated This field/method will be replaced during code generation - * The listener-class element declares a class in the application must be registered as a web application listener bean. - */ - public JavaClass getListenerClass() { - if (listenerClass != null && listenerClass.eIsProxy()) { - JavaClass oldListenerClass = listenerClass; - listenerClass = (JavaClass)eResolveProxy((InternalEObject)listenerClass); - if (listenerClass != oldListenerClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonPackage.LISTENER__LISTENER_CLASS, oldListenerClass, listenerClass)); - } - } - return listenerClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetListenerClass() { - return listenerClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setListenerClass(JavaClass newListenerClass) { - JavaClass oldListenerClass = listenerClass; - listenerClass = newListenerClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LISTENER__LISTENER_CLASS, oldListenerClass, listenerClass)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.LISTENER__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case CommonPackage.LISTENER__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case CommonPackage.LISTENER__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.LISTENER__ICONS: - return getIcons(); - case CommonPackage.LISTENER__DISPLAY_NAMES: - return getDisplayNames(); - case CommonPackage.LISTENER__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.LISTENER__SMALL_ICON: - return getSmallIcon(); - case CommonPackage.LISTENER__LARGE_ICON: - return getLargeIcon(); - case CommonPackage.LISTENER__DESCRIPTION: - return getDescription(); - case CommonPackage.LISTENER__DISPLAY_NAME: - return getDisplayName(); - case CommonPackage.LISTENER__LISTENER_CLASS: - if (resolve) return getListenerClass(); - return basicGetListenerClass(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.LISTENER__ICONS: - return icons != null && !icons.isEmpty(); - case CommonPackage.LISTENER__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case CommonPackage.LISTENER__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.LISTENER__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case CommonPackage.LISTENER__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case CommonPackage.LISTENER__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.LISTENER__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case CommonPackage.LISTENER__LISTENER_CLASS: - return listenerClass != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.LISTENER__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case CommonPackage.LISTENER__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case CommonPackage.LISTENER__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.LISTENER__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case CommonPackage.LISTENER__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case CommonPackage.LISTENER__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.LISTENER__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case CommonPackage.LISTENER__LISTENER_CLASS: - setListenerClass((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.LISTENER__ICONS: - getIcons().clear(); - return; - case CommonPackage.LISTENER__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case CommonPackage.LISTENER__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.LISTENER__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case CommonPackage.LISTENER__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case CommonPackage.LISTENER__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.LISTENER__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case CommonPackage.LISTENER__LISTENER_CLASS: - setListenerClass((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - -/** - * createClassRef - return a JavaURL reference to the named Java class - */ -public JavaClass createClassRef(String targetName) { - return JavaRefFactory.eINSTANCE.createClassRef(targetName); -} -/** - * Get the fully qualified class name for the listener. - */ -public String getListenerClassName() { - getListenerClass(); - return (listenerClass == null) ? null : listenerClass.getQualifiedName(); -} -/** - * Sets the listener class name. - */ -public void setListenerClassName(String listenerClassName) { - eSet(CommonPackage.eINSTANCE.getListener_ListenerClass(), createClassRef(listenerClassName)); -} -} //ListenerImpl - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationImpl.java deleted file mode 100644 index 816c6818e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.MessageDestination; - - -/** - * - * An implementation of the model object 'Message Destination'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationImpl#getName Name}
  • - *
- *

- * - * @generated - */ -public class MessageDestinationImpl extends CompatibilityDescriptionGroupImpl implements MessageDestination { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected MessageDestinationImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getMessageDestination(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.MESSAGE_DESTINATION__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION__ICONS: - return getIcons(); - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: - return getDisplayNames(); - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: - return getSmallIcon(); - case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: - return getLargeIcon(); - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: - return getDescription(); - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: - return getDisplayName(); - case CommonPackage.MESSAGE_DESTINATION__NAME: - return getName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION__NAME: - setName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION__ICONS: - getIcons().clear(); - return; - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION__NAME: - setName(NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION__ICONS: - return icons != null && !icons.isEmpty(); - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case CommonPackage.MESSAGE_DESTINATION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -} //MessageDestinationImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationRefImpl.java deleted file mode 100644 index 6a981aa40..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/MessageDestinationRefImpl.java +++ /dev/null @@ -1,412 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; - - -/** - * - * An implementation of the model object 'Message Destination Ref'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getName Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getType Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getUsage Usage}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getLink Link}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getDescriptions Descriptions}
  • - *
- *

- * - * @generated - */ -public class MessageDestinationRefImpl extends EObjectImpl implements MessageDestinationRef { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * The default value of the '{@link #getUsage() Usage}' attribute. - * - * - * @see #getUsage() - * @generated - * @ordered - */ - protected static final MessageDestinationUsageType USAGE_EDEFAULT = MessageDestinationUsageType.CONSUMES_LITERAL; - - /** - * The cached value of the '{@link #getUsage() Usage}' attribute. - * - * - * @see #getUsage() - * @generated - * @ordered - */ - protected MessageDestinationUsageType usage = USAGE_EDEFAULT; - /** - * This is true if the Auth attribute has been set. - * - * - * @ordered - */ - protected boolean useESet = false; - /** - * The default value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected static final String LINK_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected String link = LINK_EDEFAULT; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - /** - * - * - * @generated - */ - protected MessageDestinationRefImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getMessageDestinationRef(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - public MessageDestinationUsageType getUsage() { - return usage; - } - - /** - * - * - * @generated - */ - public void setUsage(MessageDestinationUsageType newUsage) { - MessageDestinationUsageType oldUsage = usage; - usage = newUsage == null ? USAGE_EDEFAULT : newUsage; - boolean oldUseESet = useESet; - useESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__USAGE, oldUsage, usage, !oldUseESet)); - } - /** - * - * - */ - public void unsetUsage() { - MessageDestinationUsageType oldUsage = usage; - boolean oldUsageESet = useESet; - usage = USAGE_EDEFAULT; - useESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.MESSAGE_DESTINATION_REF__USAGE, oldUsage, USAGE_EDEFAULT, oldUsageESet)); - } - /** - * - * - */ - public boolean isSetUse() { - return useESet; - } - /** - * - * - * @generated - */ - public String getLink() { - return link; - } - - /** - * - * - * @generated - */ - public void setLink(String newLink) { - String oldLink = link; - link = newLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__LINK, oldLink, link)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION_REF__NAME: - return getName(); - case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: - return getType(); - case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: - return getUsage(); - case CommonPackage.MESSAGE_DESTINATION_REF__LINK: - return getLink(); - case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: - setType((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: - setUsage((MessageDestinationUsageType)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__LINK: - setLink((String)newValue); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: - setType(TYPE_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: - unsetUsage(); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__LINK: - setLink(LINK_EDEFAULT); - return; - case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.MESSAGE_DESTINATION_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: - return isSetUse(); - case CommonPackage.MESSAGE_DESTINATION_REF__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", type: "); //$NON-NLS-1$ - result.append(type); - result.append(", usage: "); //$NON-NLS-1$ - result.append(usage); - result.append(", link: "); //$NON-NLS-1$ - result.append(link); - result.append(')'); - return result.toString(); - } - -} //MessageDestinationRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ParamValueImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ParamValueImpl.java deleted file mode 100644 index 7b558869f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ParamValueImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.ParamValue; - - -/** - * - * An implementation of the model object 'Param Value'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getName Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getValue Value}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getDescription Description}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getDescriptions Descriptions}
  • - *
- *

- * - * @generated - */ -public class ParamValueImpl extends EObjectImpl implements ParamValue { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - /** - * - * - * @generated - */ - protected ParamValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getParamValue(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public String getDescription() { - return description; - } - - /** - * - * - * @generated - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.PARAM_VALUE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.PARAM_VALUE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.PARAM_VALUE__NAME: - return getName(); - case CommonPackage.PARAM_VALUE__VALUE: - return getValue(); - case CommonPackage.PARAM_VALUE__DESCRIPTION: - return getDescription(); - case CommonPackage.PARAM_VALUE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.PARAM_VALUE__NAME: - setName((String)newValue); - return; - case CommonPackage.PARAM_VALUE__VALUE: - setValue((String)newValue); - return; - case CommonPackage.PARAM_VALUE__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.PARAM_VALUE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.PARAM_VALUE__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.PARAM_VALUE__VALUE: - setValue(VALUE_EDEFAULT); - return; - case CommonPackage.PARAM_VALUE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.PARAM_VALUE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.PARAM_VALUE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.PARAM_VALUE__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - case CommonPackage.PARAM_VALUE__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.PARAM_VALUE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", value: "); //$NON-NLS-1$ - result.append(value); - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} //ParamValueImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/QNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/QNameImpl.java deleted file mode 100644 index 58594e70a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/QNameImpl.java +++ /dev/null @@ -1,416 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.wst.common.emf.utilities.NamespaceAdapter; -import org.eclipse.wst.common.internal.emf.utilities.StringUtil; - - -/** - * - * An implementation of the model object 'QName'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getNamespaceURI Namespace URI}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getLocalPart Local Part}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getCombinedQName Combined QName}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getInternalPrefixOrNsURI Internal Prefix Or Ns URI}
  • - *
- *

- * - * @generated - */ -public class QNameImpl extends EObjectImpl implements QName { - /** - * The default value of the '{@link #getNamespaceURI() Namespace URI}' attribute. - * - * - * @see #getNamespaceURI() - * @generated - * @ordered - */ - protected static final String NAMESPACE_URI_EDEFAULT = null; - - /** - * The cached value of the '{@link #getNamespaceURI() Namespace URI}' attribute. - * - * - * @see #getNamespaceURI() - * @generated - * @ordered - */ - protected String namespaceURI = NAMESPACE_URI_EDEFAULT; - - /** - * The default value of the '{@link #getLocalPart() Local Part}' attribute. - * - * - * @see #getLocalPart() - * @generated - * @ordered - */ - protected static final String LOCAL_PART_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocalPart() Local Part}' attribute. - * - * - * @see #getLocalPart() - * @generated - * @ordered - */ - protected String localPart = LOCAL_PART_EDEFAULT; - - /** - * The default value of the '{@link #getCombinedQName() Combined QName}' attribute. - * - * - * @see #getCombinedQName() - * @generated - * @ordered - */ - protected static final String COMBINED_QNAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCombinedQName() Combined QName}' attribute. - * - * - * @see #getCombinedQName() - * @generated - * @ordered - */ - protected String combinedQName = COMBINED_QNAME_EDEFAULT; - - /** - * The default value of the '{@link #getInternalPrefixOrNsURI() Internal Prefix Or Ns URI}' attribute. - * - * - * @see #getInternalPrefixOrNsURI() - * @generated - * @ordered - */ - protected static final String INTERNAL_PREFIX_OR_NS_URI_EDEFAULT = null; - - /** - * The cached value of the '{@link #getInternalPrefixOrNsURI() Internal Prefix Or Ns URI}' attribute. - * - * - * @see #getInternalPrefixOrNsURI() - * @generated - * @ordered - */ - protected String internalPrefixOrNsURI = INTERNAL_PREFIX_OR_NS_URI_EDEFAULT; - - /** - * - * - * @generated - */ - protected QNameImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getQName(); - } - - /** - * - * - * @generated - */ - public String getNamespaceURIGen() { - return namespaceURI; - } - - public String getNamespaceURI() { - if (namespaceURI != null) - return namespaceURI; - String resolved = NamespaceAdapter.getResolvedNamespaceURI(internalPrefixOrNsURI, this); - return resolved == null ? internalPrefixOrNsURI : resolved; - } - /** - * - * - * @generated - */ - public void setNamespaceURIGen(String newNamespaceURI) { - String oldNamespaceURI = namespaceURI; - namespaceURI = newNamespaceURI; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__NAMESPACE_URI, oldNamespaceURI, namespaceURI)); - } - - public void setNamespaceURI(String newNamespaceURI) { - String prefix = getInternalPrefixOrNsURI(); - String oldNsURI = getInternalPrefixOrNsURI(); - if (!StringUtil.stringsEqual(prefix, oldNsURI)) - setValues(prefix, newNamespaceURI, getLocalPart()); - else { - setNamespaceURIGen(newNamespaceURI); - setInternalPrefixOrNsURI(newNamespaceURI); - } - - } - - /** - * - * - * @generated - */ - public String getLocalPart() { - return localPart; - } - - /** - * - * - * @generated - */ - public void setLocalPartGen(String newLocalPart) { - String oldLocalPart = localPart; - localPart = newLocalPart; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__LOCAL_PART, oldLocalPart, localPart)); - } - - public void setLocalPart(String newLocalPart) { - setLocalPartGen(newLocalPart); - updateCombine(); - } - - /** - * - * - * @generated - */ - public String getCombinedQName() { - return combinedQName; - } - - /** - * - * - * @generated - */ - public void setCombinedQNameGen(String newCombinedQName) { - String oldCombinedQName = combinedQName; - combinedQName = newCombinedQName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__COMBINED_QNAME, oldCombinedQName, combinedQName)); - } - - public void setCombinedQName(String newCombinedQName) { - setCombinedQNameGen(newCombinedQName); - updateParse(); - } - - /** - * Parses the combined name into the components - */ - private void updateParse() { - String ns = null; - String lp = null; - if (combinedQName != null || combinedQName.length() > 0) { - int index = combinedQName.lastIndexOf(':'); - - if (index < 0) { //No separator - ns = combinedQName; - } else if (index == 0) { //First char - lp = combinedQName.substring(1); - } else if (index == combinedQName.length()-1) { //Last char - ns = combinedQName.substring(0, index); - } else { //In the middle, which is what it should be - ns = combinedQName.substring(0, index); - lp = combinedQName.substring(index+1, combinedQName.length()); - } - } - setInternalPrefixOrNsURIGen(ns); - setLocalPartGen(lp); - } - - /** - * updates the combined name from the components - */ - private void updateCombine() { - String cn = null; - if (internalPrefixOrNsURI != null || localPart != null) { - String ns = internalPrefixOrNsURI == null ? "" : internalPrefixOrNsURI; //$NON-NLS-1$ - String lp = localPart == null ? "" : localPart; //$NON-NLS-1$ - cn = ns+':'+lp; - } - setCombinedQNameGen(cn); - } - - /** - * - * - * @generated - */ - public String getInternalPrefixOrNsURI() { - return internalPrefixOrNsURI; - } - - /** - * - * - * @generated - */ - public void setInternalPrefixOrNsURIGen(String newInternalPrefixOrNsURI) { - String oldInternalPrefixOrNsURI = internalPrefixOrNsURI; - internalPrefixOrNsURI = newInternalPrefixOrNsURI; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI, oldInternalPrefixOrNsURI, internalPrefixOrNsURI)); - } - - public void setInternalPrefixOrNsURI(String newInternalPrefixOrNsURI) { - setInternalPrefixOrNsURIGen(newInternalPrefixOrNsURI); - updateCombine(); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.QNAME__NAMESPACE_URI: - return getNamespaceURI(); - case CommonPackage.QNAME__LOCAL_PART: - return getLocalPart(); - case CommonPackage.QNAME__COMBINED_QNAME: - return getCombinedQName(); - case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: - return getInternalPrefixOrNsURI(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.QNAME__NAMESPACE_URI: - setNamespaceURI((String)newValue); - return; - case CommonPackage.QNAME__LOCAL_PART: - setLocalPart((String)newValue); - return; - case CommonPackage.QNAME__COMBINED_QNAME: - setCombinedQName((String)newValue); - return; - case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.QNAME__NAMESPACE_URI: - setNamespaceURI(NAMESPACE_URI_EDEFAULT); - return; - case CommonPackage.QNAME__LOCAL_PART: - setLocalPart(LOCAL_PART_EDEFAULT); - return; - case CommonPackage.QNAME__COMBINED_QNAME: - setCombinedQName(COMBINED_QNAME_EDEFAULT); - return; - case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * eIsSet for namespace uri must be derived if null so namespaceURI ! = null and internalPrefixOrNsURI != null must both be check. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.QNAME__NAMESPACE_URI: - return NAMESPACE_URI_EDEFAULT == null ? (namespaceURI != null || internalPrefixOrNsURI != null) : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); - case CommonPackage.QNAME__LOCAL_PART: - return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); - case CommonPackage.QNAME__COMBINED_QNAME: - return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); - case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: - return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (namespaceURI: "); //$NON-NLS-1$ - result.append(namespaceURI); - result.append(", localPart: "); //$NON-NLS-1$ - result.append(localPart); - result.append(", combinedQName: "); //$NON-NLS-1$ - result.append(combinedQName); - result.append(", internalPrefixOrNsURI: "); //$NON-NLS-1$ - result.append(internalPrefixOrNsURI); - result.append(')'); - return result.toString(); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.QName#setValues(java.lang.String, java.lang.String, java.lang.String) - */ - public void setValues(String prefix, String nsURI, String localPart) { - setInternalPrefixOrNsURIGen(prefix); - setLocalPartGen(localPart); - String existingURI = NamespaceAdapter.getNamespaceURIAtThisLevel(prefix, this); - boolean removed = false; - if (existingURI != null && !existingURI.equals(nsURI)) { - NamespaceAdapter.removeNamespace(prefix, this); - removed = true; - } - if (existingURI == null || removed) - NamespaceAdapter.addNamespace(prefix, nsURI, this); - updateCombine(); - } - - -} //QNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceEnvRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceEnvRefImpl.java deleted file mode 100644 index 72a97b3fd..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceEnvRefImpl.java +++ /dev/null @@ -1,323 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; - -/** - * The resource-env-ref element contains a declaration of an enterprise bean's reference to an administered object associated with a resource in the enterprise bean's environment. It consists of an optional description, the resource environment reference name, and an indication of the resource environment reference type expected by the enterprise bean code. - * - * Examples: - * - * - * jms//StockQueue - * javax.jms.Queue - * - */ -public class ResourceEnvRefImpl extends EObjectImpl implements ResourceEnvRef, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass type = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public ResourceEnvRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getResourceEnvRef(); - } - - /** - * createClassRef - return a JavaURL reference to the named Java class - */ - public JavaClass createClassRef(String targetName) { - return JavaRefFactory.eINSTANCE.createClassRef(targetName); - } - - public String getTypeName() { - getType(); - return type == null ? null : type.getQualifiedName(); - } - - public void setTypeName(String className) { - eSet(CommonPackage.eINSTANCE.getResourceEnvRef_Type(), createClassRef(className)); - } - - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - d.setValue(newDescription); - } - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); - } - - public String getDescription() { - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - description = d.getValue(); - } - return description; - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the name of a resource environment reference; its - * value is the environment entry name used in the enterprise - * bean code. - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_ENV_REF__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the type of a resource environment reference. See the class description for an example. - */ - public JavaClass getType() { - if (type != null && type.eIsProxy()) { - JavaClass oldType = type; - type = (JavaClass)eResolveProxy((InternalEObject)type); - if (type != oldType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonPackage.RESOURCE_ENV_REF__TYPE, oldType, type)); - } - } - return type; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetType() { - return type; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setType(JavaClass newType) { - JavaClass oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_ENV_REF__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: - return getDescription(); - case CommonPackage.RESOURCE_ENV_REF__NAME: - return getName(); - case CommonPackage.RESOURCE_ENV_REF__TYPE: - if (resolve) return getType(); - return basicGetType(); - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.RESOURCE_ENV_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.RESOURCE_ENV_REF__TYPE: - return type != null; - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.RESOURCE_ENV_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.RESOURCE_ENV_REF__TYPE: - setType((JavaClass)newValue); - return; - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.RESOURCE_ENV_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.RESOURCE_ENV_REF__TYPE: - setType((JavaClass)null); - return; - case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", name: "); //$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceRefImpl.java deleted file mode 100644 index 6397fc3fc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/ResourceRefImpl.java +++ /dev/null @@ -1,508 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.ResAuthTypeBase; -import org.eclipse.jst.j2ee.common.ResSharingScopeType; -import org.eclipse.jst.j2ee.common.ResourceRef; - -/** - * The resource-ref element contains a declaration of application clients's reference to an external resource. It consists of an optional description, the resource factory reference name, the indication of the resource factory type expected by the application client's code, and the type of authentication (bean or container). - * Example: - * - * EmployeeAppDB - * javax.sql.DataSource - * Container - * - */ -public class ResourceRefImpl extends EObjectImpl implements ResourceRef, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String type = TYPE_EDEFAULT; - /** - * The default value of the '{@link #getAuth() Auth}' attribute. - * - * - * @see #getAuth() - * @generated - * @ordered - */ - protected static final ResAuthTypeBase AUTH_EDEFAULT = ResAuthTypeBase.CONTAINER_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected ResAuthTypeBase auth = AUTH_EDEFAULT; - /** - * This is true if the Auth attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean authESet = false; - - /** - * The default value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected static final String LINK_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String link = LINK_EDEFAULT; - /** - * The default value of the '{@link #getResSharingScope() Res Sharing Scope}' attribute. - * - * - * @see #getResSharingScope() - * @generated - * @ordered - */ - protected static final ResSharingScopeType RES_SHARING_SCOPE_EDEFAULT = ResSharingScopeType.SHAREABLE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected ResSharingScopeType resSharingScope = RES_SHARING_SCOPE_EDEFAULT; - /** - * This is true if the Res Sharing Scope attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean resSharingScopeESet = false; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public ResourceRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getResourceRef(); - } - - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - d.setValue(newDescription); - } - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); - } - - public String getDescription() { - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - description = d.getValue(); - } - return description; - } - - /** - * @generated This field/method will be replaced during code generation - * The res-ref-name element specifies the name of the resource factory reference name. The resource factory reference name is the name of the application client's environment entry whose value contains the JNDI name of the data source. - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * The res-type element specifies the type of the data source. The type is specified by the Java interface (or class) expected to be implemented by the data source. - */ - public String getType() { - return type; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__TYPE, oldType, type)); - } - - /** - * @generated This field/method will be replaced during code generation - * The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean. In the latter case, the Container uses information that is supplied by the Deployer. The value of this element must be one of the two following: - * Application - * Container - */ - public ResAuthTypeBase getAuth() { - return auth; - } - - /** - * - * - * @generated - */ - public void setAuth(ResAuthTypeBase newAuth) { - ResAuthTypeBase oldAuth = auth; - auth = newAuth == null ? AUTH_EDEFAULT : newAuth; - boolean oldAuthESet = authESet; - authESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__AUTH, oldAuth, auth, !oldAuthESet)); - } - - /** - * - * - * @generated - */ - public void unsetAuth() { - ResAuthTypeBase oldAuth = auth; - boolean oldAuthESet = authESet; - auth = AUTH_EDEFAULT; - authESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.RESOURCE_REF__AUTH, oldAuth, AUTH_EDEFAULT, oldAuthESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetAuth() { - return authESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getLink() { - return link; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLink(String newLink) { - String oldLink = link; - link = newLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__LINK, oldLink, link)); - } - - /** - * @generated This field/method will be replaced during code generation - * The res-sharing-scope element specifies whether connections obtained - * through the given resource manager connection factory reference can be - * shared. The value of this element, if specified, must be one of the - * two following: Shareable, Unshareable - * - * The default value is Shareable. - - */ - public ResSharingScopeType getResSharingScope() { - return resSharingScope; - } - - /** - * - * - * @generated - */ - public void setResSharingScope(ResSharingScopeType newResSharingScope) { - ResSharingScopeType oldResSharingScope = resSharingScope; - resSharingScope = newResSharingScope == null ? RES_SHARING_SCOPE_EDEFAULT : newResSharingScope; - boolean oldResSharingScopeESet = resSharingScopeESet; - resSharingScopeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE, oldResSharingScope, resSharingScope, !oldResSharingScopeESet)); - } - - /** - * - * - * @generated - */ - public void unsetResSharingScope() { - ResSharingScopeType oldResSharingScope = resSharingScope; - boolean oldResSharingScopeESet = resSharingScopeESet; - resSharingScope = RES_SHARING_SCOPE_EDEFAULT; - resSharingScopeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE, oldResSharingScope, RES_SHARING_SCOPE_EDEFAULT, oldResSharingScopeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetResSharingScope() { - return resSharingScopeESet; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.RESOURCE_REF__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.RESOURCE_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_REF__DESCRIPTION: - return getDescription(); - case CommonPackage.RESOURCE_REF__NAME: - return getName(); - case CommonPackage.RESOURCE_REF__TYPE: - return getType(); - case CommonPackage.RESOURCE_REF__AUTH: - return getAuth(); - case CommonPackage.RESOURCE_REF__LINK: - return getLink(); - case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: - return getResSharingScope(); - case CommonPackage.RESOURCE_REF__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.RESOURCE_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.RESOURCE_REF__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - case CommonPackage.RESOURCE_REF__AUTH: - return isSetAuth(); - case CommonPackage.RESOURCE_REF__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: - return isSetResSharingScope(); - case CommonPackage.RESOURCE_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.RESOURCE_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.RESOURCE_REF__TYPE: - setType((String)newValue); - return; - case CommonPackage.RESOURCE_REF__AUTH: - setAuth((ResAuthTypeBase)newValue); - return; - case CommonPackage.RESOURCE_REF__LINK: - setLink((String)newValue); - return; - case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: - setResSharingScope((ResSharingScopeType)newValue); - return; - case CommonPackage.RESOURCE_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RESOURCE_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.RESOURCE_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.RESOURCE_REF__TYPE: - setType(TYPE_EDEFAULT); - return; - case CommonPackage.RESOURCE_REF__AUTH: - unsetAuth(); - return; - case CommonPackage.RESOURCE_REF__LINK: - setLink(LINK_EDEFAULT); - return; - case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: - unsetResSharingScope(); - return; - case CommonPackage.RESOURCE_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", name: "); //$NON-NLS-1$ - result.append(name); - result.append(", type: "); //$NON-NLS-1$ - result.append(type); - result.append(", auth: "); //$NON-NLS-1$ - if (authESet) result.append(auth); else result.append(""); //$NON-NLS-1$ - result.append(", link: "); //$NON-NLS-1$ - result.append(link); - result.append(", resSharingScope: "); //$NON-NLS-1$ - if (resSharingScopeESet) result.append(resSharingScope); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/RunAsSpecifiedIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/RunAsSpecifiedIdentityImpl.java deleted file mode 100644 index b6ef36520..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/RunAsSpecifiedIdentityImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Identity; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityIdentity; - - -/** - * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It contains an optional description and a specification of the security identity to be used. - - */ -public class RunAsSpecifiedIdentityImpl extends SecurityIdentityImpl implements RunAsSpecifiedIdentity, SecurityIdentity{ - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected Identity identity = null; - public RunAsSpecifiedIdentityImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getRunAsSpecifiedIdentity(); - } - - /** - * @generated This field/method will be replaced during code generation - * Optional specifies the run-as identity to be used for the execution of the methods of an enterprise bean. It contains an optional description, and the name of a security role. - */ - public Identity getIdentity() { - return identity; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetIdentity(Identity newIdentity, NotificationChain msgs) { - Identity oldIdentity = identity; - identity = newIdentity; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, oldIdentity, newIdentity); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setIdentity(Identity newIdentity) { - if (newIdentity != identity) { - NotificationChain msgs = null; - if (identity != null) - msgs = ((InternalEObject)identity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, null, msgs); - if (newIdentity != null) - msgs = ((InternalEObject)newIdentity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, null, msgs); - msgs = basicSetIdentity(newIdentity, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, newIdentity, newIdentity)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: - return basicSetIdentity(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: - return getDescription(); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: - return getDescriptions(); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: - return getIdentity(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: - return identity != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: - setIdentity((Identity)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: - setIdentity((Identity)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isRunAsSpecifiedIdentity() - */ - public boolean isRunAsSpecifiedIdentity() { - return true; - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityIdentityImpl.java deleted file mode 100644 index 92397c421..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityIdentityImpl.java +++ /dev/null @@ -1,214 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.SecurityIdentity; - - -/** - * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It - * contains an optional description and a specification of the security identity to be used. - - */ -public class SecurityIdentityImpl extends EObjectImpl implements SecurityIdentity, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public SecurityIdentityImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getSecurityIdentity(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_IDENTITY__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: - return getDescription(); - case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - - /** - * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isRunAsSpecifiedIdentity() - */ - public boolean isRunAsSpecifiedIdentity() { - return false; - } - - /** - * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isUseCallerIdentity() - */ - public boolean isUseCallerIdentity() { - return false; - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleImpl.java deleted file mode 100644 index caed618ef..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleImpl.java +++ /dev/null @@ -1,289 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WorkbenchUtil; - -/** - * A semantic grouping of operations that may be performed by a subject. - * The security-role element contains the declaration of a security role which is used in the security-constraints placed on the web application. - */ -public class SecurityRoleImpl extends EObjectImpl implements SecurityRole, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - static boolean inEclipse = WorkbenchUtil.workbenchIsRunning(); - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getRoleName() Role Name}' attribute. - * - * - * @see #getRoleName() - * @generated - * @ordered - */ - protected static final String ROLE_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String roleName = ROLE_NAME_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public SecurityRoleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getSecurityRole(); - } - -public boolean equals(Object o) { - if (inEclipse) - return super.equals(o); - - if (o instanceof SecurityRoleImpl) { - String r1 = getRoleName(); - String r2 = ((SecurityRole) o).getRoleName(); - if ((r1 != null) && (r2 != null)) { - if (r1.equals(r2)) { - return true; - } - } else if (r1 == null && r2 == null) - return super.equals(o); - } - return false; -} -public int hashCode() { - if (inEclipse || getRoleName() == null) - return super.hashCode(); - return getRoleName().hashCode(); -} -public String toString() { - String name = getRoleName() == null ? "" : getRoleName(); //$NON-NLS-1$ - return getClass().getName() + "(" + name + ")"; //$NON-NLS-1$ //$NON-NLS-2$ -} - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description)getDescriptions().get(0); - if (d != null) - description = d.getValue(); - } - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (getDescriptions() != null) { - if (getDescriptions().isEmpty()) { - Description d = new DescriptionImpl(); - d.setValue(newDescription); - getDescriptions().add(d); - } - else { - Description d = (Description)getDescriptions().get(0); - if (d != null) - d.setValue(newDescription); - } - - } - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The role-name element contains the name of a role. This element must contain a non-empty string. - - */ - public String getRoleName() { - return roleName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRoleName(String newRoleName) { - String oldRoleName = roleName; - roleName = newRoleName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__ROLE_NAME, oldRoleName, roleName)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_ROLE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE__DESCRIPTION: - return getDescription(); - case CommonPackage.SECURITY_ROLE__ROLE_NAME: - return getRoleName(); - case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE__DESCRIPTION: - return (DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description)) - || (descriptions != null && !descriptions.isEmpty()); - case CommonPackage.SECURITY_ROLE__ROLE_NAME: - return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); - case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.SECURITY_ROLE__ROLE_NAME: - setRoleName((String)newValue); - return; - case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.SECURITY_ROLE__ROLE_NAME: - setRoleName(ROLE_NAME_EDEFAULT); - return; - case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toStringGen() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", roleName: "); //$NON-NLS-1$ - result.append(roleName); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleRefImpl.java deleted file mode 100644 index 47488a2b9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/SecurityRoleRefImpl.java +++ /dev/null @@ -1,288 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; - - -/** - * @generated - */ -public class SecurityRoleRefImpl extends EObjectImpl implements SecurityRoleRef{ - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected static final String LINK_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String link = LINK_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public SecurityRoleRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getSecurityRoleRef(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE_REF__NAME, oldName, name)); - } - - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - d.setValue(newDescription); - } - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); - } - - public String getDescription() { - if (getDescriptions() != null && !getDescriptions().isEmpty()) { - Description d = (Description) getDescriptions().get(0); - if (d != null) - description = d.getValue(); - } - return description; - } - - /** - * @generated This field/method will be replaced during code generation - * The role-link element is used to link a security role reference to a defined security role. The role-link element must contain the name of one of the security roles defined in the security-role elements. - */ - public String getLink() { - return link; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLink(String newLink) { - String oldLink = link; - link = newLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE_REF__LINK, oldLink, link)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE_REF__NAME: - return getName(); - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: - return getDescription(); - case CommonPackage.SECURITY_ROLE_REF__LINK: - return getLink(); - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE_REF__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.SECURITY_ROLE_REF__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE_REF__NAME: - setName((String)newValue); - return; - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.SECURITY_ROLE_REF__LINK: - setLink((String)newValue); - return; - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.SECURITY_ROLE_REF__NAME: - setName(NAME_EDEFAULT); - return; - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.SECURITY_ROLE_REF__LINK: - setLink(LINK_EDEFAULT); - return; - case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(", link: "); //$NON-NLS-1$ - result.append(link); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/UseCallerIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/UseCallerIdentityImpl.java deleted file mode 100644 index c666782ad..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/UseCallerIdentityImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.UseCallerIdentity; - - -/** - * The use-caller-identity element specifies that the caller's security identity be used as the security identity for the execution of the enterprise bean's methods. - - */ -public class UseCallerIdentityImpl extends SecurityIdentityImpl implements UseCallerIdentity, SecurityIdentity{ - - public UseCallerIdentityImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return CommonPackage.eINSTANCE.getUseCallerIdentity(); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: - return getDescription(); - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isUseCallerIdentity() - */ - public boolean isUseCallerIdentity() { - return true; - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceFactory.java deleted file mode 100644 index 3d5db8a4d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; -import org.eclipse.jst.j2ee.common.XMLResource; - - -/** - * @deprecated Since 4/22/2003 - * This is replaced with concrete implementers of {@link com.ibm.etools.emf2xml.impl.TranslatorResourceFactory} - */ - -public abstract class XMLResourceFactory extends ResourceFactoryImpl { -/** - * EJBJarResourceFactory constructor comment. - */ -public XMLResourceFactory() { - //TODO: Delete this class - super(); -} - -/** - * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl#createResource(URI) - */ -public final Resource createResource(URI uri) { - XMLResource resource = primCreateResource(uri); - resource.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - resource.getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80)); - return resource; -} - -/** - * Method primCreateResource. - * @param uri - * @return XMLResource - */ -protected abstract XMLResource primCreateResource(URI uri) ; - -} - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceImpl.java deleted file mode 100644 index 532ac42b6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/impl/XMLResourceImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jst.j2ee.application.Application; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl; -import org.xml.sax.EntityResolver; - - -public abstract class XMLResourceImpl extends TranslatorResourceImpl implements XMLResource,J2EEVersionResource { - /** Indicator to determine if this resource was loaded as an alt-dd (from an ear), - * default is false */ - protected boolean isAlt = false; - /** The application which declared the alt-dd for this resource; exists only if this resource is and - * alt dd */ - protected Application application; - protected boolean isNew = true; - - - private static class RootVersionAdapter extends AdapterImpl { - static final String ADAPTER_TYPE = RootVersionAdapter.class.getName(); - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object) - */ - public boolean isAdapterForType(Object type) { - return super.isAdapterForType(type); - } - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification) - */ - public void notifyChanged(Notification msg) { - if (msg.getFeatureID(null) == RESOURCE__CONTENTS && - msg.getEventType() == Notification.ADD) { - ((XMLResourceImpl)msg.getNotifier()).syncVersionOfRootObject(); - ((Notifier)msg.getNotifier()).eAdapters().remove(this); - } - } - - - - - } - - /** - * @deprecated since 4/29/2003 - used for compatibility - * Subclasses should be using the Renderers and translator framework - */ - public XMLResourceImpl() { - super(); - } - - /** - * @deprecated since 4/29/2003 - used for compatibility - * Subclasses should be using the Renderers and translator framework - */ - public XMLResourceImpl(URI uri) { - super(uri); - } - - public XMLResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - public XMLResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#initializeContents() - */ - protected void initializeContents() { - super.initializeContents(); - eAdapters().add(new RootVersionAdapter()); - } - - - /** - * Is this a resource loaded as an alternate deployment descriptor? - */ - public boolean isAlt() { - return isAlt; - } - - - public void setApplication(Application newApplication) { - application = newApplication; - } - /** - * Is this a resource loaded as an alternate deployment descriptor? - */ - public void setIsAlt(boolean isAlternateDD) { - isAlt = isAlternateDD; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return J2EE_1_4_ID; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) - * This is setting the module version on the resource, where values are different that the J2EE version, this will be overridden - */ - public void setDoctypeValues(String publicId, String systemId) { - int version = J2EE_1_4_ID; - if (systemId == null) - version = J2EE_1_4_ID; - else if (systemId.equals(getJ2EE_1_3_SystemID())) - version = J2EE_1_3_ID; - else if (systemId.equals(getJ2EE_1_2_SystemID())) - version = J2EE_1_2_ID; - super.setDoctypeValues(publicId, systemId); - setJ2EEVersionID(version); - } - - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#usesDTD() - */ - public boolean usesDTD() { - return getVersionID() != J2EE_1_4_ID; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#setVersionID(int) - * @deprecated, Use setJ2EEVersionID() to set module version based on j2ee version - **/ - public void setVersionID(int id) { - setJ2EEVersionID(id); - } - protected void primSetVersionID(int id) { - super.setVersionID(id); - } - protected void primSetDoctypeValues(String aPublicId, String aSystemId) { - super.setDoctypeValues(aPublicId,aSystemId); - } - /* - * Sets the module version based on the J2EE version - */ - public abstract void setJ2EEVersionID(int id); - /* - * Sets the module version directly - * */ - public abstract void setModuleVersionID(int id); - /** - * @deprecated - * (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.XMLResource#isJ2EE1_3() - */ - public boolean isJ2EE1_3() { - return getVersionID() == J2EE_1_3_ID; - } - - /** - * @deprecated use {@link TranslatorResource#setVersionID(int)}, - * {@link TranslatorResource#setDoctypeValues(String, String)} - * Sets the system id of the XML document. - * @see J2EEVersionConstants - */ - public void setPublicId(String id) { - setDoctypeValues(id, getSystemId()); - } - - /** - * @deprecated use {@link TranslatorResource#setVersionID(int)}, - * {@link TranslatorResource#setDoctypeValues(String, String)} - * Sets the public id of the XML document. - * @see J2EEVersionConstants - */ - public void setSystemId(String id) { - setDoctypeValues(getPublicId(), id); - } - protected String getDefaultPublicId() { - switch (getVersionID()) { - case (J2EE_1_2_ID) : - return getJ2EE_1_2_PublicID(); - case (J2EE_1_3_ID) : - return getJ2EE_1_3_PublicID(); - default : - return null; - } - } - - protected String getDefaultSystemId() { - switch (getVersionID()) { - case (J2EE_1_2_ID) : - return getJ2EE_1_2_SystemID(); - case (J2EE_1_3_ID) : - return getJ2EE_1_3_SystemID(); - default : - return null; - } - } - public abstract String getJ2EE_1_2_PublicID(); - public abstract String getJ2EE_1_2_SystemID(); - public abstract String getJ2EE_1_3_PublicID(); - public abstract String getJ2EE_1_3_SystemID(); - - - public NotificationChain basicSetResourceSet(ResourceSet aResourceSet, NotificationChain notifications) { - if (aResourceSet == null && this.resourceSet != null) - preDelete(); - return super.basicSetResourceSet(aResourceSet, notifications); - } - - public Application getApplication() { - return application; - } - - /** - * @deprecated - use getJ2EEVersionID() and getModuleVersionID() - */ - public int getVersionID() { - return getJ2EEVersionID(); - } - - public EntityResolver getEntityResolver() { - return J2EEXmlDtDEntityResolver.INSTANCE; - } - /* All subclasses will derive this value based on their module version - */ - public abstract int getJ2EEVersionID(); - - - - /* This will be computed during loads of the resource - */ - public int getModuleVersionID() { - return super.getVersionID(); - } - - protected abstract void syncVersionOfRootObject(); - - protected String getModuleVersionString() { - float ver = getModuleVersionID(); - Float specVersion = new Float(ver/10); - return specVersion.toString(); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonAdapterFactory.java deleted file mode 100644 index 778a833a3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonAdapterFactory.java +++ /dev/null @@ -1,464 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.Identity; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.UseCallerIdentity; - - - -public class CommonAdapterFactory extends AdapterFactoryImpl { - protected static CommonPackage modelPackage; - - public CommonAdapterFactory() { - if (modelPackage == null) { - modelPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createSecurityRoleAdapter() { - return null; - } - - public Adapter createResourceRefAdapter() { - return null; - } - - public Adapter createEjbRefAdapter() { - return null; - } - - public Adapter createEJBLocalRefAdapter() { - return null; - } - - public Adapter createEnvEntryAdapter() { - return null; - } - - public Adapter createSecurityRoleRefAdapter() { - return null; - } - - public Adapter createRunAsSpecifiedIdentityAdapter() { - return null; - } - - public Adapter createSecurityIdentityAdapter() { - return null; - } - - public Adapter createUseCallerIdentityAdapter() { - return null; - } - - public Adapter createIdentityAdapter() { - return null; - } - - public Adapter createResourceEnvRefAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected CommonSwitch modelSwitch = - new CommonSwitch() { - public Object caseEjbRef(EjbRef object) { - return createEjbRefAdapter(); - } - public Object caseEnvEntry(EnvEntry object) { - return createEnvEntryAdapter(); - } - public Object caseResourceRef(ResourceRef object) { - return createResourceRefAdapter(); - } - public Object caseSecurityRoleRef(SecurityRoleRef object) { - return createSecurityRoleRefAdapter(); - } - public Object caseSecurityRole(SecurityRole object) { - return createSecurityRoleAdapter(); - } - public Object caseResourceEnvRef(ResourceEnvRef object) { - return createResourceEnvRefAdapter(); - } - public Object caseEJBLocalRef(EJBLocalRef object) { - return createEJBLocalRefAdapter(); - } - public Object caseRunAsSpecifiedIdentity(RunAsSpecifiedIdentity object) { - return createRunAsSpecifiedIdentityAdapter(); - } - public Object caseIdentity(Identity object) { - return createIdentityAdapter(); - } - public Object caseIconType(IconType object) { - return createIconTypeAdapter(); - } - public Object caseDisplayName(DisplayName object) { - return createDisplayNameAdapter(); - } - public Object caseMessageDestinationRef(MessageDestinationRef object) { - return createMessageDestinationRefAdapter(); - } - public Object caseMessageDestination(MessageDestination object) { - return createMessageDestinationAdapter(); - } - public Object caseParamValue(ParamValue object) { - return createParamValueAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return createJNDIEnvRefsGroupAdapter(); - } - public Object caseSecurityIdentity(SecurityIdentity object) { - return createSecurityIdentityAdapter(); - } - public Object caseUseCallerIdentity(UseCallerIdentity object) { - return createUseCallerIdentityAdapter(); - } - public Object caseDescription(Description object) { - return createDescriptionAdapter(); - } - public Object caseQName(QName object) { - return createQNameAdapter(); - } - public Object caseListener(Listener object) { - return createListenerAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSecurityRoleAdapterGen() { - - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createResourceRefAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEjbRefAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEJBLocalRefAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEnvEntryAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSecurityRoleRefAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createRunAsSpecifiedIdentityAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSecurityIdentityAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createUseCallerIdentityAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Description Description}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.Description - * @generated - */ - public Adapter createDescriptionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.QName - * @generated - */ - public Adapter createQNameAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Listener Listener}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.Listener - * @generated - */ - public Adapter createListenerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createIdentityAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.IconType Icon Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.IconType - * @generated - */ - public Adapter createIconTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DisplayName Display Name}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DisplayName - * @generated - */ - public Adapter createDisplayNameAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.MessageDestinationRef Message Destination Ref}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.MessageDestinationRef - * @generated - */ - public Adapter createMessageDestinationRefAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.MessageDestination Message Destination}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.MessageDestination - * @generated - */ - public Adapter createMessageDestinationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.ParamValue Param Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.ParamValue - * @generated - */ - public Adapter createParamValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup - * @generated - */ - public Adapter createJNDIEnvRefsGroupAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createResourceEnvRefAdapterGen() { - return null; - } - -} //CommonAdapterFactory - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonSwitch.java deleted file mode 100644 index 9eaeb7072..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonSwitch.java +++ /dev/null @@ -1,571 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.EnvEntry; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.Identity; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.MessageDestinationRef; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.UseCallerIdentity; - - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.common.CommonPackage - * @generated - */ -public class CommonSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static CommonPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public CommonSwitch() { - if (modelPackage == null) { - modelPackage = CommonPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case CommonPackage.EJB_REF: { - EjbRef ejbRef = (EjbRef)theEObject; - Object result = caseEjbRef(ejbRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.ENV_ENTRY: { - EnvEntry envEntry = (EnvEntry)theEObject; - Object result = caseEnvEntry(envEntry); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.RESOURCE_REF: { - ResourceRef resourceRef = (ResourceRef)theEObject; - Object result = caseResourceRef(resourceRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.SECURITY_ROLE_REF: { - SecurityRoleRef securityRoleRef = (SecurityRoleRef)theEObject; - Object result = caseSecurityRoleRef(securityRoleRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.SECURITY_ROLE: { - SecurityRole securityRole = (SecurityRole)theEObject; - Object result = caseSecurityRole(securityRole); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.RESOURCE_ENV_REF: { - ResourceEnvRef resourceEnvRef = (ResourceEnvRef)theEObject; - Object result = caseResourceEnvRef(resourceEnvRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.EJB_LOCAL_REF: { - EJBLocalRef ejbLocalRef = (EJBLocalRef)theEObject; - Object result = caseEJBLocalRef(ejbLocalRef); - if (result == null) result = caseEjbRef(ejbLocalRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.RUN_AS_SPECIFIED_IDENTITY: { - RunAsSpecifiedIdentity runAsSpecifiedIdentity = (RunAsSpecifiedIdentity)theEObject; - Object result = caseRunAsSpecifiedIdentity(runAsSpecifiedIdentity); - if (result == null) result = caseSecurityIdentity(runAsSpecifiedIdentity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.IDENTITY: { - Identity identity = (Identity)theEObject; - Object result = caseIdentity(identity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.ICON_TYPE: { - IconType iconType = (IconType)theEObject; - Object result = caseIconType(iconType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.DISPLAY_NAME: { - DisplayName displayName = (DisplayName)theEObject; - Object result = caseDisplayName(displayName); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.MESSAGE_DESTINATION_REF: { - MessageDestinationRef messageDestinationRef = (MessageDestinationRef)theEObject; - Object result = caseMessageDestinationRef(messageDestinationRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.MESSAGE_DESTINATION: { - MessageDestination messageDestination = (MessageDestination)theEObject; - Object result = caseMessageDestination(messageDestination); - if (result == null) result = caseCompatibilityDescriptionGroup(messageDestination); - if (result == null) result = caseDescriptionGroup(messageDestination); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.PARAM_VALUE: { - ParamValue paramValue = (ParamValue)theEObject; - Object result = caseParamValue(paramValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.DESCRIPTION_GROUP: { - DescriptionGroup descriptionGroup = (DescriptionGroup)theEObject; - Object result = caseDescriptionGroup(descriptionGroup); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.SECURITY_IDENTITY: { - SecurityIdentity securityIdentity = (SecurityIdentity)theEObject; - Object result = caseSecurityIdentity(securityIdentity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.USE_CALLER_IDENTITY: { - UseCallerIdentity useCallerIdentity = (UseCallerIdentity)theEObject; - Object result = caseUseCallerIdentity(useCallerIdentity); - if (result == null) result = caseSecurityIdentity(useCallerIdentity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.DESCRIPTION: { - Description description = (Description)theEObject; - Object result = caseDescription(description); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.QNAME: { - QName qName = (QName)theEObject; - Object result = caseQName(qName); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.LISTENER: { - Listener listener = (Listener)theEObject; - Object result = caseListener(listener); - if (result == null) result = caseCompatibilityDescriptionGroup(listener); - if (result == null) result = caseDescriptionGroup(listener); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP: { - CompatibilityDescriptionGroup compatibilityDescriptionGroup = (CompatibilityDescriptionGroup)theEObject; - Object result = caseCompatibilityDescriptionGroup(compatibilityDescriptionGroup); - if (result == null) result = caseDescriptionGroup(compatibilityDescriptionGroup); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Ejb Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Ejb Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEjbRef(EjbRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Env Entry'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Env Entry'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEnvEntry(EnvEntry object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Resource Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Resource Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseResourceRef(ResourceRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Security Role Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Security Role Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSecurityRoleRef(SecurityRoleRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Security Role'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Security Role'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSecurityRole(SecurityRole object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Resource Env Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Resource Env Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseResourceEnvRef(ResourceEnvRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Local Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Local Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBLocalRef(EJBLocalRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Run As Specified Identity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Run As Specified Identity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRunAsSpecifiedIdentity(RunAsSpecifiedIdentity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Security Identity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Security Identity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSecurityIdentity(SecurityIdentity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Identity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Identity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIdentity(Identity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Icon Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Icon Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIconType(IconType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Display Name'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Display Name'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDisplayName(DisplayName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Destination Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Destination Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageDestinationRef(MessageDestinationRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Destination'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Destination'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageDestination(MessageDestination object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Param Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Param Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseParamValue(ParamValue object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Use Caller Identity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Use Caller Identity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseUseCallerIdentity(UseCallerIdentity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescription(Description object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'QName'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'QName'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQName(QName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Listener'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Listener'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseListener(Listener object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //CommonSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonUtil.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonUtil.java deleted file mode 100644 index c72ad7a39..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/CommonUtil.java +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.jst.j2ee.application.impl.ApplicationFactoryImpl; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; -import org.eclipse.jst.j2ee.internal.xml.J2EEXMLResourceHandler; -import org.eclipse.jst.j2ee.jca.impl.JcaFactoryImpl; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationFactoryImpl; - - -public class CommonUtil { -public static boolean isDeploymentDescriptorRoot(EObject o) { - return isDeploymentDescriptorRoot(o, true); -} -public static boolean isDeploymentDescriptorRoot(EObject o, boolean includeEars) { - EObject meta = o.eClass(); - return (includeEars && meta == eClassApplication()) || - meta == eClassApplicationClient() || - meta == eClassEJBJar() || - meta == eClassWebApp() || - meta == eClassConnector(); -} -public static boolean isDeploymentDescriptorRoot(Object o) { - return isDeploymentDescriptorRoot(o, true); -} -public static boolean isDeploymentDescriptorRoot(Object o, boolean includeEARs) { - if (o instanceof EObject) - return isDeploymentDescriptorRoot((EObject)o, includeEARs); - return false; -} -protected static EClass eClassApplication() { - return ApplicationFactoryImpl.getPackage().getApplication(); -} -protected static EClass eClassApplicationClient() { - return ClientFactoryImpl.getPackage().getApplicationClient(); -} -protected static EClass eClassEJBJar() { - return EjbFactoryImpl.getPackage().getEJBJar(); -} -protected static EClass eClassWebApp() { - return WebapplicationFactoryImpl.getPackage().getWebApp(); -} - -protected static EClass eClassConnector() { - return JcaFactoryImpl.getPackage().getConnector(); -} -/** - * Safety check method to ensure that the version of the dd object can be computed. - */ -public static void checkDDObjectForVersion(EObject dd) { - if (dd.eIsProxy()) { - String proxyUri = ((InternalEObject)dd).eProxyURI().toString(); - String message = J2EEXMLResourceHandler.getString("J2EE_VERSION_PROXY_ERROR", new Object[]{proxyUri}); //$NON-NLS-1$ - throw new IllegalStateException(message); - } else if (dd.eResource() == null) { - String message = J2EEXMLResourceHandler.getString("J2EE_VERSION_NULL_ERROR"); //$NON-NLS-1$ - throw new IllegalStateException(message); - } -} - -} - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultable.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultable.java deleted file mode 100644 index 77de336c4..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultable.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -import org.eclipse.emf.common.notify.Notifier; -/** - * Interface used for objects that can be "fluffed up" on demand, but not serialized unless modified - */ -public interface Defaultable extends Notifier { -public boolean isDefault(); -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/DefaultedAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/DefaultedAdapterImpl.java deleted file mode 100644 index 69af9e856..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/DefaultedAdapterImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -/** - * Insert the type's description here. - * Creation date: (03/22/01 10:54:22 AM) - * @author: Administrator - */ -public abstract class DefaultedAdapterImpl extends AdapterImpl { - final static String ADAPTER_KEY = "DEFAULTED_ADAPTER"; //$NON-NLS-1$ - protected boolean fNotify = true; -/** - * DefaultedAdapter constructor comment. - */ -public DefaultedAdapterImpl() { - super(); -} -public abstract EObject defaultContainer(); -public boolean isAdapterForType(Object type) { - return ADAPTER_KEY.equals(type); -} -public static boolean isDefault(Defaultable object) { - Defaultor defaultor = (Defaultor) retrieveDefaultContainerFor(object); - return defaultor != null && defaultor.isDefault(object); -} - -/** - * Insert the method's description here. - * Creation date: (6/13/2001 8:43:41 PM) - * @return boolean - */ -public boolean isNotify() { - return fNotify; -} -public static DefaultedAdapterImpl retrieveAdapterFor(Defaultable notifier) { - return (DefaultedAdapterImpl)EcoreUtil.getExistingAdapter(notifier,ADAPTER_KEY); -} -public static EObject retrieveDefaultContainerFor(Defaultable notifier) { - DefaultedAdapterImpl adapter = retrieveAdapterFor(notifier); - return adapter == null ? null : adapter.defaultContainer(); -} -/** - * Insert the method's description here. - * Creation date: (6/13/2001 8:43:41 PM) - * @param newNotify boolean - */ -public void setNotify(boolean newNotify) { - fNotify = newNotify; -} -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultor.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultor.java deleted file mode 100644 index 66ce8bf80..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/Defaultor.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -/** - * Insert the type's description here. - * Creation date: (6/15/2001 4:58:15 PM) - * @author: Administrator - */ -public interface Defaultor { -/** - * Returns true if this objects create @aDefaultable and it is still - * currently default and not contained. - * Creation date: (6/15/2001 4:59:28 PM) - * @return boolean - * @param aDefaultable org.eclipse.jst.j2ee.internal.common.util.Defaultable - */ -boolean isDefault(Defaultable aDefaultable); -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/IDUtility.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/IDUtility.java deleted file mode 100644 index 1e1557950..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/IDUtility.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.wst.common.emf.utilities.IDUtil; - - -/** - * Utility class for generating and setting unique id's for ref objects contained within a resource. This is needed - * sometimes when a refobject is referenced by an object in a separate resource. This utility will force the refobject - * to notify after the id gets set, using the static feature on this class. The object must be contained in a resource - * for the utility methods to work. - */ -public class IDUtility { - -/** - * IDUtility constructor comment. - */ -public IDUtility() { - super(); -} -/** - * Generate a default id and notify. - */ -protected static String primSetDefaultID(EObject object) { - return IDUtil.getOrAssignID(object); -} - -/** - * Generate a default id and notify. - * Helper for default id generation to support cross document references to non xmi resources - * (eg, xml deployment descriptors); called from overriden accessors in selected objects; - */ -public static String setDefaultID(EObject object) { - if (object == null || object.eResource() == null) - return null; - return primSetDefaultID(object); -} - -/** - * Generate a default id and notify, for this object and for all referenced objects that are contained - * within the same resource. Helper for default id generation to support cross document references to non xmi resources - * (eg, xml deployment descriptors); useful for post copy/add - */ -public static String setDefaultID(EObject object, boolean recurseChildren) { - if (object == null || object.eResource() == null) - return null; - - String result = primSetDefaultID(object); - - if (recurseChildren) - setDefaultIDForChildren(object); - - return result; -} - -protected static void setDefaultIDForChildren(EObject object) { - - List objects = object.eContents(); - for (int i = 0; i < objects.size(); i++){ - EObject o = (EObject)objects.get(i); - primSetDefaultID(o); - } -} -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/XmlSpecifiedDataAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/XmlSpecifiedDataAdapter.java deleted file mode 100644 index 8fbb0f968..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/common/util/XmlSpecifiedDataAdapter.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.common.util; - -/** - * Insert the type's description here. - * Creation date: (06/04/01 7:56:22 PM) - * @author: Administrator - */ -public class XmlSpecifiedDataAdapter extends org.eclipse.emf.common.notify.impl.AdapterImpl { - protected final static String ADAPTER_KEY = "XML_SPECIFIED_ADAPTER"; //$NON-NLS-1$ -/** - * XmlSpecifiedDataAdapter constructor comment. - */ -public XmlSpecifiedDataAdapter() { - super(); -} -public boolean isAdapterForType(Object type) { - return ADAPTER_KEY.equals(type); -} -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbFactory.java index 234b7a8db..41840dc77 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbFactory.java @@ -23,7 +23,7 @@ public interface EjbFactory extends EFactory{ * * @generated */ - EjbFactory eINSTANCE = new org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl(); + EjbFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl(); MethodElement createMethodElement(String aSignature) ; MethodElement createMethodElementFrom(Method method) ; diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbMethodElementHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbMethodElementHelper.java index febf047d1..802cc562c 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbMethodElementHelper.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbMethodElementHelper.java @@ -32,7 +32,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.jem.java.JavaClass; import org.eclipse.jem.java.JavaRefFactory; import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; /** * @author blancett diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbPackage.java index c617c465e..7ddc4920e 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/EjbPackage.java @@ -1906,7 +1906,7 @@ public interface EjbPackage extends EPackage{ * * @generated */ - EjbPackage eINSTANCE = org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl.init(); + EjbPackage eINSTANCE = org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRelationshipRoleAttributeFilter.java deleted file mode 100644 index c5877e4ad..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRelationshipRoleAttributeFilter.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * Insert the type's description here. - * Creation date: (11/28/2000 7:06:49 PM) - * @author: Administrator - */ -public abstract class AbstractRelationshipRoleAttributeFilter extends ContainerManagedEntityFilter { -/** - * AbstractRelationshipRoleAttributeFilter constructor comment. - */ -public AbstractRelationshipRoleAttributeFilter() { - super(); -} -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - List attributes = new ArrayList(); - Iterator it = getSourceRoles(cmp).iterator(); - CommonRelationshipRole role; - while (it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - attributes.addAll(role.getAttributes()); - } - return attributes; -} -/** - * Return the proper list of roles from cmpExt. - */ -protected abstract java.util.List getSourceRoles(ContainerManagedEntity cmpExt) ; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRequiredRelationshipRoleFilter.java deleted file mode 100644 index 5b07265b3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AbstractRequiredRelationshipRoleFilter.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * Insert the type's description here. - * Creation date: (10/15/2001 11:37:19 AM) - * @author: Administrator - */ -public abstract class AbstractRequiredRelationshipRoleFilter extends ContainerManagedEntityFilter { -/** - * AbstractRequiredRelationshipRoleFilter constructor comment. - */ -public AbstractRequiredRelationshipRoleFilter() { - super(); -} -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - List roles = new ArrayList(); - List allRoles = getRolesToFilter(cmp); - CommonRelationshipRole role; - for (int i = 0; i < allRoles.size(); i++) { - role = (CommonRelationshipRole) allRoles.get(i); - if (shouldAddFilteredResult(role)) - roles.add(role); - } - return roles; -} -protected abstract java.util.List getRolesToFilter(ContainerManagedEntity cmp) ; -/** - * Return true if the multiplicity for @aRole is required. - */ -protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) { - boolean required = aRole.isRequired(); - if (required) { - CommonRelationshipRole opposite = aRole.getOppositeAsCommonRole(); - if (opposite != null) { - if (opposite.isRequired() && !aRole.isKey()) { - if (opposite.isKey() || aRole.isMany()) - return false; - if (!opposite.isMany()) - //both are single and not key - return aRole.isForward(); - } - } - } - return required; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigImpl.java deleted file mode 100644 index 628368b9e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.EjbPackage; - - -/** - * - * An implementation of the model object 'Activation Config'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigImpl#getConfigProperties Config Properties}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigImpl#getDescriptions Descriptions}
  • - *
- *

- * - * @generated - */ -public class ActivationConfigImpl extends EObjectImpl implements ActivationConfig { - /** - * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. - * - * - * @see #getConfigProperties() - * @generated - * @ordered - */ - protected EList configProperties = null; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - /** - * - * - * @generated - */ - protected ActivationConfigImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getActivationConfig(); - } - - /** - * - * - * @generated - */ - public EList getConfigProperties() { - if (configProperties == null) { - configProperties = new EObjectContainmentEList(ActivationConfigProperty.class, this, EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES); - } - return configProperties; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: - return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: - return getConfigProperties(); - case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: - getConfigProperties().clear(); - getConfigProperties().addAll((Collection)newValue); - return; - case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: - getConfigProperties().clear(); - return; - case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: - return configProperties != null && !configProperties.isEmpty(); - case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //ActivationConfigImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigPropertyImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigPropertyImpl.java deleted file mode 100644 index a670f2315..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ActivationConfigPropertyImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.EjbPackage; - - -/** - * - * An implementation of the model object 'Activation Config Property'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigPropertyImpl#getValue Value}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigPropertyImpl#getName Name}
  • - *
- *

- * - * @generated - */ -public class ActivationConfigPropertyImpl extends EObjectImpl implements ActivationConfigProperty { - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected ActivationConfigPropertyImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getActivationConfigProperty(); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: - return getValue(); - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: - return getName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: - setValue((String)newValue); - return; - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: - setName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: - setValue(VALUE_EDEFAULT); - return; - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: - setName(NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (value: "); //$NON-NLS-1$ - result.append(value); - result.append(", name: "); //$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -} //ActivationConfigPropertyImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AssemblyDescriptorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AssemblyDescriptorImpl.java deleted file mode 100644 index 9cf2bbae9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/AssemblyDescriptorImpl.java +++ /dev/null @@ -1,483 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; - - -/** - * The assembly-descriptor element contains application-assembly information. The application-assembly information consists of the following parts: the definition of security roles, the definition of method permissions, and the definition of transaction attributes for enterprise beans with container-managed transaction demarcation. All the parts are optional in the sense that they are omitted if the lists represented by them are empty. Providing an assembly-descriptor in the deployment descriptor is optional for the ejb-jar file producer. - */ -public class AssemblyDescriptorImpl extends EObjectImpl implements AssemblyDescriptor, EObject { - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList methodPermissions = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList methodTransactions = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityRoles = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected ExcludeList excludeList = null; - /** - * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. - * - * - * @see #getMessageDestinations() - * @generated - * @ordered - */ - protected EList messageDestinations = null; - - public AssemblyDescriptorImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getAssemblyDescriptor(); - } - -/** - * Return the first method permission that contains all the roles in securityRoles and - * is the same size - */ - -public MethodPermission getMethodPermission(List securityRolesList) { - List permissions = getMethodPermissions(); - MethodPermission temp = null; - for (int i = 0; i < permissions.size(); i++) { - temp = (MethodPermission) permissions.get(i); - if (temp.getRoles().containsAll(securityRolesList) && temp.getRoles().size() == securityRolesList.size()) - return temp; - } - return null; -} -public List getMethodPermissionMethodElements(EnterpriseBean anEJB) { - List allMethodElements = new ArrayList(); - List permissions = getMethodPermissions(); - MethodPermission permission; - for (int i = 0; i < permissions.size(); i++){ - permission = (MethodPermission) permissions.get(i); - allMethodElements.addAll(permission.getMethodElements(anEJB)); - } - return allMethodElements; -} - - -public List getMethodTransactionMethodElements(EnterpriseBean anEJB) { - List allMethodElements = new ArrayList(); - List transactions = getMethodTransactions(); - MethodTransaction transaction; - for (int i = 0; i < transactions.size(); i++){ - transaction = (MethodTransaction) transactions.get(i); - allMethodElements.addAll(transaction.getMethodElements(anEJB)); - } - return allMethodElements; -} - -public SecurityRole getSecurityRoleNamed(String roleName) { - java.util.List tempRoles = getSecurityRoles(); - SecurityRole role; - for (int i = 0; i < tempRoles.size(); i++) { - role = (SecurityRole) tempRoles.get(i); - if (role.getRoleName().equals(roleName)) - return role; - } - return null; -} - -/** - * @see org.eclipse.jst.j2ee.internal.ejb.AssemblyDescriptor - */ -public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { - SecurityRole role = getSecurityRoleNamed(existingRoleName); - role.setRoleName(newRoleName); -} - /** - * @generated This field/method will be replaced during code generation - */ - public EList getMethodPermissions() { - if (methodPermissions == null) { - methodPermissions = new EObjectContainmentWithInverseEList(MethodPermission.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR); - } - return methodPermissions; - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies how the container must manage transaction scopes for the enterprise - * bean's method invocations. The element consists of an optional description, a - * list of method elements, and a transaction attribute.The transaction attribute - * is to be applied to all the specified methods. - */ - public EList getMethodTransactions() { - if (methodTransactions == null) { - methodTransactions = new EObjectContainmentWithInverseEList(MethodTransaction.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR); - } - return methodTransactions; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EJBJar getEjbJar() { - if (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR) return null; - return (EJBJar)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbJar(EJBJar newEjbJar) { - if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR && newEjbJar != null)) { - if (EcoreUtil.isAncestor(this, newEjbJar)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newEjbJar != null) - msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, newEjbJar, newEjbJar)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getSecurityRoles() { - if (securityRoles == null) { - securityRoles = new EObjectContainmentEList(SecurityRole.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES); - } - return securityRoles; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public ExcludeList getExcludeList() { - return excludeList; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetExcludeList(ExcludeList newExcludeList, NotificationChain msgs) { - ExcludeList oldExcludeList = excludeList; - excludeList = newExcludeList; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, oldExcludeList, newExcludeList); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setExcludeList(ExcludeList newExcludeList) { - if (newExcludeList != excludeList) { - NotificationChain msgs = null; - if (excludeList != null) - msgs = ((InternalEObject)excludeList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs); - if (newExcludeList != null) - msgs = ((InternalEObject)newExcludeList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs); - msgs = basicSetExcludeList(newExcludeList, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, newExcludeList, newExcludeList)); - } - - /** - * - * - * @generated - */ - public EList getMessageDestinations() { - if (messageDestinations == null) { - messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS); - } - return messageDestinations; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - return ((InternalEList)getMethodPermissions()).basicAdd(otherEnd, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - return ((InternalEList)getMethodTransactions()).basicAdd(otherEnd, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - return ((InternalEList)getMethodPermissions()).basicRemove(otherEnd, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - return ((InternalEList)getMethodTransactions()).basicRemove(otherEnd, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: - return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: - return basicSetExcludeList(null, msgs); - case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: - return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - return getMethodPermissions(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - return getMethodTransactions(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - return getEjbJar(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: - return getSecurityRoles(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: - return getExcludeList(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: - return getMessageDestinations(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - return methodPermissions != null && !methodPermissions.isEmpty(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - return methodTransactions != null && !methodTransactions.isEmpty(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: - return securityRoles != null && !securityRoles.isEmpty(); - case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: - return excludeList != null; - case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: - return messageDestinations != null && !messageDestinations.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - getMethodPermissions().clear(); - getMethodPermissions().addAll((Collection)newValue); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - getMethodTransactions().clear(); - getMethodTransactions().addAll((Collection)newValue); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: - getSecurityRoles().clear(); - getSecurityRoles().addAll((Collection)newValue); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: - setExcludeList((ExcludeList)newValue); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - getMessageDestinations().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: - getMethodPermissions().clear(); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: - getMethodTransactions().clear(); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: - getSecurityRoles().clear(); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: - setExcludeList((ExcludeList)null); - return; - case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * Remove the MethodElements that are referencing @anEJB. - */ - public void removeData(EnterpriseBean anEJB) { - if (anEJB != null) { - removeMethodPermissionData(anEJB); - removeMethodTransactionData(anEJB); - } - } - /** - * Remove the MethodElements that are referencing @anEJB. - */ - protected void removeMethodPermissionData(EnterpriseBean anEJB) { - List mes = getMethodPermissionMethodElements(anEJB); - MethodElement me; - MethodPermission mp; - for (int i = 0; i < mes.size(); i++){ - me = (MethodElement) mes.get(i); - mp = (MethodPermission)me.eContainer(); - if (mp.getMethodElements().size() == 1){ - ExtendedEcoreUtil.becomeProxy(mp, mp.eResource()); - getMethodPermissions().remove(mp); - } - else{ - ExtendedEcoreUtil.becomeProxy(me, me.eResource()); - mp.getMethodElements().remove(me); - } - } - } - /** - * Remove the MethodElements that are referencing @anEJB. - */ - protected void removeMethodTransactionData(EnterpriseBean anEJB) { - List mes = getMethodTransactionMethodElements(anEJB); - MethodElement me; - MethodTransaction mt; - for (int i = 0; i < mes.size(); i++){ - me = (MethodElement) mes.get(i); - mt = (MethodTransaction)me.eContainer(); - if (mt.getMethodElements().size() == 1){ - ExtendedEcoreUtil.becomeProxy(mt, mt.eResource()); - getMethodTransactions().remove(mt); - } - else{ - ExtendedEcoreUtil.becomeProxy(me, me.eResource()); - mt.getMethodElements().remove(me); - } - } - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMPAttributeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMPAttributeImpl.java deleted file mode 100644 index 90c147ffc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMPAttributeImpl.java +++ /dev/null @@ -1,605 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; -import java.util.Collections; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EAttributeImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - -/** - * Describes a container-managed field. The field element includes an optional description of the field, and the name of the field. - - */ -public class CMPAttributeImpl extends EAttributeImpl implements CMPAttribute, EAttribute{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - protected transient JavaHelpers originatingType; - protected transient CMPAttribute targetAttribute; - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected boolean derived; - - public CMPAttributeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getCMPAttribute(); - } - -protected Field findExistingField() { - JavaClass javaClass = getEjbClass(); - if (javaClass != null) - return javaClass.getFieldExtended(getName()); - return null; -} -public org.eclipse.emf.ecore.EClassifier getAccessorType() { - if (getEjbClass() != null) { - Method getter = getEjbClass().getMethodExtended(getGetterName(), Collections.EMPTY_LIST); - if (getter != null) - return getter.getReturnType(); - } - return null; -} -public ContainerManagedEntity getCMPEntity() { - return (ContainerManagedEntity) eContainer(); -} -/** - * Return the EjbClass from the CMP Entity. - */ - -protected JavaClass getEjbClass() { - ContainerManagedEntity ejb = getCMPEntity(); - return ejb == null ? null : ejb.getEjbClass(); -} -/** - * Return the KeyClass from the CMP Entity. - */ - -protected JavaClass getKeyClass() { - ContainerManagedEntity ejb = getCMPEntity(); - return ejb == null ? null : ejb.getPrimaryKey(); -} -/** - * @deprecated - With EJB 2.0, assuming a Java field is no longer safe. - * Use getType() and getName() to get the most common field info. - * Or use getEjbClass() to get additional Java info. - */ - - public Field getField() { - ContainerManagedEntity ejb = getCMPEntity(); - - if(ejb == null) - return null; - - Field field = null; - switch(ejb.getVersionID()) { - case J2EEVersionConstants.EJB_1_0_ID: - case J2EEVersionConstants.EJB_1_1_ID: - field = findExistingField(); - //Set the field type based on the attribute type if necessary - if (field != null && getEType() != null && field.getEType() == null) - field.setEType(getEType()); - break; - case J2EEVersionConstants.EJB_2_0_ID: - case J2EEVersionConstants.EJB_2_1_ID: default: - field = ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory().createField(); - field.setName(getName()); - field.setEType(getAccessorType()); - break; - } - return field; -} -public String getGetterName() { - if (name != null && name.length() > 0) { - StringBuffer b = new StringBuffer("get"); //$NON-NLS-1$ - b.append(name.substring(0, 1).toUpperCase()).append(name.length() > 1 ? name.substring(1) : ""); //$NON-NLS-1$ - return b.toString(); - } - return name; -} -/** - * Return the type of this attribute in its original form (i.e., unwrapped if - * the type has been wrapped). - */ -public JavaHelpers getOriginatingType() { - return originatingType; -} -public String getSetterName() { - return "set" + getName().substring(0, 1).toUpperCase() + (getName().length() > 1 ? getName().substring(1) : ""); //$NON-NLS-1$ //$NON-NLS-2$ -} -public JavaHelpers getType() { - if (getEType() != null) - return (JavaHelpers) getEType(); - // Be sensitive to CMP 2.0 beans, get type from field or get accessor type - ContainerManagedEntity ejb = getCMPEntity(); - Resource res = eResource(); - boolean modFlag = res == null ? false : res.isModified(); - boolean deliveryFlag = eDeliver(); - try { - eSetDeliver(false); - if(ejb != null) { - switch(ejb.getVersionID()) { - case J2EEVersionConstants.EJB_1_0_ID: - case J2EEVersionConstants.EJB_1_1_ID: - setEType(getTypeFromBeanField()); - break; - case J2EEVersionConstants.EJB_2_0_ID: - case J2EEVersionConstants.EJB_2_1_ID: default: - setEType(get20Type()); - break; - } - } - } finally { - eSetDeliver(deliveryFlag); - if (res != null && res.isTrackingModification()) - res.setModified(modFlag); - } - return (JavaHelpers) getEType(); -} -protected EClassifier getTypeFromBeanField() { - EClassifier type = null; - Field field = getField(); - if (field != null) - type = field.getEType(); - if (type == null) - type = getKeyFieldTypeFromKeyClass(); - return type; -} -public EClassifier get20Type() { - EClassifier type = null; - if (getEjbClass() != null) { - String getterName = getGetterName(); - if (getterName != null && getterName.length() > 0) { - Method getter = getEjbClass().getMethodExtended(getterName, Collections.EMPTY_LIST); - if (getter != null) - type = getter.getReturnType(); - } - } - if (type == null) - type = getKeyFieldTypeFromKeyClass(); - return type; -} -/** - * @return - */ -private EClassifier getKeyFieldTypeFromKeyClass() { - if (isKey()) { - JavaClass key = getCMPEntity().getPrimaryKey(); - if (key != null && key.getQualifiedName() != null && !key.getQualifiedName().startsWith("java.lang")) { //$NON-NLS-1$ - Field field = key.getFieldExtended(getName()); - if (field != null) - return field.getEType(); - } else - return key; - } - return null; -} -public boolean isCMRField() { - return false; -} -public boolean isKey() { - return getCMPEntity() == null ? false : getCMPEntity().isKeyAttribute(this); -} - -public boolean isPrimKeyField(){ - return getCMPEntity() == null ? false : getCMPEntity().getPrimKeyField() == this; -} - -public void setOriginatingType(JavaHelpers newOriginatingType) { - originatingType = newOriginatingType; -} - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing the cmr field. - * - * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMP_ATTRIBUTE__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { - if (aFeatureID >= 0) { - switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS, msgs); - default: - return eDynamicInverseAdd(otherEnd, aFeatureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, aFeatureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { - if (aFeatureID >= 0) { - switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: - return eBasicSetContainer(null, EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS, msgs); - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, aFeatureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, aFeatureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: - return eContainer.eInverseRemove(this, EcorePackage.ECLASS__ESTRUCTURAL_FEATURES, EClass.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - return getEAnnotations(); - case EjbPackage.CMP_ATTRIBUTE__NAME: - return getName(); - case EjbPackage.CMP_ATTRIBUTE__ORDERED: - return isOrdered() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__UNIQUE: - return isUnique() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: - return new Integer(getLowerBound()); - case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: - return new Integer(getUpperBound()); - case EjbPackage.CMP_ATTRIBUTE__MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__ETYPE: - if (resolve) return getEType(); - return basicGetEType(); - case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: - return isChangeable() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__VOLATILE: - return isVolatile() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: - return isTransient() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: - return getDefaultValueLiteral(); - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE: - return getDefaultValue(); - case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: - return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__DERIVED: - return isDerived() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: - return getEContainingClass(); - case EjbPackage.CMP_ATTRIBUTE__ID: - return isID() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMP_ATTRIBUTE__EATTRIBUTE_TYPE: - if (resolve) return getEAttributeType(); - return basicGetEAttributeType(); - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: - return getDescription(); - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case EjbPackage.CMP_ATTRIBUTE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.CMP_ATTRIBUTE__ORDERED: - return ordered != ORDERED_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__UNIQUE: - return unique != UNIQUE_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: - return lowerBound != LOWER_BOUND_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: - return upperBound != UPPER_BOUND_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__MANY: - return isMany() != false; - case EjbPackage.CMP_ATTRIBUTE__REQUIRED: - return isRequired() != false; - case EjbPackage.CMP_ATTRIBUTE__ETYPE: - return eType != null; - case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: - return changeable != CHANGEABLE_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__VOLATILE: - return volatile_ != VOLATILE_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: - return transient_ != TRANSIENT_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: - return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE: - return getDefaultValue() != null; - case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: - return unsettable != UNSETTABLE_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__DERIVED: - return derived != DERIVED_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: - return getEContainingClass() != null; - case EjbPackage.CMP_ATTRIBUTE__ID: - return iD != ID_EDEFAULT; - case EjbPackage.CMP_ATTRIBUTE__EATTRIBUTE_TYPE: - return basicGetEAttributeType() != null; - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case EjbPackage.CMP_ATTRIBUTE__NAME: - setName((String)newValue); - return; - case EjbPackage.CMP_ATTRIBUTE__ORDERED: - setOrdered(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__UNIQUE: - setUnique(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: - setLowerBound(((Integer)newValue).intValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: - setUpperBound(((Integer)newValue).intValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__ETYPE: - setEType((EClassifier)newValue); - return; - case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: - setChangeable(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__VOLATILE: - setVolatile(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: - setTransient(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral((String)newValue); - return; - case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: - setUnsettable(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__DERIVED: - setDerived(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__ID: - setID(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: - getEAnnotations().clear(); - return; - case EjbPackage.CMP_ATTRIBUTE__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__ORDERED: - setOrdered(ORDERED_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__UNIQUE: - setUnique(UNIQUE_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: - setLowerBound(LOWER_BOUND_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: - setUpperBound(UPPER_BOUND_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__ETYPE: - setEType((EClassifier)null); - return; - case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: - setChangeable(CHANGEABLE_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__VOLATILE: - setVolatile(VOLATILE_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: - setTransient(TRANSIENT_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: - setUnsettable(UNSETTABLE_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__DERIVED: - setDerived(DERIVED_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__ID: - setID(ID_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * This field/method will be replaced during code generation. - */ - public String toString() { - return super.toString() + " :: " + getName(); //$NON-NLS-1$ - } - /** - * Returns true if a targetAttribute is being used. - * @return Returns a boolean - */ - public boolean isDerived() { - return derived; - } - public void setDerived(boolean aBoolean) { - if (aBoolean && getEType() == null) - getType(); //This ensures that the type is set. - derived = aBoolean; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public String toStringGen() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMRFieldImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMRFieldImpl.java deleted file mode 100644 index 46c6ba3ab..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/CMRFieldImpl.java +++ /dev/null @@ -1,470 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; - -/** - * Describes the bean provider's view of a relationship. It consists of an optional description, and the name and the class type of a field in the source of a role of a relationship. The CMRField::name element corresponds to the name used for the get and set accessor methods for the relationship. The CMRField::type element is used only for collection-valued CMRFields. It specifies the type of the collection that is used (a java class name). - * - - */ -public class CMRFieldImpl extends CMPAttributeImpl implements CMRField, CMPAttribute{ - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass collectionType = null; - public CMRFieldImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getCMRField(); - } - -/** - * createClassRef - return a JavaURL reference to the named Java class - */ -public JavaClass createClassRef(String targetName) { - return JavaRefFactory.eINSTANCE.createClassRef(targetName); -} -public String getCollectionTypeName() { - getCollectionType(); - return collectionType == null ? null : collectionType.getQualifiedName(); -} - -public boolean isPrimKeyField(){ - return false; -} - -public boolean isCMRField() { - return true; -} -public void setCollectionTypeName(String typeName) { - eSet(EjbPackage.eINSTANCE.getCMRField_CollectionType(), createClassRef(typeName)); -} - /** - * @generated This field/method will be replaced during code generation - */ - public EJBRelationshipRole getRole() { - if (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE) return null; - return (EJBRelationshipRole)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRole(EJBRelationshipRole newRole) { - if (newRole != eContainer || (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE && newRole != null)) { - if (EcoreUtil.isAncestor(this, newRole)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newRole != null) - msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.CMR_FIELD__ROLE, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__ROLE, newRole, newRole)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getCollectionType() { - if (collectionType != null && collectionType.eIsProxy()) { - JavaClass oldCollectionType = collectionType; - collectionType = (JavaClass)eResolveProxy((InternalEObject)collectionType); - if (collectionType != oldCollectionType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType)); - } - } - return collectionType; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetCollectionType() { - return collectionType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setCollectionType(JavaClass newCollectionType) { - JavaClass oldCollectionType = collectionType; - collectionType = newCollectionType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { - if (aFeatureID >= 0) { - switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); - case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.CMR_FIELD__ECONTAINING_CLASS, msgs); - case EjbPackage.CMR_FIELD__ROLE: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.CMR_FIELD__ROLE, msgs); - default: - return eDynamicInverseAdd(otherEnd, aFeatureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, aFeatureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { - if (aFeatureID >= 0) { - switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); - case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: - return eBasicSetContainer(null, EjbPackage.CMR_FIELD__ECONTAINING_CLASS, msgs); - case EjbPackage.CMR_FIELD__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.CMR_FIELD__ROLE: - return eBasicSetContainer(null, EjbPackage.CMR_FIELD__ROLE, msgs); - default: - return eDynamicInverseRemove(otherEnd, aFeatureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, aFeatureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: - return eContainer.eInverseRemove(this, EcorePackage.ECLASS__ESTRUCTURAL_FEATURES, EClass.class, msgs); - case EjbPackage.CMR_FIELD__ROLE: - return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - return getEAnnotations(); - case EjbPackage.CMR_FIELD__NAME: - return getName(); - case EjbPackage.CMR_FIELD__ORDERED: - return isOrdered() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__UNIQUE: - return isUnique() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__LOWER_BOUND: - return new Integer(getLowerBound()); - case EjbPackage.CMR_FIELD__UPPER_BOUND: - return new Integer(getUpperBound()); - case EjbPackage.CMR_FIELD__MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__ETYPE: - if (resolve) return getEType(); - return basicGetEType(); - case EjbPackage.CMR_FIELD__CHANGEABLE: - return isChangeable() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__VOLATILE: - return isVolatile() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__TRANSIENT: - return isTransient() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: - return getDefaultValueLiteral(); - case EjbPackage.CMR_FIELD__DEFAULT_VALUE: - return getDefaultValue(); - case EjbPackage.CMR_FIELD__UNSETTABLE: - return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__DERIVED: - return isDerived() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: - return getEContainingClass(); - case EjbPackage.CMR_FIELD__ID: - return isID() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CMR_FIELD__EATTRIBUTE_TYPE: - if (resolve) return getEAttributeType(); - return basicGetEAttributeType(); - case EjbPackage.CMR_FIELD__DESCRIPTION: - return getDescription(); - case EjbPackage.CMR_FIELD__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.CMR_FIELD__ROLE: - return getRole(); - case EjbPackage.CMR_FIELD__COLLECTION_TYPE: - if (resolve) return getCollectionType(); - return basicGetCollectionType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - return eAnnotations != null && !eAnnotations.isEmpty(); - case EjbPackage.CMR_FIELD__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.CMR_FIELD__ORDERED: - return ordered != ORDERED_EDEFAULT; - case EjbPackage.CMR_FIELD__UNIQUE: - return unique != UNIQUE_EDEFAULT; - case EjbPackage.CMR_FIELD__LOWER_BOUND: - return lowerBound != LOWER_BOUND_EDEFAULT; - case EjbPackage.CMR_FIELD__UPPER_BOUND: - return upperBound != UPPER_BOUND_EDEFAULT; - case EjbPackage.CMR_FIELD__MANY: - return isMany() != false; - case EjbPackage.CMR_FIELD__REQUIRED: - return isRequired() != false; - case EjbPackage.CMR_FIELD__ETYPE: - return eType != null; - case EjbPackage.CMR_FIELD__CHANGEABLE: - return changeable != CHANGEABLE_EDEFAULT; - case EjbPackage.CMR_FIELD__VOLATILE: - return volatile_ != VOLATILE_EDEFAULT; - case EjbPackage.CMR_FIELD__TRANSIENT: - return transient_ != TRANSIENT_EDEFAULT; - case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: - return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); - case EjbPackage.CMR_FIELD__DEFAULT_VALUE: - return getDefaultValue() != null; - case EjbPackage.CMR_FIELD__UNSETTABLE: - return unsettable != UNSETTABLE_EDEFAULT; - case EjbPackage.CMR_FIELD__DERIVED: - return derived != DERIVED_EDEFAULT; - case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: - return getEContainingClass() != null; - case EjbPackage.CMR_FIELD__ID: - return iD != ID_EDEFAULT; - case EjbPackage.CMR_FIELD__EATTRIBUTE_TYPE: - return basicGetEAttributeType() != null; - case EjbPackage.CMR_FIELD__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.CMR_FIELD__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.CMR_FIELD__ROLE: - return getRole() != null; - case EjbPackage.CMR_FIELD__COLLECTION_TYPE: - return collectionType != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - getEAnnotations().clear(); - getEAnnotations().addAll((Collection)newValue); - return; - case EjbPackage.CMR_FIELD__NAME: - setName((String)newValue); - return; - case EjbPackage.CMR_FIELD__ORDERED: - setOrdered(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__UNIQUE: - setUnique(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__LOWER_BOUND: - setLowerBound(((Integer)newValue).intValue()); - return; - case EjbPackage.CMR_FIELD__UPPER_BOUND: - setUpperBound(((Integer)newValue).intValue()); - return; - case EjbPackage.CMR_FIELD__ETYPE: - setEType((EClassifier)newValue); - return; - case EjbPackage.CMR_FIELD__CHANGEABLE: - setChangeable(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__VOLATILE: - setVolatile(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__TRANSIENT: - setTransient(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral((String)newValue); - return; - case EjbPackage.CMR_FIELD__UNSETTABLE: - setUnsettable(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__DERIVED: - setDerived(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__ID: - setID(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CMR_FIELD__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.CMR_FIELD__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.CMR_FIELD__ROLE: - setRole((EJBRelationshipRole)newValue); - return; - case EjbPackage.CMR_FIELD__COLLECTION_TYPE: - setCollectionType((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CMR_FIELD__EANNOTATIONS: - getEAnnotations().clear(); - return; - case EjbPackage.CMR_FIELD__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__ORDERED: - setOrdered(ORDERED_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__UNIQUE: - setUnique(UNIQUE_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__LOWER_BOUND: - setLowerBound(LOWER_BOUND_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__UPPER_BOUND: - setUpperBound(UPPER_BOUND_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__ETYPE: - setEType((EClassifier)null); - return; - case EjbPackage.CMR_FIELD__CHANGEABLE: - setChangeable(CHANGEABLE_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__VOLATILE: - setVolatile(VOLATILE_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__TRANSIENT: - setTransient(TRANSIENT_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: - setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__UNSETTABLE: - setUnsettable(UNSETTABLE_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__DERIVED: - setDerived(DERIVED_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__ID: - setID(ID_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.CMR_FIELD__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.CMR_FIELD__ROLE: - setRole((EJBRelationshipRole)null); - return; - case EjbPackage.CMR_FIELD__COLLECTION_TYPE: - setCollectionType((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @see org.eclipse.jst.j2ee.internal.ejb.impl.CMPAttributeImpl#getCMPEntity() - */ - public ContainerManagedEntity getCMPEntity() { - EJBRelationshipRole role = getRole(); - if (role != null) - return role.getSourceEntity(); - return null; - } - - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityFilter.java deleted file mode 100644 index 8853cbf6a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityFilter.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; -import org.eclipse.jst.j2ee.internal.IEJBModelExtenderManager; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - - -/** - * Insert the type's description here. Creation date: (11/28/2000 6:28:39 PM) - * @author: Administrator - */ -public abstract class ContainerManagedEntityFilter implements EJBExtensionFilter { - - - /** - * AttributeFilter constructor comment. - */ - public ContainerManagedEntityFilter() { - super(); - } - - /** - * filter method comment. - */ - public abstract List filter(ContainerManagedEntity cmp); - - /** - * All CMPAttributeFilters only operate on ContainerManagedEntityExtension - * objects. - */ - public List filter(EnterpriseBean ejb) { - if (ejb.isEntity() && ((Entity) ejb).isContainerManagedEntity()) return filter((ContainerManagedEntity) ejb); - return new ArrayList(); - } - - protected void filterRoleAttributesByName(List allAttributes, List roleAttributes) { - if (!roleAttributes.isEmpty()) { - int allSize, roleSize; - roleSize = roleAttributes.size(); - CMPAttribute roleAtt, allAtt; - for (int i = 0; i < roleSize; i++) { - roleAtt = (CMPAttribute) roleAttributes.get(i); - allSize = allAttributes.size(); - for (int j = allSize - 1; j != -1; j--) { - allAtt = (CMPAttribute) allAttributes.get(j); - if (roleAtt == allAtt || roleAtt.getName().equals(allAtt.getName())) { - allAttributes.remove(j); - break; - } - } - } - } - } - - protected EjbModuleExtensionHelper getEjbModuleExtHelper(Object context) { - return IEJBModelExtenderManager.INSTANCE.getEJBModuleExtension(context); - } - - protected List getLocalRelationshipRoles(ContainerManagedEntity cmp) { - EjbModuleExtensionHelper modelExtender = null; - if (cmp.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID) - return cmp.getRoles(); - else if ( (modelExtender = getEjbModuleExtHelper(cmp)) != null ){ - return modelExtender.getLocalRelationshipRoles_cmp11(cmp); - } - return Collections.EMPTY_LIST; - } - - protected List getRelationshipRoles(ContainerManagedEntity cmp) { - List roles = new ArrayList(); - collectRelationshipRoles(cmp, getEjbModuleExtHelper(cmp), roles); - return Collections.unmodifiableList(roles); - } - - public void collectRelationshipRoles(ContainerManagedEntity cmp, EjbModuleExtensionHelper extensionHelper, List containerList) { - if(cmp == null) - return; - containerList.addAll(getLocalRelationshipRoles(cmp)); - if(extensionHelper != null) - collectRelationshipRoles((ContainerManagedEntity) extensionHelper.getSuperType(cmp), extensionHelper, containerList); - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityImpl.java deleted file mode 100644 index 6a5341c44..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ContainerManagedEntityImpl.java +++ /dev/null @@ -1,1142 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.Enumerator; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbFactory; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.util.CMPKeySynchronizationAdapter; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - - -/** - * @generated - */ -public class ContainerManagedEntityImpl extends EntityImpl implements ContainerManagedEntity { - - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * - * @ordered - */ - protected static final String VERSION_EDEFAULT = "1.x"; //$NON-NLS-1$ - - protected EClassifier fGeneratedIdType = null; - protected static final String PERS_FEATURE_CHNG_NOTIFIER = "PersistentFeatureChangeNotificationAdapter"; //$NON-NLS-1$ - protected static final String QUERY_METHOD_NAME = "QueryMethod"; //$NON-NLS-1$ - protected static final String FIND_BY_PRIM_KEY_METHOD_NAME = "findByPrimaryKey"; //$NON-NLS-1$ - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String version = VERSION_EDEFAULT; - /** - * The default value of the '{@link #getAbstractSchemaName() Abstract Schema Name}' attribute. - * - * - * @see #getAbstractSchemaName() - * @generated - * @ordered - */ - protected static final String ABSTRACT_SCHEMA_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String abstractSchemaName = ABSTRACT_SCHEMA_NAME_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList persistentAttributes = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList keyAttributes = null; - /** - * The cached value of the '{@link #getQueries() Queries}' containment reference list. - * - * - * @see #getQueries() - * @generated - * @ordered - */ - protected EList queries = null; - - /** - * The cached value of the '{@link #getCMPAttribute() CMP Attribute}' reference list. - * - * - * @see #getCMPAttribute() - * @generated - * @ordered - */ - protected EList cmpAttribute = null; - - /** - * The cached value of the '{@link #getPrimKeyField() Prim Key Field}' reference. - * - * - * @see #getPrimKeyField() - * @generated - * @ordered - */ - protected CMPAttribute primKeyField = null; - - /** - * @generated - */ - protected ContainerManagedEntityImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getContainerManagedEntity(); - } - -/** - * Create a new instance of AttributeExtn with aName and add it to the keyFeatures. - * Creation date: (8/2/2000 9:11:13 PM) - * @param aName java.lang.String - * @return CMPAttribute - */ -public CMPAttribute addKeyAttributeName(String aName) { - CMPAttribute attribute = getPersistentAttribute(aName); - if (attribute != null) { - List keys = getKeyAttributes(); - CMPAttribute key; - for (int i = 0; i < keys.size(); i++) { - key = (CMPAttribute) keys.get(i); - if (aName.equals(key.getName())) - return attribute; - } - keys.add(attribute); - } - return attribute; -} -/** - * Return a List of one of the properties using aFilter. -*/ -public List getFilteredFeatures(EJBExtensionFilter aFilter) { - return aFilter.filter(this); - } -/** - * Add a persistent attribute with the same name as the name for aField. - * Creation date: (8/3/2000 8:30:42 AM) - * @param aField org.eclipse.jem.internal.java.Field - * @return CMPAttribute - */ -public CMPAttribute addPersistentAttribute(Field aField) { - if (aField == null) - return null; - return addPersistentAttributeName(aField.getName()); -} -/** - * Create a new instance of AttributeExtn with aName and add it to the persistentFeatures. - * Creation date: (8/2/2000 9:11:13 PM) - * @param aName java.lang.String - * @return CMPAttribute - */ -public CMPAttribute addPersistentAttributeName(String aName) { - CMPAttribute attribute = getPersistentAttribute(aName); - if (attribute == null) { - attribute = createPersistentAttribute(aName); - getPersistentAttributes().add(attribute); - } - return attribute; -} -protected CMPAttribute createPersistentAttribute(String aName) { - CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute(); - attribute.setName(aName); - return attribute; -} -public List getAllAvailableQueryMethods() { - Set sigs = new HashSet(); - List javaMethods = getAvailableSelectQueryJavaMethods(); - sigs.addAll(getMethodElementSignatures(javaMethods)); - javaMethods = getAvailableLocalQueryJavaMethods(); - sigs.addAll(getMethodElementSignatures(javaMethods)); - javaMethods = getAvailableRemoteQueryJavaMethods(); - sigs.addAll(getMethodElementSignatures(javaMethods)); - List signatures = new ArrayList(sigs); - return createQueryMethods(signatures); -} -protected List createQueryMethods(List signatures) { - Collections.sort(signatures); - Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL; - return createMethodElements(QUERY_METHOD_NAME, signatures, enumerator); -} - -public List getAvailableSelectQueryMethods() { - List methods = getAvailableSelectQueryJavaMethods(); - List sigs = getMethodElementSignatures(methods); - return createQueryMethods(sigs); -} -protected List getAvailableSelectQueryJavaMethods() { - JavaClass bean = getEjbClass(); - if (bean == null) - return Collections.EMPTY_LIST; - return bean.getOnlySpecificMethods("ejbSelect", Collections.EMPTY_LIST); //$NON-NLS-1$ -} - -public List getAvailableFindQueryMethods() { - Set sigs = new HashSet(); - List javaMethods = getAvailableRemoteQueryJavaMethods(); - sigs.addAll(getMethodElementSignatures(javaMethods)); - javaMethods = getAvailableLocalQueryJavaMethods(); - sigs.addAll(getMethodElementSignatures(javaMethods)); - List signatures = new ArrayList(sigs); - return createQueryMethods(signatures); -} -protected List getAvailableLocalQueryJavaMethods() { - return getAvailableQueryJavaMethods(getLocalHomeInterface()); -} -/** -* This returns the CMP version id by using the module id and the . -* Compare with J2EEVersionConstants to determine CMP level -* This will help differentiate between 2.0,2.1,... rather than "2.x" -*/ -public int getCMPVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - /* If resource is null we will return based on CMP version....*/ - if (res == null) { - if (getVersion().equals(ContainerManagedEntity.VERSION_1_X)) - return J2EEVersionConstants.EJB_1_1_ID; - return J2EEVersionConstants.EJB_2_0_ID; - } - int cmpVersion; - switch (res.getModuleVersionID()) { - case J2EEVersionConstants.EJB_2_0_ID : - if (getVersion().equalsIgnoreCase(VERSION_2_X)) - cmpVersion = J2EEVersionConstants.EJB_2_0_ID; - else - cmpVersion = J2EEVersionConstants.EJB_1_1_ID; - break; - case J2EEVersionConstants.EJB_2_1_ID : - if (getVersion().equalsIgnoreCase(VERSION_2_X)) - cmpVersion = J2EEVersionConstants.EJB_2_1_ID; - else - cmpVersion = J2EEVersionConstants.EJB_1_1_ID; - break; - - default : - cmpVersion = res.getModuleVersionID(); - } - return cmpVersion; -} - -/* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID() - */ -public int getVersionID() { - return getCMPVersionID(); -}protected List getAvailableRemoteQueryJavaMethods() { - return getAvailableQueryJavaMethods(getHomeInterface()); -} - -protected List getAvailableQueryJavaMethods(JavaClass home) { - if (home == null) return Collections.EMPTY_LIST; - List excluded = new ArrayList(1); - excluded.add("findByPrimaryKey"); //$NON-NLS-1$ - return home.getOnlySpecificMethods("find", excluded); //$NON-NLS-1$ -} - -protected EClassifier getGeneratedIdType() { - if (fGeneratedIdType == null) { - fGeneratedIdType = JavaRefFactory.eINSTANCE.reflectType(JAVA_LANG_STRING, this); - } - return fGeneratedIdType; -} -/** - * Return the keyAttribute with aName. - * Creation date: (8/8/2000 9:25:27 PM) - * @return EStructuralFeature - * @param aName java.lang.String - */ -public CMPAttribute getKeyAttribute(String aName) { - if (aName != null) { - Iterator it = getKeyAttributes().iterator(); - CMPAttribute next; - while (it.hasNext()) { - next = (CMPAttribute) it.next(); - if (aName.equals(next.getName())) - return next; - } - } - return null; -} -/** - * Return the persistentAttribute with aName. - * Creation date: (8/8/2000 9:25:27 PM) - * @return EStructuralFeature - * @param aName java.lang.String - */ -public CMPAttribute getPersistentAttribute(String aName) { - if (aName != null) { - Iterator it = getPersistentAttributes().iterator(); - CMPAttribute next; - while (it.hasNext()) { - next = (CMPAttribute) it.next(); - if (aName.equals(next.getName())) - return next; - } - } - return null; -} - -/** - * If a primary key exists, return the persistent attribute; the primary key is defined as one and only one - * key attribute, whose type is the same as the key class - * @deprecated use getPrimKeyField() - */ -public CMPAttribute getPrimaryKeyAttribute() { - return getPrimKeyField(); -} - - -/** - * isContainerManagedEntity method comment. - */ -public boolean isContainerManagedEntity() { - return true; -} -public boolean isKeyAttribute(CMPAttribute anAttribute) { - java.util.List attributes = getKeyAttributes(); - for (int i = 0; i < attributes.size(); i++){ - if (attributes.get(i) == anAttribute) - return true; - } - return false; -} -/* - * Return whether this bean represents an instance of the "unknown primary key" case - * described in the specification. This is identified by the primary key class - * being specified as "java.lang.Object". - * In order to deploy an unknown primary key bean, we must substitute a real key, - * and add a corresponding field. - */ -public boolean isUnknownPrimaryKey() { - String keyName = getPrimaryKeyName(); - if (keyName == null) return false; - //test whether it is unknown or we have the WAS generated key for the unknown prim key - boolean genTest = keyName.equals(UNKNOWN_PRIMARY_KEY) || keyName.equals(WAS_GENERATED_STRING_KEY); - if (genTest) return true; - //Lastly, test for the findByPrimaryKey(Object) method on the home. - JavaClass home = getHomeInterface(); - if (home == null) - home = getLocalHomeInterface(); - if (home == null) return false; - List parmType = new ArrayList(1); - parmType.add(UNKNOWN_PRIMARY_KEY); - return home.getMethodExtended(FIND_BY_PRIM_KEY_METHOD_NAME, parmType) != null; -} -/** - * isVersion1_X method comment. - */ -public boolean isVersion1_X() { - return getVersion().equals(ContainerManagedEntity.VERSION_1_X); -} -/** - * isVersion2_X method comment. - */ -public boolean isVersion2_X() { - return getVersion().equals(ContainerManagedEntity.VERSION_2_X); -} -/* - * listPersistentFieldNames - return the names of our CMP fields. derived from persistentFeatures - */ -public String[] listPersistentFieldNames() { - java.util.List attributes = getPersistentAttributes(); - String[] names = new String[attributes.size()]; - for (int i = 0; i < attributes.size(); i++) { - names[i] = ((CMPAttribute) attributes.get(i)).getName(); - } - return names; -} - -/** - * Remove the persistentAttribute with the same name as the Field's name. - * Creation date: (8/3/2000 8:33:01 AM) - * @param aField org.eclipse.jem.internal.java.Field - */ -public CMPAttribute removePersistentAttribute(Field aField) { - if (aField != null) - return removePersistentAttribute(aField.getName()); - return null; -} -/** - * Remove the persistentAttribute named aName. - * Creation date: (8/2/2000 8:59:32 PM) - * @param aName java.lang.String - */ -public CMPAttribute removePersistentAttribute(String aName) { - if (aName != null) { - Iterator it = getPersistentAttributes().iterator(); - CMPAttribute next; - while (it.hasNext()) { - next = (CMPAttribute) it.next(); - if (aName.equals(next.getName())) { - getPersistentAttributes().remove(next); - return next; - } - } - } - return null; -} -/** - * @generated This field/method will be replaced during code generation - * Specifies the version of an entity bean with container-managed persistence. - * - * @invariant The cmp-version element must be one of the two following: 1.x , 2.x - * @default 2.x - * Returns "1.x" if in a 1.1 Jar (For compatibility) - */ - public String getVersion() { - return version; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - * The abstract-schema-name element specifies the name of the abstract schema type of an entity bean with cmp-version 2.x. It is used in EJB QL queries. - * - * For example, the abstract-schema-name for an entity bean whose local interface is com.acme.commerce.Order might be Order. - * - - */ - public String getAbstractSchemaName() { - return abstractSchemaName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAbstractSchemaName(String newAbstractSchemaName) { - String oldAbstractSchemaName = abstractSchemaName; - abstractSchemaName = newAbstractSchemaName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME, oldAbstractSchemaName, abstractSchemaName)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getPersistentAttributes() { - if (persistentAttributes == null) { - persistentAttributes = new EObjectContainmentEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES); - } - return persistentAttributes; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - return ((InternalEList)getQueries()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: - return basicSetSecurityIdentity(null, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: - return ((InternalEList)getPersistentAttributes()).basicRemove(otherEnd, msgs); - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - return ((InternalEList)getQueries()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: - return getIcons(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: - return getDescription(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: - return getResourceRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: - return getEjbRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: - return getServiceRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: - return getName(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: - if (resolve) return getEjbClass(); - return basicGetEjbClass(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: - if (resolve) return getHomeInterface(); - return basicGetHomeInterface(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: - if (resolve) return getRemoteInterface(); - return basicGetRemoteInterface(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - return getEjbJar(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: - return getSecurityIdentity(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: - if (resolve) return getLocalHomeInterface(); - return basicGetLocalHomeInterface(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: - if (resolve) return getLocalInterface(); - return basicGetLocalInterface(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: - return isReentrant() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: - if (resolve) return getPrimaryKey(); - return basicGetPrimaryKey(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: - return getVersion(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: - return getAbstractSchemaName(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: - return getPersistentAttributes(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: - return getKeyAttributes(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - return getQueries(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: - return getCMPAttribute(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: - if (resolve) return getPrimKeyField(); - return basicGetPrimKeyField(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: - return ejbClass != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: - return homeInterface != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: - return remoteInterface != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: - return securityIdentity != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: - return localHomeInterface != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: - return localInterface != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: - return isSetReentrant(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: - return primaryKey != null; - case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: - return ABSTRACT_SCHEMA_NAME_EDEFAULT == null ? abstractSchemaName != null : !ABSTRACT_SCHEMA_NAME_EDEFAULT.equals(abstractSchemaName); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: - return persistentAttributes != null && !persistentAttributes.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: - return keyAttributes != null && !keyAttributes.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - return queries != null && !queries.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: - return cmpAttribute != null && !cmpAttribute.isEmpty(); - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: - return primKeyField != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: - setName((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: - setEjbClass((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: - setHomeInterface((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: - setLocalInterface((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: - setReentrant(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: - setPrimaryKey((JavaClass)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: - setVersion((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: - setAbstractSchemaName((String)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: - getPersistentAttributes().clear(); - getPersistentAttributes().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: - getKeyAttributes().clear(); - getKeyAttributes().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - getQueries().clear(); - getQueries().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: - getCMPAttribute().clear(); - getCMPAttribute().addAll((Collection)newValue); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: - setPrimKeyField((CMPAttribute)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: - getIcons().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: - getEjbRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: - getServiceRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: - setEjbClass((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: - setHomeInterface((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: - setLocalInterface((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: - unsetReentrant(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: - setPrimaryKey((JavaClass)null); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: - setAbstractSchemaName(ABSTRACT_SCHEMA_NAME_EDEFAULT); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: - getPersistentAttributes().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: - getKeyAttributes().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: - getQueries().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: - getCMPAttribute().clear(); - return; - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: - setPrimKeyField((CMPAttribute)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (version: "); //$NON-NLS-1$ - result.append(version); - result.append(", abstractSchemaName: "); //$NON-NLS-1$ - result.append(abstractSchemaName); - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getKeyAttributesGen() { - if (keyAttributes == null) { - keyAttributes = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES); - } - return keyAttributes; - } - - public EList getKeyAttributes() { - if(keyAttributes == null) { - CMPKeySynchronizationAdapter syncAdapter = (CMPKeySynchronizationAdapter) EcoreUtil.getExistingAdapter(this, CMPKeySynchronizationAdapter.ADAPTER_TYPE); - if(syncAdapter != null) - syncAdapter.initializeKeyAttributes(); - } - return getKeyAttributesGen(); - } - - /** - * - * - * @generated - */ - public EList getQueries() { - if (queries == null) { - queries = new EObjectContainmentWithInverseEList(Query.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, EjbPackage.QUERY__ENTITY); - } - return queries; - } - - /** - * - * - * @generated - */ - public EList getCMPAttribute() { - if (cmpAttribute == null) { - cmpAttribute = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE); - } - return cmpAttribute; - } - - /** - * - * - * @generated - */ - public CMPAttribute getPrimKeyField() { - - if (primKeyField != null && primKeyField.eIsProxy()) { - CMPAttribute oldPrimKeyField = primKeyField; - primKeyField = (CMPAttribute)eResolveProxy((InternalEObject)primKeyField); - if (primKeyField != oldPrimKeyField) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField)); - } - } - return primKeyField; - } - - public void makePrimKeyFieldProxy() { - if (primKeyField == null) return; - String fieldName = primKeyField.getName(); - if (fieldName == null) fieldName = ""; //$NON-NLS-1$ - primKeyField = EjbFactory.eINSTANCE.createCMPAttribute(); - ((InternalEObject)primKeyField).eSetProxyURI(URI.createURI(fieldName)); - - } - - /** - * - * - * @generated - */ - public CMPAttribute basicGetPrimKeyField() { - return primKeyField; - } - - /** - * - * - * @generated - */ - public void setPrimKeyField(CMPAttribute newPrimKeyField) { - CMPAttribute oldPrimKeyField = primKeyField; - primKeyField = newPrimKeyField; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField)); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getCMRFields() - */ - public List getCMRFields() { - List myRoles = getRoles(); - List cmrFields = Collections.EMPTY_LIST; - if (myRoles != null && !myRoles.isEmpty()) { - cmrFields = new ArrayList(); - Iterator i = myRoles.iterator(); - while (i.hasNext()) { - EJBRelationshipRole role = (EJBRelationshipRole) i.next(); - CMRField field = role.getCmrField(); - if (field != null) - cmrFields.add(field); - } - } - return cmrFields; - } - - public boolean isSelfReferencing(EJBRelation rel) { - if (rel.getSecondRole() == null) - return false; - return (rel.getFirstRole().getSourceEntity() == this) && - (rel.getSecondRole().getSourceEntity() == this); - } - - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRoles() - */ - public List getRoles() { - if (getEjbJar() == null) - return Collections.EMPTY_LIST; - List allRoles = getEjbJar().getEjbRelations(); - List myRoles = Collections.EMPTY_LIST; - if (allRoles != null && !allRoles.isEmpty()) { - myRoles = new ArrayList(); - Iterator i = allRoles.iterator(); - while (i.hasNext()) { - EJBRelation rel = (EJBRelation) i.next(); - EJBRelationshipRole role = rel.getFirstRole(); - if (isSelfReferencing(rel)) { - myRoles.add(rel.getFirstRole()); - myRoles.add(rel.getSecondRole()); - } - else if ((role != null) && role.getSourceEntity() == this) { - myRoles.add(role); - } else { - role = rel.getSecondRole(); - if ((role != null) && (role.getSourceEntity() == this)) - myRoles.add(role); - } - } - } - return myRoles; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRole(java.lang.String) - */ - public CommonRelationshipRole getRole(String roleName) { - for (int i=0; i singleRoleNameSize)) //don't set the originating type since we are derived from another derived attribute - attribute.setOriginatingType(fieldType); - attribute.setEType(fieldType.getWrapper()); - } - if (isNew && !getRole().isKey()) - attribute.setDerived(true); - } - /** - * getFields method comment. - */ - protected void collectAttributes(ContainerManagedEntity type, String attributeName, List aList, List computedNames) { - collectKeyModelledAttributes(type, attributeName, aList, computedNames); - collectKeyRoleAttributes(type, attributeName, aList, computedNames); - } - /** - * - */ - protected void collectAttributes(CMPAttribute type, String attributeName, List aList, List computedNames) { - boolean isNewAttribute = false; - attributeName = appendName(attributeName, type.getName()); - computedNames.add(attributeName); - CMPAttribute attribute = getCMPEntity().getPersistentAttribute(attributeName); - if (attribute == null) { - attribute = createPersistentAttribute(attributeName); - isNewAttribute = true; - } - //This is necessary for code generation - ContainerManagedEntity entity = (ContainerManagedEntity) type.eContainer(); - if (entity != null) - setDerivedAttributeType(attribute, type, isNewAttribute); - if (isNewAttribute) { - if (getRole().isKey()) - getCMPEntity().getKeyAttributes().add(attribute); - aList.add(attribute); - getCMPEntity().getPersistentAttributes().add(attribute); - } else { - if (!aList.contains(attribute)) - aList.add(attribute); - } - } - protected CMPAttribute createPersistentAttribute(String aName) { - CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute(); - attribute.setName(aName); - attribute.setDescription("Generated to support relationships. Do NOT delete."); - return attribute; - } - /** - * getFields method comment. - */ - protected void collectKeyModelledAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) { - java.util.Iterator it = entity.getFilteredFeatures(ModelledKeyAttributeFilter.singleton()).iterator(); - CMPAttribute attribute; - while (it.hasNext()) { - attribute = (CMPAttribute) it.next(); - collectAttributes(attribute, attributeName, aList, computedNames); - } - } - /** - * getFields method comment. - */ - protected void collectKeyRoleAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) { - if(visitedKeyTypes.contains(entity)){ - throw new RuntimeException("Key role cycle detected"); - } - visitedKeyTypes.add(entity); - java.util.Iterator it = entity.getFilteredFeatures(KeyRelationshipRoleFilter.singleton()).iterator(); - CommonRelationshipRole aRole; - while (it.hasNext()) { - aRole = (CommonRelationshipRole) it.next(); - String attName = appendName(attributeName, aRole.getName()); - reconcileAttributes(aRole, attName, aList, computedNames); - } - } - protected ContainerManagedEntity getCMPEntity() { - return getRole().getSourceEntity(); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarImpl.java deleted file mode 100644 index cc84e5a98..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarImpl.java +++ /dev/null @@ -1,817 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.common.util.CommonUtil; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EJBResource; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.Relationships; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - -/** - * The root element of the EJB deployment descriptor. It contains an optional description of the ejb-jar file; optional display name; optional small icon file name; optional large icon file - * name; mandatory structural information about all included enterprise beans; a descriptor for container managed relationships, if any; an optional application-assembly descriptor; and an optional name of an ejb-client-jar file for the ejb-jar. - */ -public class EJBJarImpl extends CompatibilityDescriptionGroupImpl implements EJBJar { - - /** - * The default value of the '{@link #getEjbClientJar() Ejb Client Jar}' attribute. - * - * - * @see #getEjbClientJar() - * @generated - * @ordered - */ - protected static final String EJB_CLIENT_JAR_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String ejbClientJar = EJB_CLIENT_JAR_EDEFAULT; - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected static final String VERSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected String version = VERSION_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected AssemblyDescriptor assemblyDescriptor = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList enterpriseBeans = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected Relationships relationshipList = null; - public EJBJarImpl() { - super(); -// setRefId(com.ibm.etools.archive.ArchiveConstants.EJBJAR_ID); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEJBJar(); - } - -/** - * Return true if there are any ContainerManagedEntity beans in this jar. - */ -public boolean containsContainerManagedBeans() { - Iterator it = getEnterpriseBeans().iterator(); - EnterpriseBean ejb; - while (it.hasNext()) { - ejb = (EnterpriseBean)it.next(); - if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity()) - return true; - } - return false; -} -/** - * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar - */ -public boolean containsSecurityRole(java.lang.String name) { - AssemblyDescriptor ad = getAssemblyDescriptor(); - return (ad != null) && (ad.getSecurityRoleNamed(name) != null); -} -/** - * Return List of BMP beans in this jar. - * @return java.util.List - */ -public List getBeanManagedBeans() { - List allBeans, beans; - allBeans = getEnterpriseBeans(); - int size = allBeans.size(); - beans = new ArrayList(size); - EnterpriseBean ejb; - for (int i = 0; i < size; i++) { - ejb = (EnterpriseBean) allBeans.get(i); - if (ejb.isBeanManagedEntity()) - beans.add(ejb); - } - return beans; -} -/** - * Return List of ContainerManagedEntity beans in this jar. - * @return java.util.List - */ -public List getContainerManagedBeans() { - List cmps = new ArrayList(getEnterpriseBeans().size()); - Iterator it = getEnterpriseBeans().iterator(); - EnterpriseBean ejb; - while (it.hasNext()) { - ejb = (EnterpriseBean)it.next(); - if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity()) - cmps.add(ejb); - } - return cmps; -} - -/** - * Return List of EJB 1.1 ContainerManagedEntity beans in this jar. - * @return java.util.List - */ -public List getEJB11ContainerManagedBeans() { - List cmps = new ArrayList(getEnterpriseBeans().size()); - Iterator it = getEnterpriseBeans().iterator(); - EnterpriseBean ejb; - while (it.hasNext()) { - ejb = (EnterpriseBean)it.next(); - if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() <= J2EEVersionConstants.EJB_1_1_ID) - cmps.add(ejb); - } - return cmps; -} - -/** - * Return List of EJB 2.0 ContainerManagedEntity beans in this jar. - * @return java.util.List - */ -public List getEJB20ContainerManagedBeans() { - List cmps = new ArrayList(getEnterpriseBeans().size()); - Iterator it = getEnterpriseBeans().iterator(); - EnterpriseBean ejb; - while (it.hasNext()) { - ejb = (EnterpriseBean)it.next(); - if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID) - cmps.add(ejb); - } - return cmps; -} - /* - * @see EJBJar#getMessageDrivenBeans() - */ - public List getMessageDrivenBeans() { - List ejbs = getEnterpriseBeans(); - int size = ejbs.size(); - List mdbs = new ArrayList(size); - EnterpriseBean ejb; - for (int i = 0; i < size; i++) { - ejb = (EnterpriseBean)ejbs.get(i); - if (ejb.isMessageDriven()) - mdbs.add(ejb); - } - return mdbs; - } -/** - * @return The list of EjbRelations references - * A list of ejb-relation elements, which specify the container managed relationships. - */ -public List getEjbRelations() { - return getRelationshipList() == null ? null : getRelationshipList().getEjbRelations(); -} -/** - * Return an enterprise bean referenced by the EjbRef, if one exists. The ejb-link value - * of the ref must equate to a named enterprise bean contained in the jar; otherwise return - * null - */ -public EnterpriseBean getEnterpiseBeanFromRef(EjbRef ref) { - String link = ref.getLink(); - if (link == null) { - return null; - } - return getEnterpriseBeanNamed(link); -} -public EnterpriseBean getEnterpriseBeanNamed(String ejbName) { - if (ejbName == null) - return null; - EList beans = getEnterpriseBeans(); - EnterpriseBean bean; - for (int i = 0; i < beans.size(); i++) { - bean = (EnterpriseBean) beans.get(i); - if (ejbName.equals(bean.getName())) - return bean; - } - return null; -} -/** - * Return ALL EnterpriseBean(s) that are referencing @aJavaClass as a - * home, remote, bean class, or key class. - */ -public java.util.List getEnterpriseBeansWithReference(JavaClass aJavaClass) { - List beans = getEnterpriseBeans(); - List result = new ArrayList(); - EnterpriseBean bean = null; - for (int i = 0; i < beans.size(); i++){ - bean = (EnterpriseBean) beans.get(i); - if (bean.hasJavaReference(aJavaClass)) - result.add(bean); - } - return result; -} -/** - * Return the *FIRST* EnterpriseBean that is referencing @aJavaClass as its - * home, remote, bean class, or key class. - */ -public EnterpriseBean getEnterpriseBeanWithReference(JavaClass aJavaClass) { - List beans = getEnterpriseBeans(); - EnterpriseBean bean = null; - for (int i = 0; i < beans.size(); i++){ - bean = (EnterpriseBean) beans.get(i); - if (bean.hasJavaReference(aJavaClass)) - return bean; - } - return null; -} -/** - * Return List of Session beans in this jar. - * @return java.util.List - */ -public List getSessionBeans() { - List allBeans, beans; - allBeans = getEnterpriseBeans(); - int size = allBeans.size(); - beans = new ArrayList(size); - EnterpriseBean ejb; - for (int i = 0; i < size; i++) { - ejb = (EnterpriseBean) allBeans.get(i); - if (ejb.isSession()) - beans.add(ejb); - } - return beans; -} -/** - * Return boolean indicating if this EJB JAR was populated from an EJB 1.1 descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion1_1Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - EJBResource ejbRes = (EJBResource) eResource(); - return ejbRes.isEJB1_1(); -} -/** - * Return boolean indicating if this EJB JAR was populated from an EJB 2.0 descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion2_0Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - EJBResource ejbRes = (EJBResource) eResource(); - return ejbRes.isEJB2_0(); -} -/** - * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar - */ -public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { - AssemblyDescriptor ad = getAssemblyDescriptor(); - if (ad != null) - ad.renameSecurityRole(existingRoleName, newRoleName); - List ejbs = getEnterpriseBeans(); - for (int i = 0; i < ejbs.size(); i++) { - EnterpriseBean ejb = (EnterpriseBean) ejbs.get(i); - ejb.reSyncSecurityRoleRef(existingRoleName, newRoleName); - } -} - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * @generated This field/method will be replaced during code generation - * The optional ejb-client-jar element specifies a JAR file that contains the class files necessary for a client program to access the enterprise beans in the ejb-jar file. The Deployer should make the ejb-client JAR file accessible to the client's class-loader. Example:employee_service_client.jar - - */ - public String getEjbClientJar() { - return ejbClientJar; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbClientJar(String newEjbClientJar) { - String oldEjbClientJar = ejbClientJar; - ejbClientJar = newEjbClientJar; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__EJB_CLIENT_JAR, oldEjbClientJar, ejbClientJar)); - } - - /** - * - * - * @generated - */ - public String getVersion() { - return version; - } - - /** - This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ - public int getVersionID() throws IllegalStateException { - J2EEVersionResource ejbRes = (J2EEVersionResource) eResource(); - if (ejbRes == null) { - // fix defect 3276, when resource is unloaded - if (version == null) - throw new IllegalStateException(); - if (version.equals("2.1")) //$NON-NLS-1$ - return J2EEVersionConstants.EJB_2_1_ID; - if (version.equals("2.0")) //$NON-NLS-1$ - return J2EEVersionConstants.EJB_2_0_ID; - if (version.equals("1.1")) //$NON-NLS-1$ - return J2EEVersionConstants.EJB_1_1_ID; - if (version.equals("1.0")) //$NON-NLS-1$ - return J2EEVersionConstants.EJB_1_0_ID; - } - return ejbRes.getModuleVersionID(); - } - /** - *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level - */ - public int getJ2EEVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException("XMLResource is null"); - return res.getJ2EEVersionID(); - } - - /** - * - * - * @generated - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public AssemblyDescriptor getAssemblyDescriptor() { - return assemblyDescriptor; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor, NotificationChain msgs) { - AssemblyDescriptor oldAssemblyDescriptor = assemblyDescriptor; - assemblyDescriptor = newAssemblyDescriptor; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, oldAssemblyDescriptor, newAssemblyDescriptor); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { - if (newAssemblyDescriptor != assemblyDescriptor) { - NotificationChain msgs = null; - if (assemblyDescriptor != null) - msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs); - if (newAssemblyDescriptor != null) - msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs); - msgs = basicSetAssemblyDescriptor(newAssemblyDescriptor, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); - } - - /** - * @generated This field/method will be replaced during code generation - * The enterprise-beans element contains the declarations of one or more - * enterprise beans. - */ - public EList getEnterpriseBeans() { - if (enterpriseBeans == null) { - enterpriseBeans = new EObjectContainmentWithInverseEList(EnterpriseBean.class, this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EjbPackage.ENTERPRISE_BEAN__EJB_JAR); - } - return enterpriseBeans; - } - - /** - * @generated This field/method will be replaced during code generation - * The relationships collection describes the relationships in which container managed persistence entity beans and dependent objects participate. The relationships element contains an optional description; a list of ejb-entity-ref elements (references to entity beans that participate in container managed relationships but whose abstract persistence schemas are not included in the ejb-jar file); - * and a list of ejb-relation elements, which specify the container managed relationships. - */ - public Relationships getRelationshipList() { - return relationshipList; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetRelationshipList(Relationships newRelationshipList, NotificationChain msgs) { - Relationships oldRelationshipList = relationshipList; - relationshipList = newRelationshipList; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, oldRelationshipList, newRelationshipList); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRelationshipList(Relationships newRelationshipList) { - if (newRelationshipList != relationshipList) { - NotificationChain msgs = null; - if (relationshipList != null) - msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs); - if (newRelationshipList != null) - msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs); - msgs = basicSetRelationshipList(newRelationshipList, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - if (assemblyDescriptor != null) - msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, null, msgs); - return basicSetAssemblyDescriptor((AssemblyDescriptor)otherEnd, msgs); - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - return ((InternalEList)getEnterpriseBeans()).basicAdd(otherEnd, msgs); - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - if (relationshipList != null) - msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__RELATIONSHIP_LIST, null, msgs); - return basicSetRelationshipList((Relationships)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_JAR__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.EJB_JAR__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.EJB_JAR__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - return basicSetAssemblyDescriptor(null, msgs); - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - return ((InternalEList)getEnterpriseBeans()).basicRemove(otherEnd, msgs); - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - return basicSetRelationshipList(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_JAR__ICONS: - return getIcons(); - case EjbPackage.EJB_JAR__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.EJB_JAR__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.EJB_JAR__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.EJB_JAR__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.EJB_JAR__DESCRIPTION: - return getDescription(); - case EjbPackage.EJB_JAR__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: - return getEjbClientJar(); - case EjbPackage.EJB_JAR__VERSION: - return getVersion(); - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - return getAssemblyDescriptor(); - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - return getEnterpriseBeans(); - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - return getRelationshipList(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_JAR__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.EJB_JAR__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.EJB_JAR__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.EJB_JAR__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.EJB_JAR__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.EJB_JAR__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.EJB_JAR__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: - return EJB_CLIENT_JAR_EDEFAULT == null ? ejbClientJar != null : !EJB_CLIENT_JAR_EDEFAULT.equals(ejbClientJar); - case EjbPackage.EJB_JAR__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - return assemblyDescriptor != null; - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - return enterpriseBeans != null && !enterpriseBeans.isEmpty(); - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - return relationshipList != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_JAR__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.EJB_JAR__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.EJB_JAR__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.EJB_JAR__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.EJB_JAR__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.EJB_JAR__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.EJB_JAR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: - setEjbClientJar((String)newValue); - return; - case EjbPackage.EJB_JAR__VERSION: - setVersion((String)newValue); - return; - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)newValue); - return; - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - getEnterpriseBeans().clear(); - getEnterpriseBeans().addAll((Collection)newValue); - return; - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - setRelationshipList((Relationships)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_JAR__ICONS: - getIcons().clear(); - return; - case EjbPackage.EJB_JAR__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.EJB_JAR__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.EJB_JAR__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.EJB_JAR__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.EJB_JAR__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.EJB_JAR__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: - setEjbClientJar(EJB_CLIENT_JAR_EDEFAULT); - return; - case EjbPackage.EJB_JAR__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)null); - return; - case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: - getEnterpriseBeans().clear(); - return; - case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: - setRelationshipList((Relationships)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (ejbClientJar: "); //$NON-NLS-1$ - result.append(ejbClientJar); - result.append(", version: "); //$NON-NLS-1$ - result.append(version); - result.append(')'); - return result.toString(); - } - - public EJBRelationshipRole getRelationshipRole(String aRoleName, ContainerManagedEntity sourceCMP) { - if (aRoleName == null || sourceCMP == null) return null; - EJBRelationshipRole role = null; - if (getRelationshipList() != null) { - List relations = getRelationshipList().getEjbRelations(); - int size = relations.size(); - EJBRelation rel = null; - for (int i = 0; i < size; i++) { - rel = (EJBRelation) relations.get(i); - role = rel.getRelationshipRole(aRoleName); - if (role != null && role.getSourceEntity() == sourceCMP) - return role; - } - } - return null; - } - - public EJBRelation getEJBRelation(String aRelationName) { - Relationships relList = getRelationshipList(); - if (relList != null) { - List rels = relList.getEjbRelations(); - int size = rels.size(); - EJBRelation rel = null; - for (int i = 0; i < size; i++) { - rel = (EJBRelation) rels.get(i); - if (rel == null) continue; - if (aRelationName.equals(rel.getName())) - return rel; - } - } - return null; - } - /** - * @see EJBJar#getEJBRelationsForSource(ContainerManagedEntity) - */ - public List getEJBRelationsForSource(ContainerManagedEntity cmp) { - Relationships relList = getRelationshipList(); - List result = null; - if (relList != null) { - List rels = relList.getEjbRelations(); - int size = rels.size(); - EJBRelation rel = null; - for (int i = 0; i < size; i++) { - rel = (EJBRelation) rels.get(i); - if (rel == null) continue; - List roles = rel.getRelationshipRoles(); - EJBRelationshipRole role; - for (int j = 0; j < roles.size(); j++) { - role = (EJBRelationshipRole) roles.get(j); - if (role.getSourceEntity() == cmp) { - if (result == null) - result = new ArrayList(); - result.add(rel); - break; - } - } - } - } - if (result == null) - result = Collections.EMPTY_LIST; - return result; - } - - public List getEJBRelationshipRolesForType(ContainerManagedEntity cmp) { - Relationships relList = getRelationshipList(); - List result = null; - if (relList != null) { - List rels = relList.getEjbRelations(); - int size = rels.size(); - EJBRelation rel = null; - for (int i = 0; i < size; i++) { - rel = (EJBRelation) rels.get(i); - if (rel == null) continue; - List roles = rel.getRelationshipRoles(); - EJBRelationshipRole role; - for (int j = 0; j < roles.size(); j++) { - role = (EJBRelationshipRole) roles.get(j); - if (cmp.equals(((CommonRelationshipRole) role).getTypeEntity())) { - if (result == null) - result = new ArrayList(); - result.add(role); - break; - } - } - } - } - if (result == null) - result = Collections.EMPTY_LIST; - return result; - } - - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarResourceFactory.java deleted file mode 100644 index 87a2631a1..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBJarResourceFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 27, 2003 - * - */ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -/** - * @author schacher - */ -public class EJBJarResourceFactory extends TranslatorResourceFactory { - - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_1_1, "ejb-jar_1_1.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_2_0, "ejb-jar_2_0.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJB_JAR_SCHEMA_LOC_2_1, "ejb-jar_2_1.xsd"); //$NON-NLS-1$ - } - - /** - * @param aRendererFactory - */ - public EJBJarResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) - */ - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new EJBResourceImpl(uri, aRenderer); - } - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(aRendererFactory)); - } - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.EJBJAR_DD_URI_OBJ); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBMethodCategoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBMethodCategoryImpl.java deleted file mode 100644 index 9988a0a76..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBMethodCategoryImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; -import org.eclipse.jst.j2ee.ejb.EjbPackage; - -/** - * The valid EJB method category names are: EJBHOMEMETHOD, EJBCREATEMETHOD, EJBFINDERMETHOD, EJBREMOTEMETHOD. - */ -public class EJBMethodCategoryImpl extends EObjectImpl implements EJBMethodCategory, EObject { - - public EJBMethodCategoryImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEJBMethodCategory(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationImpl.java deleted file mode 100644 index 7336d3ea4..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationImpl.java +++ /dev/null @@ -1,449 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.CommonRelationship; -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.Relationships; - - -/** - * The ejb-relation element describes a relationship between two entity beans with container managed persistence. An ejb-relation element contains a description; an optional ejb-relation-name element; and exactly two relationship role declarations, defined by the ejb-relationship-roles. The name of the relationship, if specified, is unique within the ejb-jar file. - * - * @invariant The name of the relationship, if specified, is unique within the ejb-jar file. - * @invariant self.relationshipRoles.size == 2 - * @invariant self.relationshipRoles[0].name != self.relationshipRoles[1].name - * - * @migration EJB1.1 Moved from ejbext::EjbRelationshipRole contained under ejbext::EJBJarExtension - * @migration EJB1.1 added optional attribute, description:String - * @migration EJB1.1 added optional attribute, name:String (May have been inherited from EObject previously) - */ -public class EJBRelationImpl extends EObjectImpl implements EJBRelation, EObject, CommonRelationship{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList relationshipRoles = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public EJBRelationImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEJBRelation(); - } - -public boolean containsRelationshipRole(EJBRelationshipRole aRole) { - return getRelationshipRoles().contains(aRole); -} -/** - * Return the roles. - */ -public EList getCommonRoles() { - return getRelationshipRoles(); -} -/** - * Return the first role. - */ -public CommonRelationshipRole getFirstCommonRole() { - return getFirstRole(); -} -/** - * Return the first role. - */ -public EJBRelationshipRole getFirstRole() { - List list = getRelationshipRoles(); - if (list.size() == 0) - return null; - return (EJBRelationshipRole) list.get(0); -} -/** - * Return the other role. - */ -public EJBRelationshipRole getOppositeRole(EJBRelationshipRole aRole) { - if (aRole != null) { - if (aRole == getFirstRole()) - return getSecondRole(); - if (aRole == getSecondRole()) - return getFirstRole(); - } - return null; -} -/** - * Return the first role. - */ -public CommonRelationshipRole getSecondCommonRole() { - return getSecondRole(); -} -/** - * Return the second role. - */ -public EJBRelationshipRole getSecondRole() { - List list = getRelationshipRoles(); - if (list.size() < 2) - return null; - return (EJBRelationshipRole) list.get(1); -} -/** - * Set the forward role. Implemented by ensuring that the passed role is the first role - * which is the "tiebreaker" in case of unclear relationships, such as 1:1. - */ -public void setFoward(EJBRelationshipRole aRole) { - - EList roles = getRelationshipRoles(); - int currentIndex = roles.indexOf(aRole); - if (currentIndex != 0) { - if (currentIndex > -1) - roles.move(0, aRole); - else - roles.set(0, aRole); - } -} - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing the ejb relation. - * - * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The name of the relationship. If specified, must be unique within the ejb-jar file. - * @invariant self.name unique within Set - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public Relationships getRelationshipList() { - if (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST) return null; - return (Relationships)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRelationshipList(Relationships newRelationshipList) { - if (newRelationshipList != eContainer || (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST && newRelationshipList != null)) { - if (EcoreUtil.isAncestor(this, newRelationshipList)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newRelationshipList != null) - msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newRelationshipList, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList)); - } - - /** - * @generated This field/method will be replaced during code generation - * A collection containing exactly two relationship roles. - * - * @migration EJB1.1 Containment used to be by reference on relation--now by value. - - */ - public EList getRelationshipRoles() { - if (relationshipRoles == null) { - relationshipRoles = new EObjectContainmentWithInverseEList(EJBRelationshipRole.class, this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP); - } - return relationshipRoles; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATION__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - return ((InternalEList)getRelationshipRoles()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - return eBasicSetContainer(null, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - return ((InternalEList)getRelationshipRoles()).basicRemove(otherEnd, msgs); - case EjbPackage.EJB_RELATION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - return eContainer.eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATION__DESCRIPTION: - return getDescription(); - case EjbPackage.EJB_RELATION__NAME: - return getName(); - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - return getRelationshipList(); - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - return getRelationshipRoles(); - case EjbPackage.EJB_RELATION__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.EJB_RELATION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - return getRelationshipList() != null; - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - return relationshipRoles != null && !relationshipRoles.isEmpty(); - case EjbPackage.EJB_RELATION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATION__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.EJB_RELATION__NAME: - setName((String)newValue); - return; - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - setRelationshipList((Relationships)newValue); - return; - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - getRelationshipRoles().clear(); - getRelationshipRoles().addAll((Collection)newValue); - return; - case EjbPackage.EJB_RELATION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.EJB_RELATION__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: - setRelationshipList((Relationships)null); - return; - case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: - getRelationshipRoles().clear(); - return; - case EjbPackage.EJB_RELATION__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", name: "); //$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - - public EJBRelationshipRole getRelationshipRole(String aRoleName) { - if (aRoleName == null) return null; - List roles = getRelationshipRoles(); - EJBRelationshipRole role = null; - for (int i = 0; i < roles.size(); i++) { - role = (EJBRelationshipRole) roles.get(i); - if (aRoleName.equals(role.getName())) - return role; - } - return null; - } -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationshipRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationshipRoleImpl.java deleted file mode 100644 index 82c67b2cf..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBRelationshipRoleImpl.java +++ /dev/null @@ -1,1012 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.lang.reflect.Constructor; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.emf.ecore.xmi.XMIResource; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.CommonRelationship; -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy; -import org.eclipse.jst.j2ee.ejb.MultiplicityKind; -import org.eclipse.jst.j2ee.ejb.RoleSource; -import org.eclipse.wst.common.emf.utilities.IDUtil; - -import com.ibm.wtp.common.logger.proxy.Logger; -/** - * The ejb-relationship-role element describes a role within a relationship. - * There are two roles in each relationship. The ejb-relationship-role element contains an optional description; an optional name for the relationship role; a specification of the multiplicity of the role; an optional specification of cascade-delete functionality for the role; the role source; and a declaration of the cmr-field, if any, by means of which the other side of the relationship is accessed from the perspective of the role source. The multiplicity and relationship-role-source element are mandatory. The relationship-role-source element designates an entity-bean by means of an ejb-name element. For bidirectional relationships, both roles of a relationship must declare a relationship-role-source element that specifies a cmr-field in terms of which the relationship is accessed. The lack of a cmr-field element in an ejb-relationship-role specifies that the relationship is unidirectional in navigability and that entity bean that participates in the relationship is "not aware" of the relationship. - * - * @invariant multiplicity != null - * @invariant roleSource != null - * @invariant Cascade delete can only be specified in an EJBRelationshipRole element in which the roleSource element specifies a dependent object class. - * @invariant Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBRelation in which the other EJBRelationshipRole element specifies a multiplicity of One. - * - * Example: - * - * Product-LineItem - * - * product-has-lineitems - * One - * - * ProductEJB - * - * - * ... - */ -public class EJBRelationshipRoleImpl extends EObjectImpl implements EJBRelationshipRole, EObject, CommonRelationshipRole { - - - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - protected static final EList EMPTY_ELIST = new org.eclipse.emf.common.util.BasicEList(0); - - // Need to cache the computed attributes so that they maintain identity - protected EList fAttributes = null; - protected String fName = null; - protected IRoleShapeStrategy roleShapeStrategy; - private static final String ROLE_STRATEGY_CLASS_NAME = "org.eclipse.jst.j2ee.ejb.impl.EJB20FlattenedRoleShapeStrategy"; //$NON-NLS-1$ - private static final String COMMON_ROLE_CLASS_NAME = "org.eclipse.jst.j2ee.ejb.CommonRelationshipRole"; //$NON-NLS-1$ - private static Class COMMON_ROLE_CLASS; - private static Class ROLE_STRATEGY_CLASS; - private static Constructor ROLE_STRATEGY_CONSTRUCTOR; - private static final String NAME_SUFFIX = "Inverse"; //$NON-NLS-1$ - - private boolean toStringGuard; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getRoleName() Role Name}' attribute. - * - * - * @see #getRoleName() - * @generated - * @ordered - */ - protected static final String ROLE_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String roleName = ROLE_NAME_EDEFAULT; - /** - * The default value of the '{@link #getMultiplicity() Multiplicity}' attribute. - * - * - * @see #getMultiplicity() - * @generated - * @ordered - */ - protected static final MultiplicityKind MULTIPLICITY_EDEFAULT = MultiplicityKind.ONE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected MultiplicityKind multiplicity = MULTIPLICITY_EDEFAULT; - /** - * This is true if the Multiplicity attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean multiplicityESet = false; - - /** - * The default value of the '{@link #isCascadeDelete() Cascade Delete}' attribute. - * - * - * @see #isCascadeDelete() - * @generated - * @ordered - */ - protected static final boolean CASCADE_DELETE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean cascadeDelete = CASCADE_DELETE_EDEFAULT; - /** - * This is true if the Cascade Delete attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean cascadeDeleteESet = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected RoleSource source = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected CMRField cmrField = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - private boolean wasForward = false; - private boolean wasMany = false; - - private boolean isKeySet = false; - private boolean key = false; - - private transient Boolean required = null; - - public EJBRelationshipRoleImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEJBRelationshipRole(); - } - - /** - * Return the persistentAttributes from my Entity that are used - * by this role. - */ - - public EList getAttributes() { - if (fAttributes == null) { - fAttributes = new BasicEList(1); - } - if (fAttributes.isEmpty()) { - getRoleShapeStrategy().reconcileAttributes(fAttributes); - } - return fAttributes; - } - /** - * Return our parent relationship as a CommonRelationship - */ - - public CommonRelationship getCommonRelationship() { - return getRelationship(); - } - protected IRoleShapeStrategy getDefaultRoleShapeStrategy() { - try { - return (IRoleShapeStrategy) getRoleStrategyConstructor(this).newInstance(new Object[] { this }); - } catch (Throwable t) { - Logger.getLogger().logError("EJBRelationshipRoleImpl:Could not instantiate role shape strategy; this requires extensions"); //$NON-NLS-1$ - Logger.getLogger().logError(t); - return null; - } - - } - - - /** - * @return The logical name which can be used for naming this role. - * Required to be unique within a JAR. - * If a cmr-field is defined, then a name in the form %source-ejb-name%_%cmr-field-name% is computed. - * Otherwise a default ID is generated. - */ - public String getLogicalName() { - String result = null; - String qualifier = getCmrField().getName(); - if (qualifier != null) { - result = getSource().getEntityBean().getName() + "_" + qualifier; //$NON-NLS-1$ - } else { - // Apply a default ID - result = IDUtil.getOrAssignID(this); - } - return result; - } - /** - * @return The name for this role, derived from the CMR-field name - * Used to determine the name used in querying this role as well as the accessor method names which implement it. - * Note: may return the XMI ID for non-navigable roles, ie - where there is no CMR-field. - */ - public String getName() { - if (fName == null) { - if (getCmrField() != null) - fName = getCmrField().getName(); - else if (getOpposite() != null) { - EJBRelationshipRole op = getOpposite(); - if (op.getCmrField() != null) - fName = op.getCmrField().getName() + op.getSourceEntity().getName() + NAME_SUFFIX; - } else { - if (eGetId() == null) - eSetId(); - fName = eGetId(); - } - } - return fName; - } - /** - * Return the other role. - */ - public EJBRelationshipRole getOpposite() { - if (getRelationship() != null) - return getRelationship().getOppositeRole(this); - return null; - } - /** - * Return the other role. - */ - public CommonRelationshipRole getOppositeAsCommonRole() { - return getOpposite(); - } - - /** - * Insert the method's description here. - * Creation date: (11/15/2000 6:50:30 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.IRoleShapeStrategy - */ - public IRoleShapeStrategy getRoleShapeStrategy() { - if (roleShapeStrategy == null) - roleShapeStrategy = getDefaultRoleShapeStrategy(); - return roleShapeStrategy; - } - /** - * @return The Source ejb - * Compute the ContainerManagedEntity which is the source of a role that participates in a relationship. - */ - public ContainerManagedEntity getSourceEntity() { - if(null == getSource()) { - return null; - } - return getSource().getEntityBean(); - } - /** - * @return The computed value of the isForward attribute - * Specifies whether this role should be mapped to a persistent reference, such as a foreign key. - * The current implementation is: - * - if the role is many, it cannot be forward - * - if the role is single and not navigable, it cannot be forward - * - all other things being equal, the first role is considered to be forward - * - clients can manipulate this by setting an ambiguous role to be fwd (by manipulating the role order under the covers). - */ - public boolean isForward() { - if (this.isMany()) - return false; - if (getOppositeAsCommonRole() == null) - return wasForward; - if (getOppositeAsCommonRole().isMany()) - return true; - // if (!this.isNavigable()) removed to allow non-navigable role in key - // return false; - if (getRelationship() == null) - return wasForward; - return (getRelationship().getFirstRole() == this); - } - /** - * @return The computed value isKey - */ - public boolean isKey() { - if (isKeySet) - return key; - return isKeyFromAttributes(); - } - - protected boolean isKeyFromAttributes() { - List list = getAttributes(); - if (list.isEmpty()) - return false; - Iterator it = list.iterator(); - CMPAttribute attribute; - while (it.hasNext()) { - attribute = (CMPAttribute) it.next(); - if (!attribute.isKey()) - return false; - } - return true; - } - - /** - * This allows you to set the Role as being key so it will - * not traverse it attributes to determine if it is key. - */ - public void setKey(boolean aBoolean) { - key = aBoolean; - isKeySet = true; - } - - /** - * Handwritten version of isMany(): - */ - - - public boolean isMany() { - if (getOpposite() == null) - return wasMany; - return getOpposite().getMultiplicity() == MultiplicityKind.MANY_LITERAL; - } - - - - /** - * @return The computed value of the isNavigable attribute - * Specifies that accessors should be generated for this relationship role. - * Current implementation is to test whether or not a CMR field exists. - */ - public boolean isNavigable() { - return getCmrField() != null; - } - - - public void reconcileAttributes() { - if (fAttributes != null) - getRoleShapeStrategy().reconcileAttributes(fAttributes); - } - - - /** - * Set this role to be the forward role. - */ - public void setFoward() { - getRelationship().setFoward(this); - } - public void setName(java.lang.String uniqueName) { - fName = uniqueName; - } - public String toString() { - if (toStringGuard) return super.toString(); - try { - toStringGuard = true; - String oppositeType = getOpposite() != null ? getTypeEntity().getName() : "<>"; //$NON-NLS-1$ - return getName() + "(" + oppositeType + ")" + (isMany() ? " *" : " 1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } catch (Exception e) { - return e.toString(); - } finally { - toStringGuard = false; - } - } - - private static Class getCommonRoleClass(Object caller) throws ClassNotFoundException { - - if (COMMON_ROLE_CLASS == null) { - COMMON_ROLE_CLASS = loadClass(COMMON_ROLE_CLASS_NAME, caller); - } - return COMMON_ROLE_CLASS; - } - - private static Class loadClass(String name, Object caller) throws ClassNotFoundException { - ClassLoader cl = caller.getClass().getClassLoader(); - if (cl != null) - return cl.loadClass(name); - return Class.forName(name); - } - - private static Class getRoleStrategyClass(Object caller) throws ClassNotFoundException { - if (ROLE_STRATEGY_CLASS == null) - ROLE_STRATEGY_CLASS = loadClass(ROLE_STRATEGY_CLASS_NAME, caller); - return ROLE_STRATEGY_CLASS; - } - - private static Constructor getRoleStrategyConstructor(Object caller) throws ClassNotFoundException, NoSuchMethodException { - if (ROLE_STRATEGY_CONSTRUCTOR == null) { - Class[] parmTypes = new Class[] { getCommonRoleClass(caller)}; - ROLE_STRATEGY_CONSTRUCTOR = getRoleStrategyClass(caller).getConstructor(parmTypes); - } - return ROLE_STRATEGY_CONSTRUCTOR; - } - - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing - * the ejb relationship role. - * - * The description should include any information that the ejb-jar file producer - * wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). - * Typically, the tools used by the ejb-jar file consumer will display the - * description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * Defines a name for a role that is unique within an ejb-relation. Different - * relationships can use the same name for a role. - - */ - public String getRoleName() { - return roleName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRoleName(String newRoleName) { - String oldRoleName = roleName; - roleName = newRoleName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME, oldRoleName, roleName)); - } - - /** - * - * - * @generated - */ - public MultiplicityKind getMultiplicity() { - return multiplicity; - } - - /** - * - * - * @generated - */ - public void setMultiplicity(MultiplicityKind newMultiplicity) { - MultiplicityKind oldMultiplicity = multiplicity; - multiplicity = newMultiplicity == null ? MULTIPLICITY_EDEFAULT : newMultiplicity; - boolean oldMultiplicityESet = multiplicityESet; - multiplicityESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, multiplicity, !oldMultiplicityESet)); - } - - /** - * - * - * @generated - */ - public void unsetMultiplicity() { - MultiplicityKind oldMultiplicity = multiplicity; - boolean oldMultiplicityESet = multiplicityESet; - multiplicity = MULTIPLICITY_EDEFAULT; - multiplicityESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, MULTIPLICITY_EDEFAULT, oldMultiplicityESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetMultiplicity() { - return multiplicityESet; - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies that, within a particular relationship, the lifetime of one or more - * entity beans is dependent upon the lifetime of another entity bean. The - * cascade-delete element can Cascade delete can only be specified for an - * EJBRelationshipRole contained in an EJBrelation in which the other - * EJBRelationshipRole element specifies a multiplicity of One. - * - * - - */ - public boolean isCascadeDelete() { - return cascadeDelete; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setCascadeDelete(boolean newCascadeDelete) { - boolean oldCascadeDelete = cascadeDelete; - cascadeDelete = newCascadeDelete; - boolean oldCascadeDeleteESet = cascadeDeleteESet; - cascadeDeleteESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, cascadeDelete, !oldCascadeDeleteESet)); - } - - /** - * - * - * @generated - */ - public void unsetCascadeDelete() { - boolean oldCascadeDelete = cascadeDelete; - boolean oldCascadeDeleteESet = cascadeDeleteESet; - cascadeDelete = CASCADE_DELETE_EDEFAULT; - cascadeDeleteESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, CASCADE_DELETE_EDEFAULT, oldCascadeDeleteESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetCascadeDelete() { - return cascadeDeleteESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EJBRelation getRelationship() { - if (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP) return null; - return (EJBRelation)eContainer; - } - - /** - * This field/method will be replaced during code generation. - */ - public void setRelationship(EJBRelation newContainer) { - if (newContainer == null && getRelationship() != null) { - updateCachedSettings(); - EJBRelationshipRoleImpl roleOpposite = (EJBRelationshipRoleImpl) getOpposite(); - if (roleOpposite != null) - roleOpposite.updateCachedSettings(); - } else - wasForward = false; - setRelationshipGen(newContainer); - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#getTargetAttributeName(org.eclipse.jst.j2ee.internal.ejb.CMPAttribute) - */ - public String getTargetAttributeName(CMPAttribute roleAttribute) { - int roleNameSize = getName().length(); - return roleAttribute.getName().substring(roleNameSize + 1); - } - /** - * Method updateCachedSettings. - */ - protected void updateCachedSettings() { - wasForward = isForward(); - wasMany = isMany(); - } - - /** - * @generated This field/method will be replaced during code generation - * Designates the source of a role that participates in a relationship. A - * relationship-role-source element uniquely identifies an entity bean. - * @migration EJB1.1: was ibmejbext::EjbRelationshipRole::sourceEJBName, but that - * may not be sufficient, as this can now refer to dependent class names or ejb - * refs - */ - public RoleSource getSource() { - return source; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSource(RoleSource newSource, NotificationChain msgs) { - RoleSource oldSource = source; - source = newSource; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, oldSource, newSource); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSource(RoleSource newSource) { - if (newSource != source) { - NotificationChain msgs = null; - if (source != null) - msgs = ((InternalEObject)source).eInverseRemove(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs); - if (newSource != null) - msgs = ((InternalEObject)newSource).eInverseAdd(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs); - msgs = basicSetSource(newSource, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, newSource, newSource)); - } - - /** - * @generated This field/method will be replaced during code generation - * A declaration of the CMRField, if any, by means of which the other side of the - * relationship is accessed from the perspective of the role source - * - * @migration EJB1.1: Used to be handled via ibmejbext::EjbRole::attributes list - */ - public CMRField getCmrField() { - return cmrField; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetCmrField(CMRField newCmrField, NotificationChain msgs) { - CMRField oldCmrField = cmrField; - cmrField = newCmrField; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, oldCmrField, newCmrField); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setCmrField(CMRField newCmrField) { - if (newCmrField != cmrField) { - NotificationChain msgs = null; - if (cmrField != null) - msgs = ((InternalEObject)cmrField).eInverseRemove(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs); - if (newCmrField != null) - msgs = ((InternalEObject)newCmrField).eInverseAdd(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs); - msgs = basicSetCmrField(newCmrField, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, newCmrField, newCmrField)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - if (source != null) - msgs = ((InternalEObject)source).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, null, msgs); - return basicSetSource((RoleSource)otherEnd, msgs); - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - if (cmrField != null) - msgs = ((InternalEObject)cmrField).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, null, msgs); - return basicSetCmrField((CMRField)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - return eBasicSetContainer(null, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - return basicSetSource(null, msgs); - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - return basicSetCmrField(null, msgs); - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: - return getDescription(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: - return getRoleName(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: - return getMultiplicity(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: - return isCascadeDelete() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - return getRelationship(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - return getSource(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - return getCmrField(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: - return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); - case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: - return isSetMultiplicity(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: - return isSetCascadeDelete(); - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - return getRelationship() != null; - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - return source != null; - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - return cmrField != null; - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: - setRoleName((String)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: - setMultiplicity((MultiplicityKind)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: - setCascadeDelete(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - setRelationship((EJBRelation)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - setSource((RoleSource)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - setCmrField((CMRField)newValue); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: - setRoleName(ROLE_NAME_EDEFAULT); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: - unsetMultiplicity(); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: - unsetCascadeDelete(); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: - setRelationship((EJBRelation)null); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: - setSource((RoleSource)null); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: - setCmrField((CMRField)null); - return; - case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toStringGen() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", roleName: "); //$NON-NLS-1$ - result.append(roleName); - result.append(", multiplicity: "); //$NON-NLS-1$ - if (multiplicityESet) result.append(multiplicity); else result.append(""); //$NON-NLS-1$ - result.append(", cascadeDelete: "); //$NON-NLS-1$ - if (cascadeDeleteESet) result.append(cascadeDelete); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - - /* - * @see CommonRelationshipRole#getTypeEntity() - */ - public ContainerManagedEntity getTypeEntity() { - if (getOpposite() != null) - return getOpposite().getSourceEntity(); - return null; - } - - /** - * @see CommonRelationshipRole#isRequired() - */ - public boolean isRequired() { - if (required!=null) - return required.booleanValue(); - return isKey(); - } - - /** - * Set the isRequired flag for bottom up - */ - public void setRequired(Boolean isRequired) { - required = isRequired; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRelationshipGen(EJBRelation newRelationship) { - if (newRelationship != eContainer || (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP && newRelationship != null)) { - if (EcoreUtil.isAncestor(this, newRelationship)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newRelationship != null) - msgs = ((InternalEObject)newRelationship).eInverseAdd(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newRelationship, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, newRelationship, newRelationship)); - } - - /** - * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setLower(int) - */ - public void setLower(int lowerBound) { - // Do nothing... Only upperbound is relevant here - } - - /** - * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setUpper(int) - */ - public void setUpper(int upperBound) { - switch (upperBound) { - case MultiplicityKind.ONE : - setMultiplicity(MultiplicityKind.ONE_LITERAL); - break; - default : - setMultiplicity(MultiplicityKind.MANY_LITERAL); - break; - } - } - - /** - Gets the MOF XMI ref id for this object. - */ - private String eGetId() { - XMIResource res = (XMIResource)eResource(); - if (res == null) - return null; - return res.getID(this); - } - - - /** - * Set and return The id of this element - */ - private String eSetId() { - - - IDUtil.getOrAssignID(this); - - return eGetId(); - } - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBResourceImpl.java deleted file mode 100644 index 50b2ad557..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EJBResourceImpl.java +++ /dev/null @@ -1,211 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 27, 2003 - * - */ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBResource; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.model.translator.ejb.EJBJarTranslator; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - -/** - * @author schacher - */ -public class EJBResourceImpl extends XMLResourceImpl implements EJBResource { - - /** - * @param uri - * @param aRenderer - */ - public EJBResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - /** - * @param aRenderer - */ - public EJBResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /* - * @see EJBResource#isEJB1_1() - * @deprecated - use getModuleVersionID() and J2EEVersionConstants - */ - public boolean isEJB1_1() { - return getModuleVersionID() == EJB_1_1_ID; - } - - /* - * @see EJBResource#isEJB2_0() - * @deprecated - use getModuleVersionID() and J2EEVersionConstants - */ - public boolean isEJB2_0() { - return getModuleVersionID() == EJB_2_0_ID; - } - - - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResource#getType() - */ - public int getType() { - return XMLResource.EJB_TYPE; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() - */ - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.EJBJAR_DOCTYPE; - default : - return null; - } - - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.EJBJAR_PUBLICID_1_1; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.EJBJAR_SYSTEMID_1_1; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.EJBJAR_PUBLICID_2_0; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.EJBJAR_SYSTEMID_2_0; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return EJBJarTranslator.INSTANCE; - } - - /* Return J2EE version based on module version - */ - public int getJ2EEVersionID() { - switch (getModuleVersionID()) { - case J2EEVersionConstants.EJB_1_0_ID : - return J2EEVersionConstants.J2EE_1_2_ID; - case J2EEVersionConstants.EJB_1_1_ID : - return J2EEVersionConstants.J2EE_1_2_ID; - case J2EEVersionConstants.EJB_2_0_ID : - return J2EEVersionConstants.J2EE_1_3_ID; - case J2EEVersionConstants.EJB_2_1_ID : - return J2EEVersionConstants.J2EE_1_4_ID; - default : - return J2EEVersionConstants.J2EE_1_4_ID; - } - } - - /** - * Return the first element in the EList. - */ - public EJBJar getEJBJar() { - return (EJBJar) getRootObject(); - } - - public void setBatchMode(boolean isBatch) { - renderer.setBatchMode(isBatch); - - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (EJB_2_1_ID) : - super.setDoctypeValues(null, null); - break; - case (EJB_2_0_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (EJB_1_1_ID) : - super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - break; - case (EJB_1_0_ID) : - super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version - */ - public void setJ2EEVersionID(int id) { - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - primSetVersionID(EJB_2_1_ID); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - primSetVersionID(EJB_2_0_ID); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - primSetVersionID(EJB_1_1_ID); - } - syncVersionOfRootObject(); - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return EJB_2_1_ID; - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - EJBJar ejbJar = getEJBJar(); - if (ejbJar == null) - return; - - String version = ejbJar.getVersion(); - String newVersion = getModuleVersionString(); - if (!newVersion.equals(version)) - ejbJar.setVersion(newVersion); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbFactoryImpl.java deleted file mode 100644 index 2a1b247c0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbFactoryImpl.java +++ /dev/null @@ -1,503 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaParameter; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.DestinationType; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbFactory; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.MultiplicityKind; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.Relationships; -import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; -import org.eclipse.jst.j2ee.ejb.RoleSource; -import org.eclipse.jst.j2ee.ejb.Session; -import org.eclipse.jst.j2ee.ejb.SessionType; -import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; -import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; -import org.eclipse.jst.j2ee.ejb.TransactionType; -import org.eclipse.jst.j2ee.ejb.util.CMPKeySynchronizationAdapter; -import org.eclipse.wst.common.emf.utilities.AdapterFactoryDescriptor; -import org.eclipse.wst.common.emf.utilities.AdapterFactoryUtil; -import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; - - - -/** - * @generated - */ -public class EjbFactoryImpl extends EFactoryImpl implements EjbFactory{ - private static List CMP_ADAPTER_FACTORIES = new ArrayList(1); - private static List CMP_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); - private static List EJB_RELATION_ADAPTER_FACTORIES = new ArrayList(1); - private static List EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); - private static List RELATIONSHIPS_ADAPTER_FACTORIES = new ArrayList(1); - private static List RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); - public static final String MM_VERSION = "1.1"; //$NON-NLS-1$ - private boolean createdAdapterFactories = false; - - public EjbFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case EjbPackage.CONTAINER_MANAGED_ENTITY: return createContainerManagedEntity(); - case EjbPackage.METHOD_PERMISSION: return createMethodPermission(); - case EjbPackage.ASSEMBLY_DESCRIPTOR: return createAssemblyDescriptor(); - case EjbPackage.METHOD_TRANSACTION: return createMethodTransaction(); - case EjbPackage.SESSION: return createSession(); - case EjbPackage.ENTITY: return createEntity(); - case EjbPackage.EJB_METHOD_CATEGORY: return createEJBMethodCategory(); - case EjbPackage.EJB_JAR: return createEJBJar(); - case EjbPackage.METHOD_ELEMENT: return createMethodElement(); - case EjbPackage.CMP_ATTRIBUTE: return createCMPAttribute(); - case EjbPackage.RELATIONSHIPS: return createRelationships(); - case EjbPackage.QUERY: return createQuery(); - case EjbPackage.EJB_RELATION: return createEJBRelation(); - case EjbPackage.EJB_RELATIONSHIP_ROLE: return createEJBRelationshipRole(); - case EjbPackage.ROLE_SOURCE: return createRoleSource(); - case EjbPackage.CMR_FIELD: return createCMRField(); - case EjbPackage.MESSAGE_DRIVEN: return createMessageDriven(); - case EjbPackage.MESSAGE_DRIVEN_DESTINATION: return createMessageDrivenDestination(); - case EjbPackage.EXCLUDE_LIST: return createExcludeList(); - case EjbPackage.QUERY_METHOD: return createQueryMethod(); - case EjbPackage.ACTIVATION_CONFIG_PROPERTY: return createActivationConfigProperty(); - case EjbPackage.ACTIVATION_CONFIG: return createActivationConfig(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE: - return TransactionAttributeType.get(initialValue); - case EjbPackage.TRANSACTION_TYPE: - return TransactionType.get(initialValue); - case EjbPackage.SESSION_TYPE: - return SessionType.get(initialValue); - case EjbPackage.METHOD_ELEMENT_KIND: - return MethodElementKind.get(initialValue); - case EjbPackage.ACKNOWLEDGE_MODE: - return AcknowledgeMode.get(initialValue); - case EjbPackage.SUBSCRIPTION_DURABILITY_KIND: - return SubscriptionDurabilityKind.get(initialValue); - case EjbPackage.RETURN_TYPE_MAPPING: - return ReturnTypeMapping.get(initialValue); - case EjbPackage.DESTINATION_TYPE: - return DestinationType.get(initialValue); - case EjbPackage.MULTIPLICITY_KIND: - return MultiplicityKind.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.TRANSACTION_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.SESSION_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.METHOD_ELEMENT_KIND: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.ACKNOWLEDGE_MODE: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.SUBSCRIPTION_DURABILITY_KIND: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.RETURN_TYPE_MAPPING: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.DESTINATION_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case EjbPackage.MULTIPLICITY_KIND: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - -public MethodElement createMethodElement(String aSignature) { - MethodElement me = createMethodElement(); - me.initializeFromSignature(aSignature); - return me; -} -/** - * Helper method to create a MethodElement from a java method. Defaults the type to "Unspecified". - */ -public MethodElement createMethodElementFrom( - Method method) { - - MethodElement element = createMethodElement(); - element.setName(method.getName()); - element.setType(MethodElementKind.UNSPECIFIED_LITERAL); - - JavaParameter[] params = - method.listParametersWithoutReturn(); - if (params.length == 0) - element.applyZeroParams(); - else { - for (int i = 0; i < params.length; i++) { - JavaHelpers helper = (JavaHelpers) params[i].getEType(); - element.addMethodParams(helper.getQualifiedName()); - } - } - return element; -} -/** - * Helper method to reflect the method and create a MethodElement. If the parameter is null, creates an element - * with a name of "*". Defaults the type to "Unspecified". - */ -public MethodElement createMethodElementFrom(java.lang.reflect.Method method) { - - String methodName = method == null ? "*" : method.getName(); //$NON-NLS-1$ - MethodElement me = createMethodElement(); - me.setName(methodName); - me.setType(MethodElementKind.UNSPECIFIED_LITERAL); - if (method != null) { - Class[] types = method.getParameterTypes(); - for (int i = 0; i < types.length; i++) { - me.addMethodParams(getTypeName(types[i])); - } - } - return me; -} -public static EjbFactory getActiveFactory() { - return (EjbFactory) getPackage().getEFactoryInstance(); -} -/* - * Utility routine to paper over array type names - * Borrowed from a package-visibility helper on java.lang.reflect.Field - */ -static String getTypeName(Class type) { - if (type.isArray()) { - try { - Class cl = type; - int dimensions = 0; - while (cl.isArray()) { - dimensions++; - cl = cl.getComponentType(); - } - StringBuffer sb = new StringBuffer(); - sb.append(cl.getName()); - for (int i = 0; i < dimensions; i++) { - sb.append("[]");//$NON-NLS-1$ - } - return sb.toString(); - } catch (Throwable e) { /*FALLTHRU*/ - } - } - return type.getName(); -} - - - /** - * @generated This field/method will be replaced during code generation. - */ - public MethodPermission createMethodPermission() { - MethodPermissionImpl methodPermission = new MethodPermissionImpl(); - return methodPermission; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public AssemblyDescriptor createAssemblyDescriptor() { - AssemblyDescriptorImpl assemblyDescriptor = new AssemblyDescriptorImpl(); - return assemblyDescriptor; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public MethodTransaction createMethodTransaction() { - MethodTransactionImpl methodTransaction = new MethodTransactionImpl(); - return methodTransaction; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Entity createEntity() { - EntityImpl entity = new EntityImpl(); - return entity; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ContainerManagedEntity createContainerManagedEntityGen() { - ContainerManagedEntityImpl containerManagedEntity = new ContainerManagedEntityImpl(); - return containerManagedEntity; - } - - public ContainerManagedEntity createContainerManagedEntity() { - ContainerManagedEntity cmp = createContainerManagedEntityGen(); - adaptNew(cmp, CMP_ADAPTER_FACTORIES); - addKeySynchronizationAdapter(cmp); - return cmp; - } - - /** - * @param cmp - */ - private void addKeySynchronizationAdapter(ContainerManagedEntity cmp) { - CMPKeySynchronizationAdapter cmpAdapter = new CMPKeySynchronizationAdapter(cmp); - Adapter loadingAdapter = ExtendedEcoreUtil.createAdapterForLoading(cmpAdapter,cmp); - cmp.eAdapters().add(loadingAdapter); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public CMPAttribute createCMPAttribute() { - CMPAttributeImpl cmpAttribute = new CMPAttributeImpl(); - return cmpAttribute; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public CMRField createCMRField() { - CMRFieldImpl cmrField = new CMRFieldImpl(); - return cmrField; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EJBRelationshipRole createEJBRelationshipRole() { - EJBRelationshipRoleImpl ejbRelationshipRole = new EJBRelationshipRoleImpl(); - return ejbRelationshipRole; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EJBRelation createEJBRelationGen() { - EJBRelationImpl ejbRelation = new EJBRelationImpl(); - return ejbRelation; - } - - public EJBRelation createEJBRelation() { - EJBRelation rel = createEJBRelationGen(); - adaptNew(rel, EJB_RELATION_ADAPTER_FACTORIES); - return rel; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Relationships createRelationshipsGen() { - RelationshipsImpl relationships = new RelationshipsImpl(); - return relationships; - } - - public Relationships createRelationships() { - Relationships rel = createRelationshipsGen(); - adaptNew(rel, RELATIONSHIPS_ADAPTER_FACTORIES); - return rel; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public EJBJar createEJBJar() { - EJBJarImpl ejbJar = new EJBJarImpl(); - return ejbJar; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public RoleSource createRoleSource() { - RoleSourceImpl roleSource = new RoleSourceImpl(); - return roleSource; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Query createQuery() { - QueryImpl query = new QueryImpl(); - return query; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public QueryMethod createQueryMethod() { - QueryMethodImpl queryMethod = new QueryMethodImpl(); - return queryMethod; - } - - /** - * - * - * @generated - */ - public ActivationConfigProperty createActivationConfigProperty() { - ActivationConfigPropertyImpl activationConfigProperty = new ActivationConfigPropertyImpl(); - return activationConfigProperty; - } - - /** - * - * - * @generated - */ - public ActivationConfig createActivationConfig() { - ActivationConfigImpl activationConfig = new ActivationConfigImpl(); - return activationConfig; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public MethodElement createMethodElement() { - MethodElementImpl methodElement = new MethodElementImpl(); - return methodElement; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ExcludeList createExcludeList() { - ExcludeListImpl excludeList = new ExcludeListImpl(); - return excludeList; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Session createSession() { - SessionImpl session = new SessionImpl(); - return session; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public MessageDriven createMessageDriven() { - MessageDrivenImpl messageDriven = new MessageDrivenImpl(); - return messageDriven; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public MessageDrivenDestination createMessageDrivenDestination() { - MessageDrivenDestinationImpl messageDrivenDestination = new MessageDrivenDestinationImpl(); - return messageDrivenDestination; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EJBMethodCategory createEJBMethodCategory() { - EJBMethodCategoryImpl ejbMethodCategory = new EJBMethodCategoryImpl(); - return ejbMethodCategory; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EjbPackage getEjbPackage() { - return (EjbPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static EjbPackage getPackage() { - return EjbPackage.eINSTANCE; - } - public static void internalRegisterCMPAdapterFactory(AdapterFactoryDescriptor config) { - CMP_ADAPTER_FACTORY_DESCRIPTORS.add(config); - - } - public static void internalRegisterEJBRelationAdapterFactory(AdapterFactoryDescriptor config) { - EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS.add(config); - } - public static void internalRegisterRelationshipsAdapterFactory(AdapterFactoryDescriptor config) { - RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS.add(config); - } - - - private void createAdapterFactories() { - createdAdapterFactories = true; - AdapterFactoryUtil.createAdapterFactories(CMP_ADAPTER_FACTORY_DESCRIPTORS, CMP_ADAPTER_FACTORIES); - AdapterFactoryUtil.createAdapterFactories(EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS, EJB_RELATION_ADAPTER_FACTORIES); - AdapterFactoryUtil.createAdapterFactories(RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS, RELATIONSHIPS_ADAPTER_FACTORIES); - } - - private void adaptNew(Notifier notifier, List factories) { - if (!createdAdapterFactories) - createAdapterFactories(); - AdapterFactoryUtil.adaptNew(notifier, factories); - } - -} - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbPackageImpl.java deleted file mode 100644 index 8e9789e1d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EjbPackageImpl.java +++ /dev/null @@ -1,1772 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.DestinationType; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbFactory; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.MultiplicityKind; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.Relationships; -import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; -import org.eclipse.jst.j2ee.ejb.RoleSource; -import org.eclipse.jst.j2ee.ejb.Session; -import org.eclipse.jst.j2ee.ejb.SessionType; -import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; -import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; -import org.eclipse.jst.j2ee.ejb.TransactionType; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class EjbPackageImpl extends EPackageImpl implements EjbPackage, EPackage { - /** - * - * - * @generated - */ - private EClass containerManagedEntityEClass = null; - - /** - * - * - * @generated - */ - private EClass methodPermissionEClass = null; - - /** - * - * - * @generated - */ - private EClass assemblyDescriptorEClass = null; - - /** - * - * - * @generated - */ - private EClass methodTransactionEClass = null; - - /** - * - * - * @generated - */ - private EClass sessionEClass = null; - - /** - * - * - * @generated - */ - private EClass entityEClass = null; - - /** - * - * - * @generated - */ - private EClass enterpriseBeanEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbMethodCategoryEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbJarEClass = null; - - /** - * - * - * @generated - */ - private EClass methodElementEClass = null; - - /** - * - * - * @generated - */ - private EClass cmpAttributeEClass = null; - - /** - * - * - * @generated - */ - private EClass relationshipsEClass = null; - - /** - * - * - * @generated - */ - private EClass queryEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbRelationEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbRelationshipRoleEClass = null; - - /** - * - * - * @generated - */ - private EClass roleSourceEClass = null; - - /** - * - * - * @generated - */ - private EClass cmrFieldEClass = null; - - /** - * - * - * @generated - */ - private EClass messageDrivenEClass = null; - - /** - * - * - * @generated - */ - private EClass messageDrivenDestinationEClass = null; - - /** - * - * - * @generated - */ - private EClass excludeListEClass = null; - - /** - * - * - * @generated - */ - private EClass queryMethodEClass = null; - - /** - * - * - * @generated - */ - private EClass activationConfigPropertyEClass = null; - - /** - * - * - * @generated - */ - private EClass activationConfigEClass = null; - - /** - * - * - * @generated - */ - private EEnum transactionAttributeTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum transactionTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum sessionTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum methodElementKindEEnum = null; - - /** - * - * - * @generated - */ - private EEnum acknowledgeModeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum subscriptionDurabilityKindEEnum = null; - - /** - * - * - * @generated - */ - private EEnum returnTypeMappingEEnum = null; - - /** - * - * - * @generated - */ - private EEnum destinationTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum multiplicityKindEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private EjbPackageImpl() { - super(eNS_URI, EjbFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static EjbPackage init() { - if (isInited) return (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); - - // Obtain or create and register package. - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new EjbPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); - - - // Step 1: create meta-model objects - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - - // Step 2: complete initialization - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - - return theEjbPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMethodPermission() { - return methodPermissionEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodPermission_Description() { - return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodPermission_Unchecked() { - return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodPermission_AssemblyDescriptor() { - return (EReference)methodPermissionEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodPermission_Roles() { - return (EReference)methodPermissionEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodPermission_MethodElements() { - return (EReference)methodPermissionEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getMethodPermission_Descriptions() { - return (EReference)methodPermissionEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getAssemblyDescriptor() { - return assemblyDescriptorEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAssemblyDescriptor_MethodPermissions() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAssemblyDescriptor_MethodTransactions() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAssemblyDescriptor_EjbJar() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAssemblyDescriptor_SecurityRoles() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAssemblyDescriptor_ExcludeList() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getAssemblyDescriptor_MessageDestinations() { - return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMethodTransaction() { - return methodTransactionEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodTransaction_TransactionAttribute() { - return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodTransaction_Description() { - return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodTransaction_AssemblyDescriptor() { - return (EReference)methodTransactionEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodTransaction_MethodElements() { - return (EReference)methodTransactionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getMethodTransaction_Descriptions() { - return (EReference)methodTransactionEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEnterpriseBean() { - return enterpriseBeanEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getEnterpriseBean_Name() { - return (EAttribute)enterpriseBeanEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_SecurityRoleRefs() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_EjbClass() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_HomeInterface() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_RemoteInterface() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_EjbJar() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_SecurityIdentity() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_LocalHomeInterface() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEnterpriseBean_LocalInterface() { - return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(8); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEntity() { - return entityEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getEntity_Reentrant() { - return (EAttribute)entityEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEntity_PrimaryKey() { - return (EReference)entityEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getContainerManagedEntity() { - return containerManagedEntityEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getContainerManagedEntity_Version() { - return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getContainerManagedEntity_AbstractSchemaName() { - return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getContainerManagedEntity_PersistentAttributes() { - return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getContainerManagedEntity_KeyAttributes() { - return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getContainerManagedEntity_Queries() { - return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getContainerManagedEntity_CMPAttribute() { - return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getContainerManagedEntity_PrimKeyField() { - return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getCMPAttribute() { - return cmpAttributeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getCMPAttribute_Description() { - return (EAttribute)cmpAttributeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCMPAttribute_Descriptions() { - return (EReference)cmpAttributeEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getCMRField() { - return cmrFieldEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getCMRField_Role() { - return (EReference)cmrFieldEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getCMRField_CollectionType() { - return (EReference)cmrFieldEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEJBRelationshipRole() { - return ejbRelationshipRoleEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelationshipRole_Description() { - return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelationshipRole_RoleName() { - return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelationshipRole_Multiplicity() { - return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelationshipRole_CascadeDelete() { - return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBRelationshipRole_Relationship() { - return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBRelationshipRole_Source() { - return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBRelationshipRole_CmrField() { - return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getEJBRelationshipRole_Descriptions() { - return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEJBRelation() { - return ejbRelationEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelation_Description() { - return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBRelation_Name() { - return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBRelation_RelationshipList() { - return (EReference)ejbRelationEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBRelation_RelationshipRoles() { - return (EReference)ejbRelationEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getEJBRelation_Descriptions() { - return (EReference)ejbRelationEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getRelationships() { - return relationshipsEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getRelationships_Description() { - return (EAttribute)relationshipsEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getRelationships_EjbJar() { - return (EReference)relationshipsEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getRelationships_EjbRelations() { - return (EReference)relationshipsEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getRelationships_Descriptions() { - return (EReference)relationshipsEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEJBJar() { - return ejbJarEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getEJBJar_EjbClientJar() { - return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getEJBJar_Version() { - return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBJar_AssemblyDescriptor() { - return (EReference)ejbJarEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBJar_EnterpriseBeans() { - return (EReference)ejbJarEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getEJBJar_RelationshipList() { - return (EReference)ejbJarEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getRoleSource() { - return roleSourceEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getRoleSource_Description() { - return (EAttribute)roleSourceEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getRoleSource_Role() { - return (EReference)roleSourceEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getRoleSource_EntityBean() { - return (EReference)roleSourceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getRoleSource_Descriptions() { - return (EReference)roleSourceEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getQuery() { - return queryEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getQuery_Description() { - return (EAttribute)queryEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getQuery_EjbQL() { - return (EAttribute)queryEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getQuery_ReturnTypeMapping() { - return (EAttribute)queryEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getQuery_QueryMethod() { - return (EReference)queryEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getQuery_Entity() { - return (EReference)queryEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getQuery_Descriptions() { - return (EReference)queryEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getQueryMethod() { - return queryMethodEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getQueryMethod_Query() { - return (EReference)queryMethodEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getActivationConfigProperty() { - return activationConfigPropertyEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getActivationConfigProperty_Value() { - return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getActivationConfigProperty_Name() { - return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getActivationConfig() { - return activationConfigEClass; - } - - /** - * - * - * @generated - */ - public EReference getActivationConfig_ConfigProperties() { - return (EReference)activationConfigEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getActivationConfig_Descriptions() { - return (EReference)activationConfigEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMethodElement() { - return methodElementEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodElement_Name() { - return (EAttribute)methodElementEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodElement_Parms() { - return (EAttribute)methodElementEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodElement_Type() { - return (EAttribute)methodElementEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMethodElement_Description() { - return (EAttribute)methodElementEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMethodElement_EnterpriseBean() { - return (EReference)methodElementEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getMethodElement_Descriptions() { - return (EReference)methodElementEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getExcludeList() { - return excludeListEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getExcludeList_Description() { - return (EAttribute)excludeListEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getExcludeList_MethodElements() { - return (EReference)excludeListEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getExcludeList_Descriptions() { - return (EReference)excludeListEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSession() { - return sessionEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSession_TransactionType() { - return (EAttribute)sessionEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSession_SessionType() { - return (EAttribute)sessionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getSession_ServiceEndpoint() { - return (EReference)sessionEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMessageDriven() { - return messageDrivenEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMessageDriven_TransactionType() { - return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMessageDriven_MessageSelector() { - return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMessageDriven_AcknowledgeMode() { - return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMessageDriven_Destination() { - return (EReference)messageDrivenEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getMessageDriven_ActivationConfig() { - return (EReference)messageDrivenEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getMessageDriven_MessageDestination() { - return (EReference)messageDrivenEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EAttribute getMessageDriven_Link() { - return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getMessageDriven_MessagingType() { - return (EReference)messageDrivenEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMessageDrivenDestination() { - return messageDrivenDestinationEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMessageDrivenDestination_Type() { - return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMessageDrivenDestination_SubscriptionDurability() { - return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMessageDrivenDestination_Bean() { - return (EReference)messageDrivenDestinationEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getEJBMethodCategory() { - return ejbMethodCategoryEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getTransactionAttributeType() { - return transactionAttributeTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getMultiplicityKind() { - return multiplicityKindEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getReturnTypeMapping() { - return returnTypeMappingEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getMethodElementKind() { - return methodElementKindEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getTransactionType() { - return transactionTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getAcknowledgeMode() { - return acknowledgeModeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getDestinationType() { - return destinationTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getSubscriptionDurabilityKind() { - return subscriptionDurabilityKindEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getSessionType() { - return sessionTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EjbFactory getEjbFactory() { - return (EjbFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - containerManagedEntityEClass = createEClass(CONTAINER_MANAGED_ENTITY); - createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__VERSION); - createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME); - createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES); - createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES); - createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__QUERIES); - createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE); - createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD); - - methodPermissionEClass = createEClass(METHOD_PERMISSION); - createEAttribute(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTION); - createEAttribute(methodPermissionEClass, METHOD_PERMISSION__UNCHECKED); - createEReference(methodPermissionEClass, METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR); - createEReference(methodPermissionEClass, METHOD_PERMISSION__ROLES); - createEReference(methodPermissionEClass, METHOD_PERMISSION__METHOD_ELEMENTS); - createEReference(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTIONS); - - assemblyDescriptorEClass = createEClass(ASSEMBLY_DESCRIPTOR); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EJB_JAR); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__SECURITY_ROLES); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST); - createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS); - - methodTransactionEClass = createEClass(METHOD_TRANSACTION); - createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE); - createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTION); - createEReference(methodTransactionEClass, METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR); - createEReference(methodTransactionEClass, METHOD_TRANSACTION__METHOD_ELEMENTS); - createEReference(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTIONS); - - sessionEClass = createEClass(SESSION); - createEAttribute(sessionEClass, SESSION__TRANSACTION_TYPE); - createEAttribute(sessionEClass, SESSION__SESSION_TYPE); - createEReference(sessionEClass, SESSION__SERVICE_ENDPOINT); - - entityEClass = createEClass(ENTITY); - createEAttribute(entityEClass, ENTITY__REENTRANT); - createEReference(entityEClass, ENTITY__PRIMARY_KEY); - - enterpriseBeanEClass = createEClass(ENTERPRISE_BEAN); - createEAttribute(enterpriseBeanEClass, ENTERPRISE_BEAN__NAME); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_ROLE_REFS); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_CLASS); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__HOME_INTERFACE); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__REMOTE_INTERFACE); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_JAR); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_IDENTITY); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE); - createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_INTERFACE); - - ejbMethodCategoryEClass = createEClass(EJB_METHOD_CATEGORY); - - ejbJarEClass = createEClass(EJB_JAR); - createEAttribute(ejbJarEClass, EJB_JAR__EJB_CLIENT_JAR); - createEAttribute(ejbJarEClass, EJB_JAR__VERSION); - createEReference(ejbJarEClass, EJB_JAR__ASSEMBLY_DESCRIPTOR); - createEReference(ejbJarEClass, EJB_JAR__ENTERPRISE_BEANS); - createEReference(ejbJarEClass, EJB_JAR__RELATIONSHIP_LIST); - - methodElementEClass = createEClass(METHOD_ELEMENT); - createEAttribute(methodElementEClass, METHOD_ELEMENT__NAME); - createEAttribute(methodElementEClass, METHOD_ELEMENT__PARMS); - createEAttribute(methodElementEClass, METHOD_ELEMENT__TYPE); - createEAttribute(methodElementEClass, METHOD_ELEMENT__DESCRIPTION); - createEReference(methodElementEClass, METHOD_ELEMENT__ENTERPRISE_BEAN); - createEReference(methodElementEClass, METHOD_ELEMENT__DESCRIPTIONS); - - cmpAttributeEClass = createEClass(CMP_ATTRIBUTE); - createEAttribute(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTION); - createEReference(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTIONS); - - relationshipsEClass = createEClass(RELATIONSHIPS); - createEAttribute(relationshipsEClass, RELATIONSHIPS__DESCRIPTION); - createEReference(relationshipsEClass, RELATIONSHIPS__EJB_JAR); - createEReference(relationshipsEClass, RELATIONSHIPS__EJB_RELATIONS); - createEReference(relationshipsEClass, RELATIONSHIPS__DESCRIPTIONS); - - queryEClass = createEClass(QUERY); - createEAttribute(queryEClass, QUERY__DESCRIPTION); - createEAttribute(queryEClass, QUERY__EJB_QL); - createEAttribute(queryEClass, QUERY__RETURN_TYPE_MAPPING); - createEReference(queryEClass, QUERY__QUERY_METHOD); - createEReference(queryEClass, QUERY__ENTITY); - createEReference(queryEClass, QUERY__DESCRIPTIONS); - - ejbRelationEClass = createEClass(EJB_RELATION); - createEAttribute(ejbRelationEClass, EJB_RELATION__DESCRIPTION); - createEAttribute(ejbRelationEClass, EJB_RELATION__NAME); - createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_LIST); - createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_ROLES); - createEReference(ejbRelationEClass, EJB_RELATION__DESCRIPTIONS); - - ejbRelationshipRoleEClass = createEClass(EJB_RELATIONSHIP_ROLE); - createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTION); - createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__ROLE_NAME); - createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__MULTIPLICITY); - createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CASCADE_DELETE); - createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__RELATIONSHIP); - createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__SOURCE); - createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CMR_FIELD); - createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTIONS); - - roleSourceEClass = createEClass(ROLE_SOURCE); - createEAttribute(roleSourceEClass, ROLE_SOURCE__DESCRIPTION); - createEReference(roleSourceEClass, ROLE_SOURCE__ROLE); - createEReference(roleSourceEClass, ROLE_SOURCE__ENTITY_BEAN); - createEReference(roleSourceEClass, ROLE_SOURCE__DESCRIPTIONS); - - cmrFieldEClass = createEClass(CMR_FIELD); - createEReference(cmrFieldEClass, CMR_FIELD__ROLE); - createEReference(cmrFieldEClass, CMR_FIELD__COLLECTION_TYPE); - - messageDrivenEClass = createEClass(MESSAGE_DRIVEN); - createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__TRANSACTION_TYPE); - createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_SELECTOR); - createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__ACKNOWLEDGE_MODE); - createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__LINK); - createEReference(messageDrivenEClass, MESSAGE_DRIVEN__DESTINATION); - createEReference(messageDrivenEClass, MESSAGE_DRIVEN__ACTIVATION_CONFIG); - createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_DESTINATION); - createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGING_TYPE); - - messageDrivenDestinationEClass = createEClass(MESSAGE_DRIVEN_DESTINATION); - createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__TYPE); - createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY); - createEReference(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__BEAN); - - excludeListEClass = createEClass(EXCLUDE_LIST); - createEAttribute(excludeListEClass, EXCLUDE_LIST__DESCRIPTION); - createEReference(excludeListEClass, EXCLUDE_LIST__METHOD_ELEMENTS); - createEReference(excludeListEClass, EXCLUDE_LIST__DESCRIPTIONS); - - queryMethodEClass = createEClass(QUERY_METHOD); - createEReference(queryMethodEClass, QUERY_METHOD__QUERY); - - activationConfigPropertyEClass = createEClass(ACTIVATION_CONFIG_PROPERTY); - createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__VALUE); - createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__NAME); - - activationConfigEClass = createEClass(ACTIVATION_CONFIG); - createEReference(activationConfigEClass, ACTIVATION_CONFIG__CONFIG_PROPERTIES); - createEReference(activationConfigEClass, ACTIVATION_CONFIG__DESCRIPTIONS); - - // Create enums - transactionAttributeTypeEEnum = createEEnum(TRANSACTION_ATTRIBUTE_TYPE); - transactionTypeEEnum = createEEnum(TRANSACTION_TYPE); - sessionTypeEEnum = createEEnum(SESSION_TYPE); - methodElementKindEEnum = createEEnum(METHOD_ELEMENT_KIND); - acknowledgeModeEEnum = createEEnum(ACKNOWLEDGE_MODE); - subscriptionDurabilityKindEEnum = createEEnum(SUBSCRIPTION_DURABILITY_KIND); - returnTypeMappingEEnum = createEEnum(RETURN_TYPE_MAPPING); - destinationTypeEEnum = createEEnum(DESTINATION_TYPE); - multiplicityKindEEnum = createEEnum(MULTIPLICITY_KIND); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - EcorePackageImpl theEcorePackage = (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - - // Add supertypes to classes - containerManagedEntityEClass.getESuperTypes().add(this.getEntity()); - sessionEClass.getESuperTypes().add(this.getEnterpriseBean()); - entityEClass.getESuperTypes().add(this.getEnterpriseBean()); - enterpriseBeanEClass.getESuperTypes().add(theCommonPackage.getJNDIEnvRefsGroup()); - ejbJarEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - cmpAttributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute()); - cmrFieldEClass.getESuperTypes().add(this.getCMPAttribute()); - messageDrivenEClass.getESuperTypes().add(this.getEnterpriseBean()); - queryMethodEClass.getESuperTypes().add(this.getMethodElement()); - - // Initialize classes and features; add operations and parameters - initEClass(containerManagedEntityEClass, ContainerManagedEntity.class, "ContainerManagedEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getContainerManagedEntity_Version(), ecorePackage.getEString(), "version", "2.x", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getContainerManagedEntity_AbstractSchemaName(), ecorePackage.getEString(), "abstractSchemaName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getContainerManagedEntity_PersistentAttributes(), this.getCMPAttribute(), null, "persistentAttributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getContainerManagedEntity_KeyAttributes(), this.getCMPAttribute(), null, "keyAttributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getContainerManagedEntity_Queries(), this.getQuery(), this.getQuery_Entity(), "queries", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getContainerManagedEntity_CMPAttribute(), this.getCMPAttribute(), null, "CMPAttribute", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getContainerManagedEntity_PrimKeyField(), this.getCMPAttribute(), null, "primKeyField", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(methodPermissionEClass, MethodPermission.class, "MethodPermission", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMethodPermission_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMethodPermission_Unchecked(), ecorePackage.getEBoolean(), "unchecked", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodPermission_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodPermissions(), "assemblyDescriptor", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodPermission_Roles(), theCommonPackage.getSecurityRole(), null, "roles", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodPermission_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodPermission_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(assemblyDescriptorEClass, AssemblyDescriptor.class, "AssemblyDescriptor", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_MethodPermissions(), this.getMethodPermission(), this.getMethodPermission_AssemblyDescriptor(), "methodPermissions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_MethodTransactions(), this.getMethodTransaction(), this.getMethodTransaction_AssemblyDescriptor(), "methodTransactions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_EjbJar(), this.getEJBJar(), this.getEJBJar_AssemblyDescriptor(), "ejbJar", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_ExcludeList(), this.getExcludeList(), null, "excludeList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getAssemblyDescriptor_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(methodTransactionEClass, MethodTransaction.class, "MethodTransaction", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMethodTransaction_TransactionAttribute(), this.getTransactionAttributeType(), "transactionAttribute", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMethodTransaction_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodTransaction_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodTransactions(), "assemblyDescriptor", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodTransaction_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodTransaction_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(sessionEClass, Session.class, "Session", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getSession_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getSession_SessionType(), this.getSessionType(), "sessionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getSession_ServiceEndpoint(), theJavaRefPackage.getJavaClass(), null, "serviceEndpoint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEntity_Reentrant(), ecorePackage.getEBoolean(), "reentrant", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEntity_PrimaryKey(), theJavaRefPackage.getJavaClass(), null, "primaryKey", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(enterpriseBeanEClass, EnterpriseBean.class, "EnterpriseBean", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEnterpriseBean_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_SecurityRoleRefs(), theCommonPackage.getSecurityRoleRef(), null, "securityRoleRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_EjbClass(), theJavaRefPackage.getJavaClass(), null, "ejbClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_HomeInterface(), theJavaRefPackage.getJavaClass(), null, "homeInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_RemoteInterface(), theJavaRefPackage.getJavaClass(), null, "remoteInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_EjbJar(), this.getEJBJar(), this.getEJBJar_EnterpriseBeans(), "ejbJar", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_SecurityIdentity(), theCommonPackage.getSecurityIdentity(), null, "securityIdentity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_LocalHomeInterface(), theJavaRefPackage.getJavaClass(), null, "localHomeInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEnterpriseBean_LocalInterface(), theJavaRefPackage.getJavaClass(), null, "localInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(ejbMethodCategoryEClass, EJBMethodCategory.class, "EJBMethodCategory", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(ejbJarEClass, EJBJar.class, "EJBJar", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEJBJar_EjbClientJar(), ecorePackage.getEString(), "ejbClientJar", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBJar_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBJar_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_EjbJar(), "assemblyDescriptor", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBJar_EnterpriseBeans(), this.getEnterpriseBean(), this.getEnterpriseBean_EjbJar(), "enterpriseBeans", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBJar_RelationshipList(), this.getRelationships(), this.getRelationships_EjbJar(), "relationshipList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(methodElementEClass, MethodElement.class, "MethodElement", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMethodElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMethodElement_Parms(), ecorePackage.getEString(), "parms", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMethodElement_Type(), this.getMethodElementKind(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMethodElement_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodElement_EnterpriseBean(), this.getEnterpriseBean(), null, "enterpriseBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMethodElement_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(cmpAttributeEClass, CMPAttribute.class, "CMPAttribute", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getCMPAttribute_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getCMPAttribute_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(relationshipsEClass, Relationships.class, "Relationships", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getRelationships_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRelationships_EjbJar(), this.getEJBJar(), this.getEJBJar_RelationshipList(), "ejbJar", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRelationships_EjbRelations(), this.getEJBRelation(), this.getEJBRelation_RelationshipList(), "ejbRelations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRelationships_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(queryEClass, Query.class, "Query", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getQuery_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getQuery_EjbQL(), ecorePackage.getEString(), "ejbQL", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getQuery_ReturnTypeMapping(), this.getReturnTypeMapping(), "returnTypeMapping", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getQuery_QueryMethod(), this.getQueryMethod(), this.getQueryMethod_Query(), "queryMethod", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getQuery_Entity(), this.getContainerManagedEntity(), this.getContainerManagedEntity_Queries(), "entity", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getQuery_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(ejbRelationEClass, EJBRelation.class, "EJBRelation", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEJBRelation_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBRelation_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelation_RelationshipList(), this.getRelationships(), this.getRelationships_EjbRelations(), "relationshipList", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelation_RelationshipRoles(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Relationship(), "relationshipRoles", null, 2, 2, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelation_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(ejbRelationshipRoleEClass, EJBRelationshipRole.class, "EJBRelationshipRole", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getEJBRelationshipRole_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBRelationshipRole_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBRelationshipRole_Multiplicity(), this.getMultiplicityKind(), "multiplicity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getEJBRelationshipRole_CascadeDelete(), ecorePackage.getEBoolean(), "cascadeDelete", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelationshipRole_Relationship(), this.getEJBRelation(), this.getEJBRelation_RelationshipRoles(), "relationship", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelationshipRole_Source(), this.getRoleSource(), this.getRoleSource_Role(), "source", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelationshipRole_CmrField(), this.getCMRField(), this.getCMRField_Role(), "cmrField", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getEJBRelationshipRole_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(roleSourceEClass, RoleSource.class, "RoleSource", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getRoleSource_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRoleSource_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Source(), "role", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRoleSource_EntityBean(), this.getContainerManagedEntity(), null, "entityBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getRoleSource_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(cmrFieldEClass, CMRField.class, "CMRField", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getCMRField_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_CmrField(), "role", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getCMRField_CollectionType(), theJavaRefPackage.getJavaClass(), null, "collectionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(messageDrivenEClass, MessageDriven.class, "MessageDriven", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMessageDriven_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDriven_MessageSelector(), ecorePackage.getEString(), "messageSelector", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDriven_AcknowledgeMode(), this.getAcknowledgeMode(), "acknowledgeMode", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDriven_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDriven_Destination(), this.getMessageDrivenDestination(), this.getMessageDrivenDestination_Bean(), "destination", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDriven_ActivationConfig(), this.getActivationConfig(), null, "activationConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDriven_MessageDestination(), theJavaRefPackage.getJavaClass(), null, "messageDestination", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDriven_MessagingType(), theJavaRefPackage.getJavaClass(), null, "messagingType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(messageDrivenDestinationEClass, MessageDrivenDestination.class, "MessageDrivenDestination", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getMessageDrivenDestination_Type(), this.getDestinationType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getMessageDrivenDestination_SubscriptionDurability(), this.getSubscriptionDurabilityKind(), "subscriptionDurability", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getMessageDrivenDestination_Bean(), this.getMessageDriven(), this.getMessageDriven_Destination(), "bean", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(excludeListEClass, ExcludeList.class, "ExcludeList", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getExcludeList_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getExcludeList_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getExcludeList_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(queryMethodEClass, QueryMethod.class, "QueryMethod", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getQueryMethod_Query(), this.getQuery(), this.getQuery_QueryMethod(), "query", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(activationConfigPropertyEClass, ActivationConfigProperty.class, "ActivationConfigProperty", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getActivationConfigProperty_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getActivationConfigProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - initEClass(activationConfigEClass, ActivationConfig.class, "ActivationConfig", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getActivationConfig_ConfigProperties(), this.getActivationConfigProperty(), null, "configProperties", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getActivationConfig_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(transactionAttributeTypeEEnum, TransactionAttributeType.class, "TransactionAttributeType"); //$NON-NLS-1$ - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NOT_SUPPORTED_LITERAL); - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.SUPPORTS_LITERAL); - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRED_LITERAL); - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRES_NEW_LITERAL); - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.MANDATORY_LITERAL); - addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NEVER_LITERAL); - - initEEnum(transactionTypeEEnum, TransactionType.class, "TransactionType"); //$NON-NLS-1$ - addEEnumLiteral(transactionTypeEEnum, TransactionType.BEAN_LITERAL); - addEEnumLiteral(transactionTypeEEnum, TransactionType.CONTAINER_LITERAL); - - initEEnum(sessionTypeEEnum, SessionType.class, "SessionType"); //$NON-NLS-1$ - addEEnumLiteral(sessionTypeEEnum, SessionType.STATEFUL_LITERAL); - addEEnumLiteral(sessionTypeEEnum, SessionType.STATELESS_LITERAL); - - initEEnum(methodElementKindEEnum, MethodElementKind.class, "MethodElementKind"); //$NON-NLS-1$ - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.UNSPECIFIED_LITERAL); - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.REMOTE_LITERAL); - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.HOME_LITERAL); - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_LITERAL); - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_HOME_LITERAL); - addEEnumLiteral(methodElementKindEEnum, MethodElementKind.SERVICE_ENDPOINT_LITERAL); - - initEEnum(acknowledgeModeEEnum, AcknowledgeMode.class, "AcknowledgeMode"); //$NON-NLS-1$ - addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL); - addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.DUPS_OK_ACKNOWLEDGE_LITERAL); - - initEEnum(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.class, "SubscriptionDurabilityKind"); //$NON-NLS-1$ - addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.DURABLE_LITERAL); - addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.NON_DURABLE_LITERAL); - - initEEnum(returnTypeMappingEEnum, ReturnTypeMapping.class, "ReturnTypeMapping"); //$NON-NLS-1$ - addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.LOCAL_LITERAL); - addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.REMOTE_LITERAL); - - initEEnum(destinationTypeEEnum, DestinationType.class, "DestinationType"); //$NON-NLS-1$ - addEEnumLiteral(destinationTypeEEnum, DestinationType.QUEUE_LITERAL); - addEEnumLiteral(destinationTypeEEnum, DestinationType.TOPIC_LITERAL); - - initEEnum(multiplicityKindEEnum, MultiplicityKind.class, "MultiplicityKind"); //$NON-NLS-1$ - addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_LITERAL); - addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_LITERAL); - - // Create resource - createResource(eNS_URI); - } -} //EjbPackageImpl - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EnterpriseBeanImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EnterpriseBeanImpl.java deleted file mode 100644 index d493408d3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EnterpriseBeanImpl.java +++ /dev/null @@ -1,1447 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.Enumerator; -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaParameter; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.common.EJBLocalRef; -import org.eclipse.jst.j2ee.common.EjbRef; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.impl.JNDIEnvRefsGroupImpl; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EjbFactory; -import org.eclipse.jst.j2ee.ejb.EjbMethodElementComparator; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.wst.common.internal.emf.utilities.Revisit; - -/** - * @generated - * EnterpriseJavaBean is a class. It can have instances, someone could write an instance document containing Departments and Employees. It also has attributes, operations, and associations. These are actually derived//filtered from its implementation classes and interfaces. For mapping and browsing purposes, though, you would like the EJB to appear as a class. - * - * In this light, even Session Beans can have associations and properties implemented by their bean. For example, it would be meaningful to describe associations from a Session to the Entities which it uses to perform its work. - */ -public abstract class EnterpriseBeanImpl extends JNDIEnvRefsGroupImpl implements EnterpriseBean { - - protected final static Method[] EMPTY_METHOD_ARRAY = new Method[0]; - protected static final String METHOD_ELEMENT_NAME = "MethodElement"; //$NON-NLS-1$ - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityRoleRefs = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass ejbClass = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass homeInterface = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass remoteInterface = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected SecurityIdentity securityIdentity = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass localHomeInterface = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass localInterface = null; - protected EjbMethodElementComparator defaultMethodElementComparator; - public EnterpriseBeanImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEnterpriseBean(); - } - - /** - * createClassRef - return a JavaURL reference to the named Java class - */ - public JavaClass createClassRef(String targetName) { - return getJavaRefFactory().createClassRef(targetName); - } - - protected List createMethodElements(List signatures, Enumerator aType) { - return createMethodElements(METHOD_ELEMENT_NAME, signatures, aType); - } - - protected List createMethodElements(String meTypeName, List signatures, Enumerator aType) { - int size = signatures.size(); - List methodElements = new ArrayList(size); - String signature; - MethodElement me; - for (int i = 0; i < size; i++) { - signature = (String) signatures.get(i); - me = (MethodElement) getEjbFactory().create((EClass)getEjbPackage().getEClassifier(meTypeName)); - me.initializeFromSignature(signature); - me.setEnterpriseBean(this); - me.setType((MethodElementKind)aType); - methodElements.add(me); - } - return methodElements; - } - - public List createMethodElements(List someMethods, JavaClass anInterface) { - return createMethodElements(METHOD_ELEMENT_NAME, someMethods, anInterface); - } - - public List createMethodElements(String meTypeName, List someMethods, JavaClass anInterface) { - if (anInterface == null) - return Collections.EMPTY_LIST; - List signatures = getMethodElementSignatures(someMethods); - Collections.sort(signatures); - Enumerator enumerator = getMethodElementKindLiteral(anInterface); - return createMethodElements(meTypeName, signatures, enumerator); - } - - protected Enumerator getMethodElementKindLiteral(JavaClass anInterface) { - Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL; - if (anInterface == getHomeInterface()) - enumerator = MethodElementKind.HOME_LITERAL; - else if (anInterface == getRemoteInterface()) - enumerator = MethodElementKind.REMOTE_LITERAL; - else if (anInterface == getLocalHomeInterface()) - enumerator = MethodElementKind.LOCAL_HOME_LITERAL; - else if (anInterface == getLocalInterface()) - enumerator = MethodElementKind.LOCAL_LITERAL; - return enumerator; - } - - protected List getMethodElementSignatures(List someMethods) { - int size = someMethods.size(); - List signatures = new ArrayList(size); - Method method; - for (int i = 0; i < size; i++) { - method = (Method) someMethods.get(i); - signatures.add(method.getMethodElementSignature()); - } - return signatures; - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - * @deprecated use getAvailableUnspecifiedMethodElements(); - */ - public List getAvailableCommonMethodElements() { - return getAvailableUnspecifiedMethodElements(); - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - */ - public List getAvailableUnspecifiedMethodElements() { - List commonSigs = getAvailableUnspecifiedMethodElementSignatures(); - return createMethodElements(commonSigs, MethodElementKind.UNSPECIFIED_LITERAL); - } - protected List gatherCommonSignatures(List sigCollections) { - if (sigCollections.isEmpty()) return sigCollections; - List first = (List)sigCollections.get(0); - if (sigCollections.size() == 1) return first; - List result = new ArrayList(first.size()); - sigCollections.remove(0); - String sig = null; - boolean contains = false; - for (int i = 0; i < first.size(); i++) { - contains = false; - sig = (String) first.get(i); - List list = null; - for (int j = 0; j < sigCollections.size(); j++) { - list = (List) sigCollections.get(j); - if (list.contains(sig)) - contains = true; - } - if (contains) - result.add(sig); - } - return result; - } - /** - * Return a List of MethodElements that are set for a particular EObject - * which can be a MethodTransaction or a MethodPermission. - */ - protected List getExistingMethodElements(EObject refObject) { - if (refObject != null) { - EjbPackage pack = getEjbPackage(); - if (refObject.eClass() == pack.getMethodTransaction()) - return ((MethodTransaction)refObject).getMethodElements(this); - if (refObject.eClass() == pack.getMethodPermission()) - return ((MethodPermission)refObject).getMethodElements(this); - } - return Collections.EMPTY_LIST; - } - /** - * This method will return a List of MethodElements signatures - * that represent all the possible MethodElements that can be created - * and are common to both the Home and Remote interfaces. - * @deprecated use getAvailableUnspecifiedMethodElementSignatures(); - */ - public List getAvailableCommonMethodElementSignatures() { - return getAvailableUnspecifiedMethodElementSignatures(); - } - /** - * This method will return a List of MethodElements signatures - * that represent all the possible MethodElements that can be created - * and are common to both the Home and Remote interfaces. - */ - public List getAvailableUnspecifiedMethodElementSignatures() { - List sigCollections = new ArrayList(); - if (getHomeInterface() != null) - sigCollections.add(getHomeInterface().getMethodElementSignatures()); - if (getRemoteInterface() != null) - sigCollections.add(getRemoteInterface().getMethodElementSignatures()); - if (getLocalHomeInterface() != null) - sigCollections.add(getLocalHomeInterface().getMethodElementSignatures()); - if (getLocalInterface() != null) - sigCollections.add(getLocalInterface().getMethodElementSignatures()); - return gatherCommonSignatures(sigCollections); - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * for the Home interface. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - */ - public List getAvailableHomeMethodElements() { - return getAvailableMethodElements(getHomeInterface(), MethodElementKind.HOME_LITERAL); - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * for the Local Home interface. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - */ - public List getAvailableLocalHomeMethodElements() { - return getAvailableMethodElements(getLocalHomeInterface(), MethodElementKind.LOCAL_HOME_LITERAL); - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * for the Local interface. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - */ - public List getAvailableLocalMethodElements() { - return getAvailableMethodElements(getLocalInterface(), MethodElementKind.LOCAL_LITERAL); - } - - public List getAvailableServiceEndpointMethodElements(){ - return getAvailableMethodElements(getServiceEndpoint(), MethodElementKind.SERVICE_ENDPOINT_LITERAL); - } - - protected List getAvailableMethodElements(JavaClass anInterface, Enumerator aType) { - if (anInterface == null) - return Collections.EMPTY_LIST; - List signatures = anInterface.getMethodElementSignatures(); - return createMethodElements(signatures, aType); - } - /** - * This method will return a List of newly created MethodElements - * that represent all the possible MethodElements that can be created - * for the Remote interface. These MethodElements are not contained and will - * not be serialized and should not be added to the model. Their intention is - * solely for comparing with actual MethodElements contained in the model. - */ - public List getAvailableRemoteMethodElements() { - return getAvailableMethodElements(getRemoteInterface(), MethodElementKind.REMOTE_LITERAL); - } - - /* - * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject, Comparator); - */ - public List getExistingOrAvailableMethodElements(EObject refObject, Comparator comparator) { - List result = new ArrayList(); - result.addAll(getAvailableHomeMethodElements()); - result.addAll(getAvailableRemoteMethodElements()); - result.addAll(getAvailableLocalHomeMethodElements()); - result.addAll(getAvailableLocalMethodElements()); - result.addAll(getAvailableServiceEndpointMethodElements()); - result.addAll(getAvailableUnspecifiedMethodElements()); - unionMethodElements(result, getExistingMethodElements(refObject)); - Collections.sort(result, comparator); - return result; - } - /* - * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject); - */ - public List getExistingOrAvailableMethodElements(EObject refObject) { - return getExistingOrAvailableMethodElements(refObject, getDefaultMethodElementComparator()); - } - - protected EjbMethodElementComparator getDefaultMethodElementComparator() { - if (defaultMethodElementComparator == null) - defaultMethodElementComparator = new EjbMethodElementComparator(); - return defaultMethodElementComparator; - } - protected void unionMethodElements(List sourceMethodElements, List additionalMethodElements) { - MethodElement sourceME, additionalME; - int sourceSize, addSize; - sourceSize = sourceMethodElements.size(); - addSize = additionalMethodElements.size(); - List foundElements = new ArrayList(addSize); - boolean found = false; - for (int i = 0; i < addSize; i++){ - found = false; - additionalME = (MethodElement) additionalMethodElements.get(i); - sourceME = null; - for (int ii = 0; ii < sourceSize; ii++){ - sourceME = (MethodElement) sourceMethodElements.get(ii); - if (sourceME.isEquivalent(additionalME)) { - found = true; - break; - } - } - if (found) - foundElements.add(sourceME); - } - sourceMethodElements.removeAll(foundElements); - sourceMethodElements.addAll(additionalMethodElements); - } - public String getEjbClassName() { - getEjbClass(); - return (ejbClass == null) ? null : ejbClass.getQualifiedName(); - } - protected EjbPackage getEjbPackage() { - return EjbFactoryImpl.getPackage(); - } - protected EjbFactory getEjbFactory() { - return ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory(); - } - public EjbRef getEquivalentEjbRef(EjbRef anEjbRef) { - return getEquivalentEjbRef(anEjbRef, getEjbRefs()); - } - public EJBLocalRef getEquivalentEJBLocalRef(EJBLocalRef anEjbLocalRef) { - return (EJBLocalRef) getEquivalentEjbRef(anEjbLocalRef, getEjbLocalRefs()); - } - private EjbRef getEquivalentEjbRef(EjbRef anEjbRef, List someRefs) { - if (anEjbRef == null) - return null; - int size = someRefs.size(); - EjbRef ref; - for (int i = 0; i < size; i++) { - ref = (EjbRef) someRefs.get(i); - if (ref.isEquivalent(anEjbRef)) - return ref; - } - return null; - } - public String getHomeInterfaceName() { - getHomeInterface(); - return homeInterface == null ? null : homeInterface.getQualifiedName(); - } - /** - * See getMethods for comment - */ - public Method[] getHomeMethodsForDeployment() { - return (getHomeInterface() != null ? getMethods(getHomeInterface()) : EMPTY_METHOD_ARRAY); - } - private JavaRefFactory getJavaRefFactory() { - return ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory(); - } - public EjbRef getLinkedEJBReference(EnterpriseBean anEJB) { - return getLinkedEJBReference(anEJB, getEjbRefs()); - } - public EJBLocalRef getLinkedEJBLocalReference(EnterpriseBean anEJB) { - return (EJBLocalRef) getLinkedEJBReference(anEJB, getEjbLocalRefs()); - } - private EjbRef getLinkedEJBReference(EnterpriseBean anEJB, List someRefs) { - if (anEJB == null) - return null; - int size = someRefs.size(); - EjbRef ref; - for (int i = 0; i < size; i++) { - ref = (EjbRef) someRefs.get(i); - if (ref.isLinked(anEJB)) - return ref; - } - return null; - } - public String getLocalHomeInterfaceName() { - getLocalHomeInterface(); - return localHomeInterface == null ? null : localHomeInterface.getQualifiedName(); - } - /** - * See getMethods for comment - */ - public Method[] getLocalHomeMethodsForDeployment() { - return (getLocalHomeInterface() != null ? getMethods(getLocalHomeInterface()) : EMPTY_METHOD_ARRAY); - } - public String getLocalInterfaceName() { - getLocalInterface(); - return localInterface == null ? null : localInterface.getQualifiedName(); - } - /** - * Retrieve an ordered list of methods for the given JavaClass. - * The list should include all non-static, public methods that are - * not inherited from javax.ejb.EJBObject - * This uses the algorithm that web sphere currently uses, and could - * be subject to change - * Creation date: (8/21/00 1:41:03 PM) - * @param intf JavaClass - */ - public static Method[] getMethods(JavaClass intf) { - Method[] allMethods = intf.listMethodExtended(); - java.util.Vector resultVector = new java.util.Vector(allMethods.length); - java.util.Hashtable methodNameTable = new java.util.Hashtable(); - - //---------------------------------------------------------------- - // Iterate over the list returned by "listMethodExtended" and - // filter out methods belonging to the EJBObject interface - // and method synonyms. - // - // Method synonyms correspond to overrides. For all synonyms - // keep the method instance declared on the most specific class. - // How do you determine the most specific class? Don't know. - // For now, if the method is declared on the interface class - // it always overrides others. - //---------------------------------------------------------------- - - Method[] result = null; - - for (int i = 0; i < allMethods.length; i++) { - Method m = allMethods[i]; - - //--------------------------- - // Filter out static methods - //--------------------------- - - if (m.isStatic()) { - continue; - } - - String mKey = methodKey(m); - - String interfaceName = m.getContainingJavaClass().getJavaName(); - if (!interfaceName.equals("javax.ejb.EJBObject")) { //$NON-NLS-1$ - Method synonym = (Method) methodNameTable.get(mKey); - if (synonym == null) { - methodNameTable.put(mKey, m); - resultVector.addElement(m); - } else { - //--------------------------------------------- - // Method declared on most specific class wins - //--------------------------------------------- - JavaClass mClass = m.getContainingJavaClass(); - JavaClass sClass = synonym.getContainingJavaClass(); - if (sClass.implementsInterface(mClass)) { - resultVector.removeElement(synonym); - methodNameTable.put(mKey, m); - resultVector.addElement(m); - } - } - } - } - - result = new Method[resultVector.size()]; - resultVector.copyInto(result); - return sortMethods(result); - } - public String getRemoteInterfaceName() { - getRemoteInterface(); - return remoteInterface == null ? null : remoteInterface.getQualifiedName(); - } - /** - * See getMethods for comment - */ - public Method[] getRemoteMethodsForDeployment() { - return getMethods(getRemoteInterface()); - } - /** - * Return true if @aJavaClass as equal to the - * home, remote, bean class, or key class. - */ - public boolean hasJavaReference(JavaClass aJavaClass) { - if (aJavaClass != null) { - return aJavaClass.equals(getEjbClass())|| - aJavaClass.equals(getRemoteInterface()) || - aJavaClass.equals(getHomeInterface()) || - aJavaClass.equals(getLocalInterface()) || - aJavaClass.equals(getLocalHomeInterface()); - } - return false; - } - /** - * Return true if this ejb has BeanManagedPersistance. - */ - public boolean isBeanManagedEntity() { - return isEntity() && !isContainerManagedEntity(); - } - /** - * isContainerManagedEntity method comment. - */ - public boolean isContainerManagedEntity() { - return false; - } - //Return false by default - public boolean isEntity() { - return false; - } - //Return false by default - public boolean isMessageDriven() { - return false; - } - //Return false by default - public boolean isSession() { - return false; - } - /** - * @deprecated - Use getEjbJar().getVersionID() - * isVersion1_X method comment. - */ - public boolean isVersion1_X() { - if (getEjbJar() != null) - return getEjbJar().getVersionID() <= J2EEVersionConstants.EJB_1_1_ID; - Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined - return false; - } - /** - * @deprecated - Use getEjbJar().getVersionID() - * isVersion2_X method comment. - */ - public boolean isVersion2_X() { - if (getEjbJar() != null) { - return getEjbJar().getVersionID() >= J2EEVersionConstants.EJB_1_1_ID; - } - Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined - return false; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID() - */ - public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getModuleVersionID(); - } - - - /* - * @see EnterpriseBean#hasLocalClient() - */ - public boolean hasLocalClient() { - return getLocalInterface() != null && getLocalHomeInterface() != null; - } - - /* - * @see EnterpriseBean#hasRemoteClient() - */ - public boolean hasRemoteClient() { - return getRemoteInterface() != null && getHomeInterface() != null; - } - - /** - * Get method name string of form: - * methodName(class name of arg1,class name of arg2,...) - * Creation date: (8/24/00 1:21:10 PM) - * @return String - * @param m Method - */ - private static String methodKey(Method m) { - StringBuffer result = new StringBuffer(m.getName()); - - result.append("("); //$NON-NLS-1$ - - java.util.List args = m.getParameters(); - JavaParameter arg; - for (int i = 0; i < args.size(); i++) { - arg = (JavaParameter) args.get(i); - result.append(((JavaHelpers) arg.getEType()).getJavaName()); - result.append(","); //$NON-NLS-1$ - } - result.append(")"); //$NON-NLS-1$ - return result.toString(); - } - public Object primRefValue(EObject feature) { - switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) { - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION : - return getDescription(); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME : - return getDisplayName(); - case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON : - return getSmallIcon(); - case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON : - return getLargeIcon(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS : - return getResourceRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS : - return getEjbClass(); - case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE : - return getHomeInterface(); - case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE : - return getRemoteInterface(); - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES : - return getEnvironmentProperties(); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS : - return getSecurityRoleRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS : - return getEjbRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS : - return getEjbLocalRefs(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS : - return getResourceEnvRefs(); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY : - return getSecurityIdentity(); - case EjbPackage.ENTERPRISE_BEAN__NAME : - return getName(); - } - return null; - } - /** - * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean - */ - public void reSyncSecurityRoleRef(java.lang.String existingRoleName, java.lang.String newRoleName) { - List roleRefs = getSecurityRoleRefs(); - for (int i = 0; i < roleRefs.size(); i++) { - SecurityRoleRef roleRef = (SecurityRoleRef) roleRefs.get(i); - if (roleRef.getLink() != null && roleRef.getLink().equals(existingRoleName)) - roleRef.setLink(newRoleName); - } - } - public void setEjbClassName(String ejbClassName) { - eSet(EjbPackage.eINSTANCE.getEnterpriseBean_EjbClass(), createClassRef(ejbClassName)); - } - public void setHomeInterfaceName(String homeInterfaceName) { - eSet(EjbPackage.eINSTANCE.getEnterpriseBean_HomeInterface(), createClassRef(homeInterfaceName)); - } - public void setLocalHomeInterfaceName(String localHomeInterfaceName) { - eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalHomeInterface(), createClassRef(localHomeInterfaceName)); - } - public void setLocalInterfaceName(String localInterfaceName) { - eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalInterface(), createClassRef(localInterfaceName)); - } - public void setRemoteInterfaceName(String remoteInterfaceName) { - eSet(EjbPackage.eINSTANCE.getEnterpriseBean_RemoteInterface(), createClassRef(remoteInterfaceName)); - } - /** - * Insert the method's description here. - * Creation date: (8/24/00 1:32:13 PM) - * @return Method[] - * @param methods Method[] - */ - private static Method[] sortMethods(Method[] methods) { - Method result[] = new Method[methods.length]; - - /** - * Insert each element of given list of methods into result - * arary in sorted order - */ - - for (int i = 0; i < methods.length; i++) { - Method currMethod = methods[i]; - String currMethodName = currMethod.getSignature(); - int insertIndex = 0; - while (insertIndex < i) { - if (currMethodName.compareTo(result[insertIndex].getSignature()) <= 0) { - break; - } - insertIndex++; - } - - for (int j = insertIndex; j <= i; j++) { - Method tmpMethod = result[j]; - result[j] = currMethod; - currMethod = tmpMethod; - } - } - return result; - } - public String toString() { - return getClass().getName() + "(" + getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ - } - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getSecurityRoleRefs() { - if (securityRoleRefs == null) { - securityRoleRefs = new EObjectContainmentEList(SecurityRoleRef.class, this, EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS); - } - return securityRoleRefs; - } - - /** - * Handwritten version of getEjbClass(): - */ - - - public JavaClass getEjbClass() { - if (ejbClass != null && ejbClass.eIsProxy()) { - JavaClass oldEjbClass = ejbClass; - JavaClass resolved = (JavaClass)EcoreUtil.resolve(ejbClass, this); - resolved(this.ejbClass, resolved); - this.ejbClass = resolved; - if (ejbClass != oldEjbClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); - } - } - return ejbClass; - } - - - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbClass(JavaClass newEjbClass) { - JavaClass oldEjbClass = ejbClass; - ejbClass = newEjbClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getHomeInterface() { - if (homeInterface != null && homeInterface.eIsProxy()) { - JavaClass oldHomeInterface = homeInterface; - homeInterface = (JavaClass)eResolveProxy((InternalEObject)homeInterface); - if (homeInterface != oldHomeInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface)); - } - } - return homeInterface; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetHomeInterface() { - return homeInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setHomeInterface(JavaClass newHomeInterface) { - JavaClass oldHomeInterface = homeInterface; - homeInterface = newHomeInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getRemoteInterface() { - if (remoteInterface != null && remoteInterface.eIsProxy()) { - JavaClass oldRemoteInterface = remoteInterface; - remoteInterface = (JavaClass)eResolveProxy((InternalEObject)remoteInterface); - if (remoteInterface != oldRemoteInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface)); - } - } - return remoteInterface; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetRemoteInterface() { - return remoteInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRemoteInterface(JavaClass newRemoteInterface) { - JavaClass oldRemoteInterface = remoteInterface; - remoteInterface = newRemoteInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EJBJar getEjbJar() { - if (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR) return null; - return (EJBJar)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbJar(EJBJar newEjbJar) { - if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR && newEjbJar != null)) { - if (EcoreUtil.isAncestor(this, newEjbJar)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newEjbJar != null) - msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, newEjbJar, newEjbJar)); - } - - /** - * @generated This field/method will be replaced during code generation - * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It - * contains an optional description and a specification of the security identity to be used. - */ - public SecurityIdentity getSecurityIdentity() { - return securityIdentity; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSecurityIdentity(SecurityIdentity newSecurityIdentity, NotificationChain msgs) { - SecurityIdentity oldSecurityIdentity = securityIdentity; - securityIdentity = newSecurityIdentity; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, oldSecurityIdentity, newSecurityIdentity); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSecurityIdentity(SecurityIdentity newSecurityIdentity) { - if (newSecurityIdentity != securityIdentity) { - NotificationChain msgs = null; - if (securityIdentity != null) - msgs = ((InternalEObject)securityIdentity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs); - if (newSecurityIdentity != null) - msgs = ((InternalEObject)newSecurityIdentity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs); - msgs = basicSetSecurityIdentity(newSecurityIdentity, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, newSecurityIdentity, newSecurityIdentity)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getLocalHomeInterface() { - if (localHomeInterface != null && localHomeInterface.eIsProxy()) { - JavaClass oldLocalHomeInterface = localHomeInterface; - localHomeInterface = (JavaClass)eResolveProxy((InternalEObject)localHomeInterface); - if (localHomeInterface != oldLocalHomeInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface)); - } - } - return localHomeInterface; - } - - public JavaClass getServiceEndpoint() { - return null; - } - /** - * - * - * @generated - */ - public JavaClass basicGetLocalHomeInterface() { - return localHomeInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLocalHomeInterface(JavaClass newLocalHomeInterface) { - JavaClass oldLocalHomeInterface = localHomeInterface; - localHomeInterface = newLocalHomeInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getLocalInterface() { - if (localInterface != null && localInterface.eIsProxy()) { - JavaClass oldLocalInterface = localInterface; - localInterface = (JavaClass)eResolveProxy((InternalEObject)localInterface); - if (localInterface != oldLocalInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface)); - } - } - return localInterface; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetLocalInterface() { - return localInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLocalInterface(JavaClass newLocalInterface) { - JavaClass oldLocalInterface = localInterface; - localInterface = newLocalInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ENTERPRISE_BEAN__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: - return basicSetSecurityIdentity(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTERPRISE_BEAN__ICONS: - return getIcons(); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: - return getDescription(); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: - return getResourceRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: - return getEjbRefs(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: - return getServiceRefs(); - case EjbPackage.ENTERPRISE_BEAN__NAME: - return getName(); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: - if (resolve) return getEjbClass(); - return basicGetEjbClass(); - case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: - if (resolve) return getHomeInterface(); - return basicGetHomeInterface(); - case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: - if (resolve) return getRemoteInterface(); - return basicGetRemoteInterface(); - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - return getEjbJar(); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: - return getSecurityIdentity(); - case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: - if (resolve) return getLocalHomeInterface(); - return basicGetLocalHomeInterface(); - case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: - if (resolve) return getLocalInterface(); - return basicGetLocalInterface(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTERPRISE_BEAN__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: - return ejbClass != null; - case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: - return homeInterface != null; - case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: - return remoteInterface != null; - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: - return securityIdentity != null; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: - return localHomeInterface != null; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: - return localInterface != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTERPRISE_BEAN__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__NAME: - setName((String)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: - setEjbClass((JavaClass)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: - setHomeInterface((JavaClass)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)newValue); - return; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: - setLocalInterface((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTERPRISE_BEAN__ICONS: - getIcons().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: - getEjbRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: - getServiceRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: - setEjbClass((JavaClass)null); - return; - case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: - setHomeInterface((JavaClass)null); - return; - case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)null); - return; - case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)null); - return; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)null); - return; - case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: - setLocalInterface((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toStringGen() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - - /** - * Preserve adapters when object is resolved. - */ - protected void resolved(EObject originalObject, EObject resolvedObject) { - if (originalObject != null && resolvedObject != null && originalObject != resolvedObject) { - Collection col = originalObject.eAdapters(); - if (!col.isEmpty()) { - Iterator it = col.iterator(); - Adapter a; - while (it.hasNext()) { - a = (Adapter) it.next(); - if (a == null) continue; - resolvedObject.eAdapters().add(a); - } - } - } - } - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getEjbClassGen() { - if (ejbClass != null && ejbClass.eIsProxy()) { - JavaClass oldEjbClass = ejbClass; - ejbClass = (JavaClass)eResolveProxy((InternalEObject)ejbClass); - if (ejbClass != oldEjbClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); - } - } - return ejbClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetEjbClass() { - return ejbClass; - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EModelElement#getEAnnotation(java.lang.String) - */ - public EAnnotation getEAnnotation(String source) { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.emf.ecore.EModelElement#getEAnnotations() - */ - public EList getEAnnotations() { - // TODO Auto-generated method stub - return null; - } - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EntityImpl.java deleted file mode 100644 index f1ca1490b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/EntityImpl.java +++ /dev/null @@ -1,643 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; - - -/** - * The entity element declares an entity bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a unique name assigned to the enterprise bean in the deployment descriptor; the names of the entity bean's home and remote interfaces, if any; the names of the entity bean's local home and local interface, if any; the entity bean's implementation class; the entity bean's persistence management type; the entity bean's primary key class name; an indication of the entity bean's reentrancy; an optional specification of the entity bean's cmp-version; an optional specification of the entity bean's abstract schema name; an optional list of container-managed fields; an optional specification of the primary key field; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; an optional declaration of the bean's resource environment references; an optional set of query declarations for finder and select methods for an entity bean with cmp-version 2.x. - * The optional abstract-schema-name element must be specified for an entity bean with container managed persistence and cmp-version 2.x. The optional primkey-field may be present in the descriptor if the entity's persistence-type is Container. The optional cmp-version element may be present in the descriptor if the entity's persistence-type is Container. If the persistence-type is Container and the cmp-version element is not specified, its value defaults to 2.x. - * The optional home and remote elements must be specified if the entity bean cmp-version is 1.x. - * The optional local-home and local elements must be specified if the entity bean has a local home and local interface. - * The optional query elements must be present if the persistence-type is Container and the cmp-version is 2.x and query methods other than findByPrimaryKey have been defined for the entity bean. - * The other elements that are optional are "optional" in the sense that they are omitted if the lists represented by them are empty. At least one cmp-field element must be present in the descriptor if - * the entity's persistence-type is Container and the cmp-version is 1.x, and none must not be present if the entity's persistence-type is Bean. - */ -public class EntityImpl extends EnterpriseBeanImpl implements Entity, EnterpriseBean { - - /** - * The default value of the '{@link #isReentrant() Reentrant}' attribute. - * - * - * @see #isReentrant() - * @generated - * @ordered - */ - protected static final boolean REENTRANT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isReentrant() Reentrant}' attribute. - * - * - * @see #isReentrant() - * @generated - * @ordered - */ - protected boolean reentrant = REENTRANT_EDEFAULT; - - /** - * This is true if the Reentrant attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean reentrantESet = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass primaryKey = null; - public EntityImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getEntity(); - } - -public String getPrimaryKeyName() { - getPrimaryKey(); - return primaryKey == null ? null : primaryKey.getQualifiedName(); -} -/** - * Return true if @aJavaClass as equal to the - * home, remote, bean class, or key class. - */ -public boolean hasJavaReference(JavaClass aJavaClass) { - boolean result = super.hasJavaReference(aJavaClass); - if (!result && aJavaClass != null) - result = aJavaClass.equals(getPrimaryKey()); - return result; -} -//Return false by default -public boolean isContainerManagedEntity() { - return false; -} -public boolean isEntity() { - return true; -} -protected boolean primGetIsReentrant() { - return isReentrant(); -} -protected JavaClass primGetPrimaryKey() { - return getPrimaryKey(); -} - -public java.lang.Object primRefValue(EObject feature) { - switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) { - case EjbPackage.ENTITY__REENTRANT: return new Boolean(isReentrant()); - case EjbPackage.ENTITY__PRIMARY_KEY: return getPrimaryKey(); - } - return super.primRefValue(feature); -} -public void setPrimaryKeyName(String primaryKeyName) { - eSet(EjbPackage.eINSTANCE.getEntity_PrimaryKey(), createClassRef(primaryKeyName)); -} - /** - * @generated This field/method will be replaced during code generation - * The reentrant element specifies whether an entity bean is reentrant or not. - - */ - public boolean isReentrant() { - return reentrant; - } - - /** - * - * - * @generated - */ - public void setReentrant(boolean newReentrant) { - boolean oldReentrant = reentrant; - reentrant = newReentrant; - boolean oldReentrantESet = reentrantESet; - reentrantESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__REENTRANT, oldReentrant, reentrant, !oldReentrantESet)); - } - - /** - * - * - * @generated - */ - public void unsetReentrant() { - boolean oldReentrant = reentrant; - boolean oldReentrantESet = reentrantESet; - reentrant = REENTRANT_EDEFAULT; - reentrantESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.ENTITY__REENTRANT, oldReentrant, REENTRANT_EDEFAULT, oldReentrantESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetReentrant() { - return reentrantESet; - } - - /** - * Handwritten version of getPrimaryKey(): - */ - - - public JavaClass getPrimaryKey() { - if (primaryKey != null && primaryKey.eIsProxy()) { - JavaClass oldPrimaryKey = primaryKey; - JavaClass resolved = (JavaClass)EcoreUtil.resolve(primaryKey, this); - resolved(this.primaryKey, resolved); - this.primaryKey = resolved; - if (primaryKey != oldPrimaryKey) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldPrimaryKey, primaryKey)); - } - } - return primaryKey; - } - - - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setPrimaryKey(JavaClass newPrimaryKey) { - JavaClass oldPrimaryKey = primaryKey; - primaryKey = newPrimaryKey; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ENTITY__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.ENTITY__EJB_JAR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ENTITY__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.ENTITY__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.ENTITY__EJB_JAR, msgs); - case EjbPackage.ENTITY__SECURITY_IDENTITY: - return basicSetSecurityIdentity(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.ENTITY__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTITY__ICONS: - return getIcons(); - case EjbPackage.ENTITY__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.ENTITY__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.ENTITY__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.ENTITY__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.ENTITY__DESCRIPTION: - return getDescription(); - case EjbPackage.ENTITY__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case EjbPackage.ENTITY__RESOURCE_REFS: - return getResourceRefs(); - case EjbPackage.ENTITY__EJB_REFS: - return getEjbRefs(); - case EjbPackage.ENTITY__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case EjbPackage.ENTITY__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case EjbPackage.ENTITY__SERVICE_REFS: - return getServiceRefs(); - case EjbPackage.ENTITY__NAME: - return getName(); - case EjbPackage.ENTITY__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case EjbPackage.ENTITY__EJB_CLASS: - if (resolve) return getEjbClass(); - return basicGetEjbClass(); - case EjbPackage.ENTITY__HOME_INTERFACE: - if (resolve) return getHomeInterface(); - return basicGetHomeInterface(); - case EjbPackage.ENTITY__REMOTE_INTERFACE: - if (resolve) return getRemoteInterface(); - return basicGetRemoteInterface(); - case EjbPackage.ENTITY__EJB_JAR: - return getEjbJar(); - case EjbPackage.ENTITY__SECURITY_IDENTITY: - return getSecurityIdentity(); - case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: - if (resolve) return getLocalHomeInterface(); - return basicGetLocalHomeInterface(); - case EjbPackage.ENTITY__LOCAL_INTERFACE: - if (resolve) return getLocalInterface(); - return basicGetLocalInterface(); - case EjbPackage.ENTITY__REENTRANT: - return isReentrant() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.ENTITY__PRIMARY_KEY: - if (resolve) return getPrimaryKey(); - return basicGetPrimaryKey(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTITY__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.ENTITY__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.ENTITY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.ENTITY__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.ENTITY__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.ENTITY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.ENTITY__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case EjbPackage.ENTITY__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case EjbPackage.ENTITY__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case EjbPackage.ENTITY__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case EjbPackage.ENTITY__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case EjbPackage.ENTITY__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case EjbPackage.ENTITY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.ENTITY__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case EjbPackage.ENTITY__EJB_CLASS: - return ejbClass != null; - case EjbPackage.ENTITY__HOME_INTERFACE: - return homeInterface != null; - case EjbPackage.ENTITY__REMOTE_INTERFACE: - return remoteInterface != null; - case EjbPackage.ENTITY__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.ENTITY__SECURITY_IDENTITY: - return securityIdentity != null; - case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: - return localHomeInterface != null; - case EjbPackage.ENTITY__LOCAL_INTERFACE: - return localInterface != null; - case EjbPackage.ENTITY__REENTRANT: - return isSetReentrant(); - case EjbPackage.ENTITY__PRIMARY_KEY: - return primaryKey != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTITY__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.ENTITY__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.ENTITY__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.ENTITY__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__NAME: - setName((String)newValue); - return; - case EjbPackage.ENTITY__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case EjbPackage.ENTITY__EJB_CLASS: - setEjbClass((JavaClass)newValue); - return; - case EjbPackage.ENTITY__HOME_INTERFACE: - setHomeInterface((JavaClass)newValue); - return; - case EjbPackage.ENTITY__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)newValue); - return; - case EjbPackage.ENTITY__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.ENTITY__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)newValue); - return; - case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)newValue); - return; - case EjbPackage.ENTITY__LOCAL_INTERFACE: - setLocalInterface((JavaClass)newValue); - return; - case EjbPackage.ENTITY__REENTRANT: - setReentrant(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.ENTITY__PRIMARY_KEY: - setPrimaryKey((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ENTITY__ICONS: - getIcons().clear(); - return; - case EjbPackage.ENTITY__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.ENTITY__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.ENTITY__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.ENTITY__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.ENTITY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.ENTITY__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case EjbPackage.ENTITY__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case EjbPackage.ENTITY__EJB_REFS: - getEjbRefs().clear(); - return; - case EjbPackage.ENTITY__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case EjbPackage.ENTITY__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case EjbPackage.ENTITY__SERVICE_REFS: - getServiceRefs().clear(); - return; - case EjbPackage.ENTITY__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.ENTITY__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case EjbPackage.ENTITY__EJB_CLASS: - setEjbClass((JavaClass)null); - return; - case EjbPackage.ENTITY__HOME_INTERFACE: - setHomeInterface((JavaClass)null); - return; - case EjbPackage.ENTITY__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)null); - return; - case EjbPackage.ENTITY__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.ENTITY__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)null); - return; - case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)null); - return; - case EjbPackage.ENTITY__LOCAL_INTERFACE: - setLocalInterface((JavaClass)null); - return; - case EjbPackage.ENTITY__REENTRANT: - unsetReentrant(); - return; - case EjbPackage.ENTITY__PRIMARY_KEY: - setPrimaryKey((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (reentrant: "); //$NON-NLS-1$ - if (reentrantESet) result.append(reentrant); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - * The primkey-field element is used to specify the name of the primary key field - * for an entity with container-managed persistence. The primkey-field must be - * one of the fields declared in the cmp-field - * element, and the type of the field must be the same as the primary key type. - * The primkey-field element is not used if the primary key maps to multiple - * container-managed fields (i.e. the key is a compound key). In this case, the - * fields of the primary key class must be public, and their names must correspond - * to the field names of the entity bean class that comprise the key. - * Examples:java.lang.String - * com.wombat.empl.EmployeeID - * java.lang.Object - - */ - public JavaClass getPrimaryKeyGen() { - if (primaryKey != null && primaryKey.eIsProxy()) { - JavaClass oldPrimaryKey = primaryKey; - primaryKey = (JavaClass)eResolveProxy((InternalEObject)primaryKey); - if (primaryKey != oldPrimaryKey) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey)); - } - } - return primaryKey; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetPrimaryKey() { - return primaryKey; - } - -} - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ExcludeListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ExcludeListImpl.java deleted file mode 100644 index e506032b2..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ExcludeListImpl.java +++ /dev/null @@ -1,245 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MethodElement; - - -/** - * The exclude list element defines a set of methods which the Assembler marks to be uncallable. It contains one or more methods. - * - * If the method permission relation contains methods that are in the exclude list, the Deployer must consider those methods to be uncallable. - - */ -public class ExcludeListImpl extends EObjectImpl implements ExcludeList, EObject { - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList methodElements = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public ExcludeListImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getExcludeList(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EXCLUDE_LIST__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getMethodElements() { - if (methodElements == null) { - methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS); - } - return methodElements; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EXCLUDE_LIST__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: - return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); - case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EXCLUDE_LIST__DESCRIPTION: - return getDescription(); - case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: - return getMethodElements(); - case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EXCLUDE_LIST__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: - return methodElements != null && !methodElements.isEmpty(); - case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EXCLUDE_LIST__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: - getMethodElements().clear(); - getMethodElements().addAll((Collection)newValue); - return; - case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.EXCLUDE_LIST__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: - getMethodElements().clear(); - return; - case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - - public List getMethodElements(EnterpriseBean anEJB) { - if (anEJB == null) - return Collections.EMPTY_LIST; - List result = new ArrayList(); - List elements = getMethodElements(); - MethodElement me; - for (int i = 0; i < elements.size(); i++) { - me = (MethodElement) elements.get(i); - if (anEJB.equals(me.getEnterpriseBean())) - result.add(me); - } - return result; - } -} - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleAttributeFilter.java deleted file mode 100644 index dbdff7ea0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleAttributeFilter.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * This filter will return a subset of the keyAttributes (this includes inherited - * key attributes) from the ContainerManagedEntityExtension that is passed as an - * argument to the filter method. - * It will remove any key attribute that is not pointed to by an EjbRelationshipRole. - * Thus, the returned list will contain key attributes (including inherited key attributes) that only - * belong to roles. - * Creation date: (11/28/2000 7:23:22 PM) - * @author: Administrator - */ -public class KeyRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { - private static KeyRelationshipRoleAttributeFilter singleton; -/** - * Return the proper list of attributes from cmpExt. - */ -protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { - return cmp.getFilteredFeatures(KeyRelationshipRoleFilter.singleton()); -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleAttributeFilter - */ -public static KeyRelationshipRoleAttributeFilter singleton() { - if (singleton == null) - singleton = new KeyRelationshipRoleAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleFilter.java deleted file mode 100644 index e60f2486c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/KeyRelationshipRoleFilter.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * This filter will return a subset of the relationshipRoles (this includes - * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension - * that is passed as an argument to the filter method. It will remove any - * EjbRelationshipRole that is not part of the key. Creation date: (11/28/2000 - * 7:14:57 PM) @author: Administrator - */ -public class KeyRelationshipRoleFilter extends ContainerManagedEntityFilter { - - private static KeyRelationshipRoleFilter singleton; - - /** - * filter method comment. - */ - public java.util.List filter(ContainerManagedEntity cmp) { - List keyRoles = new ArrayList(); - Iterator it = getRelationshipRoles(cmp).iterator(); - CommonRelationshipRole role; - while (it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - if (role.isKey()) keyRoles.add(role); - } - return keyRoles; - } - - /** - * Insert the method's description here. Creation date: (11/28/2000 7:15:37 - * PM) - * - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter - */ - public static KeyRelationshipRoleFilter singleton() { - if (singleton == null) singleton = new KeyRelationshipRoleFilter(); - return singleton; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalKeyAttributeFilter.java deleted file mode 100644 index 0ce7451ef..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalKeyAttributeFilter.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; - -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * This filter will return a subset of the keyAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter method. - * It will remove any keyPersistentAttributes that are inherited by any supertypes. - * That means the returned list of CMPAttributes will be key attributes that were defined locally - * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus key attributes - * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension. - * Creation date: (11/28/2000 6:24:33 PM) - * @author: Administrator - */ -public class LocalKeyAttributeFilter extends SupertypeCMPAttributeFilter { - private static LocalKeyAttributeFilter singleton; -/** - * Return the proper list of attributes from cmpExt. - */ -protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { - return new ArrayList(cmp.getKeyAttributes()); -} -/** - * Return a boolean indicating whether anAttribute also exists in the superEntity. - * For this filter, only the name has to be the same. - */ -protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { - CMPAttribute found = superEntity.getKeyAttribute(anAttribute.getName()); - return found != null; -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalKeyAttributeFilter - */ -public static LocalKeyAttributeFilter singleton() { - if (singleton == null) - singleton = new LocalKeyAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalModelledPersistentAttributeFilter.java deleted file mode 100644 index a720bfc75..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalModelledPersistentAttributeFilter.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -/** - * This filter will return a subset of the persistentAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter - * method. It will remove any inherited persistentAttributes and any - * persistentAttributes that are held by EjbRelationshipRole objects (including - * inherited EjbRelationshipRole attributes). That means the returned list of - * CMPAttributes will be attributes that were defined locally minus all - * inherited attributes and minus any attributes pointed to by - * EjbRelationshipRoles, thus the attributes will only be attributes that were - * defined locally by the user. Creation date: (11/28/2000 7:31:42 PM) @author: - * Administrator - */ -public class LocalModelledPersistentAttributeFilter extends SupertypeCMPAttributeFilter { - private static LocalModelledPersistentAttributeFilter singleton; - /** - * Return the proper list of attributes from cmpExt. Return local - * attributes minus those added due to Relationship Roles. - */ - protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { - java.util.List local = null, localRoleAttributes; - local = cmp.getFilteredFeatures(LocalPersistentAttributeFilter.singleton()); - localRoleAttributes = cmp.getFilteredFeatures(LocalRelationshipRoleAttributeFilter.singleton()); - if(local != null) - local.removeAll(localRoleAttributes); - return local; - } - /** - * Return a boolean indicating whether anAttribute also exists in the - * superEntity. For this filter, only the name has to be the same. - */ - protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { - CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName()); - return found != null; - } - /** - * Insert the method's description here. Creation date: (11/28/2000 5:36:00 - * PM) - * - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalModelledPersistentAttributeFilter - */ - public static LocalModelledPersistentAttributeFilter singleton() { - if (singleton == null) - singleton = new LocalModelledPersistentAttributeFilter(); - return singleton; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalOppositeRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalOppositeRelationshipRoleFilter.java deleted file mode 100644 index 3f133409b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalOppositeRelationshipRoleFilter.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * This filter will return a subset of the relationshipRoles (this includes - * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension - * that is passed as an argument to the filter method. It will remove any - * EjbRelationshipRole that is inherited and it will return the opposite role. - * Creation date: (11/28/2000 7:14:57 PM) @author: Administrator - */ -public class LocalOppositeRelationshipRoleFilter extends ContainerManagedEntityFilter { - - private static LocalOppositeRelationshipRoleFilter singleton; - - /** - * Return a List with the opposite roles for the local relationship roles. - */ - public List filter(ContainerManagedEntity cmp) { - List oppositeRoles = new ArrayList(); - Iterator it = getLocalRelationshipRoles(cmp).iterator(); - CommonRelationshipRole role, opposite; - while (it != null && it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - opposite = role.getOppositeAsCommonRole(); - if (opposite != null) oppositeRoles.add(opposite); - } - return oppositeRoles; - } - - /** - * Insert the method's description here. Creation date: (11/28/2000 7:15:37 - * PM) - * - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalOppositeRelationshipRoleFilter - */ - public static LocalOppositeRelationshipRoleFilter singleton() { - if (singleton == null) singleton = new LocalOppositeRelationshipRoleFilter(); - return singleton; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalPersistentAttributeFilter.java deleted file mode 100644 index e71691be0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalPersistentAttributeFilter.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; - -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * This filter will return a subset of the persistentAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter method. - * It will remove any persistentAttributes that are inherited by any supertypes. - * That means the returned list of CMPAttributes will be attributes that were defined locally - * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus attributes - * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension. - * Creation date: (11/28/2000 5:35:03 PM) - * @author: Administrator - */ -public class LocalPersistentAttributeFilter extends SupertypeCMPAttributeFilter { - private static LocalPersistentAttributeFilter singleton; -/** - * Return the proper list of attributes from cmpExt. - */ -protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { - return new ArrayList(cmp.getPersistentAttributes()); -} -/** - * Return a boolean indicating whether anAttribute also exists in the superEntity. - * For this filter, only the name has to be the same. - */ -protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { - CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName()); - return found != null; -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalPersistentAttributeFilter - */ -public static LocalPersistentAttributeFilter singleton() { - if (singleton == null) - singleton = new LocalPersistentAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleAttributeFilter.java deleted file mode 100644 index 28d1c79af..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleAttributeFilter.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * This filter will return a subset of the persistentAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter method. - * It will remove any attribute that is not pointed to by an EjbRelationshipRole and - * it will further remove attributes pointed to by inherited EjbRelationshipRoles. - * Thus, the returned list will contain attributes that only belong to local - * EjbRelationshipRoles (not including iherited roles). - * Creation date: (11/28/2000 6:46:08 PM) - * @author: Administrator - */ -public class LocalRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { - private static LocalRelationshipRoleAttributeFilter singleton; -/** - * Return the proper list of roles from cmpExt. - */ -protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { - return getRelationshipRoles(cmp); -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalRelationshipRoleAttributeFilter - */ -public static LocalRelationshipRoleAttributeFilter singleton() { - if (singleton == null) - singleton = new LocalRelationshipRoleAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java deleted file mode 100644 index 61d0461fb..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * @author jlanuti - * - * To change this generated comment edit the template variable "typecomment": - * Window>Preferences>Java>Templates. - * To enable and disable the creation of type comments go to - * Window>Preferences>Java>Code Generation. - */ -public class LocalRelationshipRoleKeyAttributeFilter extends LocalRelationshipRoleAttributeFilter { - - private static LocalRelationshipRoleKeyAttributeFilter singleton; - -public static LocalRelationshipRoleAttributeFilter singleton() { - if (singleton == null) - singleton = new LocalRelationshipRoleKeyAttributeFilter(); - return singleton; -} - -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - List attributes = new ArrayList(); - Iterator it = getSourceRoles(cmp).iterator(); - CommonRelationshipRole role; - while (it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - if (role.isKey()) - attributes.addAll(role.getAttributes()); - } - return attributes; -} -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenDestinationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenDestinationImpl.java deleted file mode 100644 index 747e21ee9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenDestinationImpl.java +++ /dev/null @@ -1,359 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.ejb.DestinationType; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; - -/** - * The message-driven-destination element provides advice to the Deployer as to whether a message-driven bean is intended for a Queue or a Topic. The declaration consists of: the type of the message-driven bean's intended destination and an optional declaration of whether a durable or non-durable subscription should be used if the destination-type is javax.jms.Topic. - */ -public class MessageDrivenDestinationImpl extends EObjectImpl implements MessageDrivenDestination, EObject{ - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final DestinationType TYPE_EDEFAULT = DestinationType.QUEUE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DestinationType type = TYPE_EDEFAULT; - /** - * This is true if the Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean typeESet = false; - - /** - * The default value of the '{@link #getSubscriptionDurability() Subscription Durability}' attribute. - * - * - * @see #getSubscriptionDurability() - * @generated - * @ordered - */ - protected static final SubscriptionDurabilityKind SUBSCRIPTION_DURABILITY_EDEFAULT = SubscriptionDurabilityKind.DURABLE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected SubscriptionDurabilityKind subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT; - /** - * This is true if the Subscription Durability attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean subscriptionDurabilityESet = false; - - public MessageDrivenDestinationImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getMessageDrivenDestination(); - } - - /** - * @generated This field/method will be replaced during code generation - * The destination-type element specifies the type of the JMS destination. The type is specified by the Java interface expected to be implemented by the destination. - * - * The destination-type element must be one of the two following: javax.jms.Queue, javax.jms.Topic - */ - public DestinationType getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(DestinationType newType) { - DestinationType oldType = type; - type = newType == null ? TYPE_EDEFAULT : newType; - boolean oldTypeESet = typeESet; - typeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, type, !oldTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetType() { - DestinationType oldType = type; - boolean oldTypeESet = typeESet; - type = TYPE_EDEFAULT; - typeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetType() { - return typeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The subscription-durability element specifies whether a JMS topic subscription is intended to be durable or nondurable. - * - * The subscription-durability element must be one of the two following: Durable, NonDurable - - */ - public SubscriptionDurabilityKind getSubscriptionDurability() { - return subscriptionDurability; - } - - /** - * - * - * @generated - */ - public void setSubscriptionDurability(SubscriptionDurabilityKind newSubscriptionDurability) { - SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability; - subscriptionDurability = newSubscriptionDurability == null ? SUBSCRIPTION_DURABILITY_EDEFAULT : newSubscriptionDurability; - boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet; - subscriptionDurabilityESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, subscriptionDurability, !oldSubscriptionDurabilityESet)); - } - - /** - * - * - * @generated - */ - public void unsetSubscriptionDurability() { - SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability; - boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet; - subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT; - subscriptionDurabilityESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, SUBSCRIPTION_DURABILITY_EDEFAULT, oldSubscriptionDurabilityESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetSubscriptionDurability() { - return subscriptionDurabilityESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public MessageDriven getBean() { - if (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN) return null; - return (MessageDriven)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setBean(MessageDriven newBean) { - if (newBean != eContainer || (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN && newBean != null)) { - if (EcoreUtil.isAncestor(this, newBean)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newBean != null) - msgs = ((InternalEObject)newBean).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newBean, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, newBean, newBean)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - return eBasicSetContainer(null, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - return eContainer.eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: - return getType(); - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: - return getSubscriptionDurability(); - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - return getBean(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: - return isSetType(); - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: - return isSetSubscriptionDurability(); - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - return getBean() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: - setType((DestinationType)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: - setSubscriptionDurability((SubscriptionDurabilityKind)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - setBean((MessageDriven)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: - unsetType(); - return; - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: - unsetSubscriptionDurability(); - return; - case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: - setBean((MessageDriven)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (type: "); //$NON-NLS-1$ - if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ - result.append(", subscriptionDurability: "); //$NON-NLS-1$ - if (subscriptionDurabilityESet) result.append(subscriptionDurability); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenImpl.java deleted file mode 100644 index 7836ec852..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MessageDrivenImpl.java +++ /dev/null @@ -1,982 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.TransactionType; - - -/** - * @generated - */ -public class MessageDrivenImpl extends EnterpriseBeanImpl implements MessageDriven{ - - /** - * The default value of the '{@link #getTransactionType() Transaction Type}' attribute. - * - * - * @see #getTransactionType() - * @generated - * @ordered - */ - protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT; - /** - * This is true if the Transaction Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transactionTypeESet = false; - - /** - * The default value of the '{@link #getMessageSelector() Message Selector}' attribute. - * - * - * @see #getMessageSelector() - * @generated - * @ordered - */ - protected static final String MESSAGE_SELECTOR_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String messageSelector = MESSAGE_SELECTOR_EDEFAULT; - /** - * The default value of the '{@link #getAcknowledgeMode() Acknowledge Mode}' attribute. - * - * - * @see #getAcknowledgeMode() - * @generated - * @ordered - */ - protected static final AcknowledgeMode ACKNOWLEDGE_MODE_EDEFAULT = AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected AcknowledgeMode acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT; - /** - * This is true if the Acknowledge Mode attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean acknowledgeModeESet = false; - - /** - * The default value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected static final String LINK_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLink() Link}' attribute. - * - * - * @see #getLink() - * @generated - * @ordered - */ - protected String link = LINK_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected MessageDrivenDestination destination = null; - /** - * The cached value of the '{@link #getActivationConfig() Activation Config}' containment reference. - * - * - * @see #getActivationConfig() - * @generated - * @ordered - */ - protected ActivationConfig activationConfig = null; - - /** - * The cached value of the '{@link #getMessageDestination() Message Destination}' reference. - * - * - * @see #getMessageDestination() - * @generated - * @ordered - */ - protected JavaClass messageDestination = null; - - /** - * The cached value of the '{@link #getMessagingType() Messaging Type}' reference. - * - * - * @see #getMessagingType() - * @generated - * @ordered - */ - protected JavaClass messagingType = null; - - public MessageDrivenImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getMessageDriven(); - } - -public boolean isMessageDriven() { - return true; -} - /** - * @generated This field/method will be replaced during code generation - * The transaction-type element specifies an enterprise bean's transaction management type. - * - * The transaction-type element must be one of the two following: Bean, Container - */ - public TransactionType getTransactionType() { - return transactionType; - } - - /** - * - * - * @generated - */ - public void setTransactionType(TransactionType newTransactionType) { - TransactionType oldTransactionType = transactionType; - transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType; - boolean oldTransactionTypeESet = transactionTypeESet; - transactionTypeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransactionType() { - TransactionType oldTransactionType = transactionType; - boolean oldTransactionTypeESet = transactionTypeESet; - transactionType = TRANSACTION_TYPE_EDEFAULT; - transactionTypeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransactionType() { - return transactionTypeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The message-selector element is used to specify the JMS message - * selector to be used in determining which messages a message-driven - * bean is to receive. - * - * Example value: - * JMSType = `car' AND color = `blue' AND weight > 2500 - - */ - public String getMessageSelector() { - return messageSelector; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setMessageSelector(String newMessageSelector) { - String oldMessageSelector = messageSelector; - messageSelector = newMessageSelector; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR, oldMessageSelector, messageSelector)); - } - - /** - * @generated This field/method will be replaced during code generation - * an optional declaration of the acknowledgment mode for the message-driven bean if bean-managed transaction demarcation is used (ie. self.transactionType = Bean) - * - * The acknowledge-mode specifies whether JMS AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE message acknowledgment semantics should be used for the onMessage message of a message-driven bean that uses bean managed transaction demarcation. - * - * The acknowledge-mode must be one of the two following: Auto-acknowledge, Dups-ok-acknowledge - - */ - public AcknowledgeMode getAcknowledgeMode() { - return acknowledgeMode; - } - - /** - * - * - * @generated - */ - public void setAcknowledgeMode(AcknowledgeMode newAcknowledgeMode) { - AcknowledgeMode oldAcknowledgeMode = acknowledgeMode; - acknowledgeMode = newAcknowledgeMode == null ? ACKNOWLEDGE_MODE_EDEFAULT : newAcknowledgeMode; - boolean oldAcknowledgeModeESet = acknowledgeModeESet; - acknowledgeModeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, acknowledgeMode, !oldAcknowledgeModeESet)); - } - - /** - * - * - * @generated - */ - public void unsetAcknowledgeMode() { - AcknowledgeMode oldAcknowledgeMode = acknowledgeMode; - boolean oldAcknowledgeModeESet = acknowledgeModeESet; - acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT; - acknowledgeModeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, ACKNOWLEDGE_MODE_EDEFAULT, oldAcknowledgeModeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetAcknowledgeMode() { - return acknowledgeModeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * An optional declaration of the intended destination type of the message-driven bean - */ - public MessageDrivenDestination getDestination() { - return destination; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetDestination(MessageDrivenDestination newDestination, NotificationChain msgs) { - MessageDrivenDestination oldDestination = destination; - destination = newDestination; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, oldDestination, newDestination); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDestination(MessageDrivenDestination newDestination) { - if (newDestination != destination) { - NotificationChain msgs = null; - if (destination != null) - msgs = ((InternalEObject)destination).eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs); - if (newDestination != null) - msgs = ((InternalEObject)newDestination).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs); - msgs = basicSetDestination(newDestination, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, newDestination, newDestination)); - } - - /** - * - * - * @generated - */ - public ActivationConfig getActivationConfig() { - return activationConfig; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetActivationConfig(ActivationConfig newActivationConfig, NotificationChain msgs) { - ActivationConfig oldActivationConfig = activationConfig; - activationConfig = newActivationConfig; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, oldActivationConfig, newActivationConfig); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setActivationConfig(ActivationConfig newActivationConfig) { - if (newActivationConfig != activationConfig) { - NotificationChain msgs = null; - if (activationConfig != null) - msgs = ((InternalEObject)activationConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs); - if (newActivationConfig != null) - msgs = ((InternalEObject)newActivationConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs); - msgs = basicSetActivationConfig(newActivationConfig, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, newActivationConfig, newActivationConfig)); - } - - /** - * - * - * @generated - */ - public JavaClass getMessageDestination() { - if (messageDestination != null && messageDestination.eIsProxy()) { - JavaClass oldMessageDestination = messageDestination; - messageDestination = (JavaClass)eResolveProxy((InternalEObject)messageDestination); - if (messageDestination != oldMessageDestination) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination)); - } - } - return messageDestination; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetMessageDestination() { - return messageDestination; - } - - /** - * - * - * @generated - */ - public void setMessageDestination(JavaClass newMessageDestination) { - JavaClass oldMessageDestination = messageDestination; - messageDestination = newMessageDestination; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination)); - } - - /** - * - * - * @generated - */ - public String getLink() { - return link; - } - - /** - * - * - * @generated - */ - public void setLink(String newLink) { - String oldLink = link; - link = newLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__LINK, oldLink, link)); - } - - /** - * - * - * @generated - */ - public JavaClass getMessagingType() { - if (messagingType != null && messagingType.eIsProxy()) { - JavaClass oldMessagingType = messagingType; - messagingType = (JavaClass)eResolveProxy((InternalEObject)messagingType); - if (messagingType != oldMessagingType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType)); - } - } - return messagingType; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetMessagingType() { - return messagingType; - } - - /** - * - * - * @generated - */ - public void setMessagingType(JavaClass newMessagingType) { - JavaClass oldMessagingType = messagingType; - messagingType = newMessagingType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.MESSAGE_DRIVEN__EJB_JAR, msgs); - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - if (destination != null) - msgs = ((InternalEObject)destination).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__DESTINATION, null, msgs); - return basicSetDestination((MessageDrivenDestination)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.MESSAGE_DRIVEN__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.MESSAGE_DRIVEN__EJB_JAR, msgs); - case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: - return basicSetSecurityIdentity(null, msgs); - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - return basicSetDestination(null, msgs); - case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: - return basicSetActivationConfig(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN__ICONS: - return getIcons(); - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: - return getDescription(); - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: - return getResourceRefs(); - case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: - return getEjbRefs(); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: - return getServiceRefs(); - case EjbPackage.MESSAGE_DRIVEN__NAME: - return getName(); - case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: - if (resolve) return getEjbClass(); - return basicGetEjbClass(); - case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: - if (resolve) return getHomeInterface(); - return basicGetHomeInterface(); - case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: - if (resolve) return getRemoteInterface(); - return basicGetRemoteInterface(); - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - return getEjbJar(); - case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: - return getSecurityIdentity(); - case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: - if (resolve) return getLocalHomeInterface(); - return basicGetLocalHomeInterface(); - case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: - if (resolve) return getLocalInterface(); - return basicGetLocalInterface(); - case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: - return getTransactionType(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: - return getMessageSelector(); - case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: - return getAcknowledgeMode(); - case EjbPackage.MESSAGE_DRIVEN__LINK: - return getLink(); - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - return getDestination(); - case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: - return getActivationConfig(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: - if (resolve) return getMessageDestination(); - return basicGetMessageDestination(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: - if (resolve) return getMessagingType(); - return basicGetMessagingType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: - return ejbClass != null; - case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: - return homeInterface != null; - case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: - return remoteInterface != null; - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: - return securityIdentity != null; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: - return localHomeInterface != null; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: - return localInterface != null; - case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: - return isSetTransactionType(); - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: - return MESSAGE_SELECTOR_EDEFAULT == null ? messageSelector != null : !MESSAGE_SELECTOR_EDEFAULT.equals(messageSelector); - case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: - return isSetAcknowledgeMode(); - case EjbPackage.MESSAGE_DRIVEN__LINK: - return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - return destination != null; - case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: - return activationConfig != null; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: - return messageDestination != null; - case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: - return messagingType != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__NAME: - setName((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: - setEjbClass((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: - setHomeInterface((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: - setLocalInterface((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: - setTransactionType((TransactionType)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: - setMessageSelector((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: - setAcknowledgeMode((AcknowledgeMode)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__LINK: - setLink((String)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - setDestination((MessageDrivenDestination)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: - setActivationConfig((ActivationConfig)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: - setMessageDestination((JavaClass)newValue); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: - setMessagingType((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.MESSAGE_DRIVEN__ICONS: - getIcons().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: - getEjbRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: - getServiceRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: - setEjbClass((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: - setHomeInterface((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)null); - return; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: - setLocalInterface((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: - unsetTransactionType(); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: - setMessageSelector(MESSAGE_SELECTOR_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: - unsetAcknowledgeMode(); - return; - case EjbPackage.MESSAGE_DRIVEN__LINK: - setLink(LINK_EDEFAULT); - return; - case EjbPackage.MESSAGE_DRIVEN__DESTINATION: - setDestination((MessageDrivenDestination)null); - return; - case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: - setActivationConfig((ActivationConfig)null); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: - setMessageDestination((JavaClass)null); - return; - case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: - setMessagingType((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (transactionType: "); //$NON-NLS-1$ - if (transactionTypeESet) result.append(transactionType); else result.append(""); //$NON-NLS-1$ - result.append(", messageSelector: "); //$NON-NLS-1$ - result.append(messageSelector); - result.append(", acknowledgeMode: "); //$NON-NLS-1$ - if (acknowledgeModeESet) result.append(acknowledgeMode); else result.append(""); //$NON-NLS-1$ - result.append(", link: "); //$NON-NLS-1$ - result.append(link); - result.append(')'); - return result.toString(); - } - - /* - * @see EnterpriseBean#getAvailableLocalHomeMethodElements() - */ - public List getAvailableLocalHomeMethodElements() { - return Collections.EMPTY_LIST; - } - - /* - * @see EnterpriseBean#getAvailableLocalMethodElements() - */ - public List getAvailableLocalMethodElements() { - return Collections.EMPTY_LIST; - } - - /* - * @see EnterpriseBean#getAvailableRemoteMethodElements() - */ - public List getAvailableRemoteMethodElements() { - return Collections.EMPTY_LIST; - } - - /* - * @see EnterpriseBeanImpl#getAvailableUnspecifiedMethodElementSignatures() - */ - public List getAvailableUnspecifiedMethodElementSignatures() { - //There is only the onMessage method - List sigs = new ArrayList(1); - sigs.add("onMessage(javax.jms.Message)"); //$NON-NLS-1$ - return sigs; - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodElementImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodElementImpl.java deleted file mode 100644 index 7554bcb5c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodElementImpl.java +++ /dev/null @@ -1,1039 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.emf.ecore.xmi.XMIResource; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaParameter; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.Session; -import org.eclipse.jst.j2ee.ejb.util.MethodElementHelper; - - -/** - * The method element is used to denote a method of an enterprise bean's - * home or remote interface, or a set of methods. The ejb-name element - * must be the name of one of the enterprise beans in declared in the - * deployment descriptor; the optional method-intf element allows to - * distinguish between a method with the same signature that is defined in - * both the home and remote interface; the method-name element specifies - * the method name; and the optional method-params elements identify a - * single method among multiple methods with an overloaded method name. - * - * There are three possible styles of the method element syntax: - * - * 1. - * EJBNAME - * * - * - * - * This style is used to refer to all the methods of the specified - * enterprise bean's home and remote interfaces. - * - * 2. - * EJBNAME - * METHOD - * > - * - * This style is used to refer to the specified method of the - * specified enterprise bean. If there are multiple methods with - * the same overloaded name, the element of this style refers to - * all the methods with the overloaded name. - * - * - * - * - * - * 3. - * EJBNAME - * METHOD - * - * PARAM-1 - * PARAM-2 - * ... - * PARAM-n - * - * - * - * This style is used to refer to a single method within a set of - * methods with an overloaded name. PARAM-1 through PARAM-n are the - * fully-qualified Java types of the method's input parameters (if - * the method has no input arguments, the method-params element - * contains no method-param elements). Arrays are specified by the - * array element's type, followed by one or more pair of square - * brackets (e.g. int[][]). - * - * - * Used in: method-permission and container-transaction - * - * Examples: - * - * Style 1: The following method element refers to all the methods of - * the EmployeeService bean's home and remote interfaces: - * - * - * EmployeeService - * * - * - * - * Style 2: The following method element refers to all the create - * methods of the EmployeeService bean's home interface: - * - * - * EmployeeService - * create - * - * - * Style 3: The following method element refers to the - * create(String firstName, String LastName) method of the - * EmployeeService bean's home interface. - * - * - * EmployeeService - * create - * - * java.lang.String - * java.lang.String - * - * - * - * - * The following example illustrates a Style 3 element with - * more complex parameter types. The method - * foobar(char s, int i, int[] iar, mypackage.MyClass mycl, - * mypackage.MyClass[][] myclaar) - * would be specified as: - * - * - * EmployeeService - * foobar - * - * char - * int - * int[] - * mypackage.MyClass - * mypackage.MyClass[][] - * - * - * - * The optional method-intf element can be used when it becomes - * necessary to differentiate between a method defined in the home - * interface and a method with the same name and signature that is - * defined in the remote interface. - * - * For example, the method element - * - * - * EmployeeService - * Remote - * create - * - * java.lang.String - * java.lang.String - * - * - * - * can be used to differentiate the create(String, String) method - * defined in the remote interface from the create(String, String) - * method defined in the home interface, which would be defined as - * - * - * EmployeeService - * Home - * create - * - * java.lang.String - * java.lang.String - * - * - - */ -public class MethodElementImpl extends EObjectImpl implements MethodElement { - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getParms() Parms}' attribute. - * - * - * @see #getParms() - * @generated - * @ordered - */ - protected static final String PARMS_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String parms = PARMS_EDEFAULT; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final MethodElementKind TYPE_EDEFAULT = MethodElementKind.UNSPECIFIED_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected MethodElementKind type = TYPE_EDEFAULT; - /** - * This is true if the Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean typeESet = false; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EnterpriseBean enterpriseBean = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public MethodElementImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getMethodElement(); - } - -public void addMethodParams(String param) { - String oldParms = getParms(); - if (oldParms == null) { - setParms(param); - } else { - setParms(oldParms.concat(" ").concat(param)); //$NON-NLS-1$ - } -} -/** - * Set the params for this method element to an empty array, as opposed - * to null. - */ -public void applyZeroParams() { - setParms(""); //$NON-NLS-1$ -} -public boolean equalSignature(MethodElement anotherMethodElement) { - boolean equal = getName().equals(anotherMethodElement.getName()); - if (equal) { - equal = parmsEqual(anotherMethodElement); - if (equal) { - if (getType() == null) - equal = anotherMethodElement.getType() == null; - else - equal = getType().equals(anotherMethodElement.getType()); - } - } - return equal; -} -public java.util.List getMethodParams() { - StringTokenizer tok = getMethodParamsTokenizer(); - java.util.List v = new ArrayList(); - java.util.List paramsList = new ArrayList(); - String current = null; - if (tok != null) { - while (current != null || tok.hasMoreTokens()) { - String peek = null; - if (current == null) - current = tok.nextToken(); - if (tok.hasMoreTokens()) { - peek = tok.nextToken(); - if (peek.startsWith("[")) { //$NON-NLS-1$ - current += peek; - peek = null; - } - } - v.add(current); - if (peek != null) - current = peek; - else - current = null; - } - - } - - /* - * This is a hack to make sure that for old XMI generated files, that ven if there was ',' separated - * params, it parses them back out right. To support 4.0.X AAT generated XMI files with runAs roles - * for methods. - */ - for (int i = 0; i < v.size(); i++) - { - tok = new StringTokenizer((String)v.get(i),","); //$NON-NLS-1$ - if (tok != null) - { - while (tok.hasMoreTokens()) - { - paramsList.add(tok.nextToken()); - } - } - } - return paramsList; -} -private StringTokenizer getMethodParamsTokenizer() { - //This method is a hack for now; the cardinality is wrong for the params - String aParms = getParms(); - if (aParms == null || aParms.length() == 0) { - return null; - } - return new StringTokenizer(getParms()); -} -/** - * Answer a list of all the methods for which this method element applies. The following rules are used: - * - * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb; - * If it is specified, then the appropriate interface is used - * - * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned - * - * 3) If the method name is specified, and no method params are specified, then all public methods for the interface - * having the same name are returned. - * - * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method - * on the interface with the appropriate signature, if it exists - */ -public Method[] getMethods() { - EnterpriseBean ejb = getEnterpriseBean(); - if(ejb == null) - return new Method[0]; - List result = null; - switch (getType().getValue()) { - case MethodElementKind.HOME : - { - result = getMethods(ejb.getHomeInterface()); - break; - } - case MethodElementKind.REMOTE : - { - result = getMethods(ejb.getRemoteInterface()); - break; - } - case MethodElementKind.LOCAL_HOME : - { - result = getMethods(ejb.getLocalHomeInterface()); - break; - } - case MethodElementKind.LOCAL : - { - result = getMethods(ejb.getLocalInterface()); - break; - } - case MethodElementKind.SERVICE_ENDPOINT : - { - if(ejb.isSession()) { - result = getMethods(((Session)ejb).getServiceEndpoint()); - break; - } - } - case MethodElementKind.UNSPECIFIED : - { - if (ejb.isMessageDriven()) - result = getMethods(ejb.getEjbClass()); - else { - result = new ArrayList(); - result.addAll(getMethods(ejb.getHomeInterface())); - result.addAll(getMethods(ejb.getRemoteInterface())); - result.addAll(getMethods(ejb.getLocalHomeInterface())); - result.addAll(getMethods(ejb.getLocalInterface())); - } - break; - } - } - return (Method[]) result.toArray(new Method[result.size()]); -} -/** - * Answer a list of all the methods for which this method element applies. The following rules are used: - * - * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb; - * If it is specified, then the appropriate interface is used - * - * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned - * - * 3) If the method name is specified, and no method params are specified, then all public methods for the interface - * having the same name are returned. - * - * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method - * on the interface with the appropriate signature, if it exists - */ -private List getMethods(JavaClass javaClass) { - if (javaClass == null) return Collections.EMPTY_LIST; - List result = null; - String methodName = getName().trim(); - if (name.equals("*")) //$NON-NLS-1$ - result = javaClass.getPublicMethodsExtended(); - else if (hasMethodParams()) { - result = new ArrayList(); - Method method = javaClass.getPublicMethodExtended(name, getMethodParams()); - if (method != null) - result.add(method); - } else - result = javaClass.getPublicMethodsExtendedNamed(methodName); - - return result; -} -/** - * Return the MethodElement that is most specific. - */ -public MethodElement getMostSpecific(MethodElement aMethodElement, JavaClass aClass) { - if (aMethodElement == null) return this; - if (aMethodElement.isDefault() && !isDefault()) - return this; - if (!aMethodElement.isDefault() && isDefault()) - return aMethodElement; - if (aMethodElement.hasMethodParams() && !hasMethodParams()) - return aMethodElement; - if (!aMethodElement.hasMethodParams() && hasMethodParams()) - return this; - if (isUnspecified() && !aMethodElement.isUnspecified()) - return aMethodElement; - return this; -} -public static MethodElement getMostSpecificMethodElement(List methodElements, Method aMethod) { - MethodElement specificME = null; - if (aMethod != null) { - Iterator it = methodElements.iterator(); - MethodElement me; - while (it.hasNext()) { - me = (MethodElement) it.next(); - if (me.represents(aMethod)) { - if (me.uniquelyIdentifies(aMethod)) - return me; - else if (specificME == null) - specificME = me; - else - specificME = specificME.getMostSpecific(me, aMethod.getJavaClass()); - } - } - } - return specificME; -} -protected String getParmsString() { - String parmString = getParms(); - if (parmString == null) - parmString = ""; //$NON-NLS-1$ - return parmString; -} -/** - * Return a String array for the possible MethodElement type names. - */ -public static String[] getPossibleTypeNames() { - EjbPackage pack = EjbFactoryImpl.getPackage(); - List literals = pack.getMethodElementKind().getELiterals(); - String[] names = new String[literals.size()]; - for (int i = 0; i < literals.size(); i++) - names[i] = literals.get(i).toString(); - return names; -} -/** - * Return the signature. - * For example: setTwoParamMethod(java.lang.String, java.lang.String) - */ -public String getSignature() { - if (isDefault()) - return getName(); - StringBuffer buf = new StringBuffer(); - buf.append(getName()); - if (hasMethodParams()){ - buf.append(RIGHT_PAREN); - StringTokenizer tok = getMethodParamsTokenizer(); - if (tok != null) { - while (tok.hasMoreTokens()) { - buf.append(tok.nextToken()); - if (tok.hasMoreTokens()) - buf.append(COMMA); - } - } - buf.append(LEFT_PAREN); - } - return buf.toString(); -} -// Returns null if the EEnum is UNSPECIFIED -// unless it is a MessageDriven bean. -public JavaClass getTypeJavaClass() { - if (isHome()) - return getEnterpriseBean().getHomeInterface(); - else if (isRemote()) - return getEnterpriseBean().getRemoteInterface(); - else if (isLocalHome()) - return getEnterpriseBean().getLocalHomeInterface(); - else if (isLocal()) - return getEnterpriseBean().getLocalInterface(); - else if (isUnspecified() && getEnterpriseBean().isMessageDriven()) - return getEnterpriseBean().getEjbClass(); - else - return null; -} - /** - * Answer whether method params apply to this method, e.g., it is specific to one - * overloaded method, even if the method is a zero parameter method. Answer false if no - * parameters apply, that is, the method element applies to all overloaded methods with this name - */ -public boolean hasMethodParams() { - return getParms() != null; -} -/** - * Parse @aSignature setting the name and the params. - * A signature example: setTwoParamMethod(java.lang.String, java.lang.String) - */ -public void initializeFromSignature(String aSignature) { - parseSignature(aSignature); -} -public boolean isDefault() { - return JavaClass.DEFAULT_METHOD_NAME.equals(getName()); -} -/** - * Return true if this MethodElement and @anotherMethodElement - * represent the same exact methods. - */ -public boolean isEquivalent(MethodElement anotherMethodElement) { - boolean equal = equalSignature(anotherMethodElement); - if (equal) - equal = getEnterpriseBean() == anotherMethodElement.getEnterpriseBean(); - return equal; -} -public boolean isHome() { - return getType().getValue() == MethodElementKind.HOME; -} -public boolean isRemote() { - return getType().getValue() == MethodElementKind.REMOTE; -} -public boolean isUnspecified() { - return getType().getValue() == MethodElementKind.UNSPECIFIED; -} -public boolean isLocalHome() { - return getType().getValue() == MethodElementKind.LOCAL_HOME; -} -public boolean isLocal() { - return getType().getValue() == MethodElementKind.LOCAL; -} -/** - * Return true if this MethodElement represents one or more - * methods. - */ -public boolean isValid() { - return getMethods().length > 0; -} -/** - * Return true only if all the parameters for @aMethod - * matches the names in the list of parameters. - */ -public boolean matchesParams(Method aMethod) { - if (aMethod == null) return false; - List params = getMethodParams(); - JavaParameter[] methodParams = aMethod.listParametersWithoutReturn(); - if (params.size() != methodParams.length) - return false; - for (int i = 0; i < methodParams.length; i++){ - String parameterType = ((JavaHelpers)methodParams[i].getEType()).getQualifiedName(); - if (!params.get(i).equals(parameterType)) - return false; - } - return true; -} -/** - * Return true if this MethodElement has the same basic signature as - * @aMethod, ignoring the return type, thrown exceptions, and declaring class of - * this instance or @aMethod. Return false, if params is null - */ -public boolean nameAndParamsEquals(Method aMethod) { - if (aMethod != null) { - if (getName().equals(aMethod.getName())) { - if (hasMethodParams()) - return matchesParams(aMethod); - return false; - } - } - return false; -} -protected boolean parmsEqual(MethodElement me) { - if (me == null) return false; - List myParms, otherParms; - myParms = getMethodParams(); - otherParms = me.getMethodParams(); - if (myParms.size() != otherParms.size()) return false; - for (int i = 0; i < myParms.size(); i++){ - if (!myParms.get(i).equals(otherParms.get(i))) - return false; - } - return true; -} -/** - * Parse @aSignature setting the name and the params. - * A signature example: setTwoParamMethod(java.lang.String, java.lang.String) - */ -protected void parseSignature(String aSignature) { - int index = aSignature.indexOf(RIGHT_PAREN); - - int endIndex = aSignature.indexOf(LEFT_PAREN); - if (endIndex < 0) - { - endIndex = aSignature.length() - 1; - } - - if (index < 0){ - setName(aSignature); - setParms(null); //There are no parameters in the sig so set to null - } - else { - String sigName = aSignature.substring(0, index); - - setName(sigName); - String sigParms = aSignature.substring(index + 1, endIndex); - - if (sigParms.length() > 0) { - char commaChar = COMMA.charAt(0); - char[] sigParmsChars = sigParms.toCharArray(); - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < sigParmsChars.length; i++) { - if (sigParmsChars[i] != commaChar) { - buf.append(sigParmsChars[i]); - } else { - addMethodParams(buf.toString()); - buf = new StringBuffer(); - } - } - addMethodParams(buf.toString()); - } else - applyZeroParams(); - } -} -public void removeMethodParams(String param) { - String myParams = getParms(); - if (myParams == null || myParams.length() == 0) { - return; - } - StringTokenizer tok = new StringTokenizer(myParams); - StringBuffer newParms = new StringBuffer(); - while (tok.hasMoreElements()) { - String token = tok.nextToken(); - if (!token.equals(param)) { - newParms.append(token); - newParms.append(" "); //$NON-NLS-1$ - } - } - setParms(newParms.toString().trim()); -} -/** - * represents method comment. - */ -public boolean represents(Method aMethod) { - if (aMethod != null) { - if (isUnspecified() || typeClassImplementsInterface(aMethod.getJavaClass())) { - if (isDefault()) - return true; - else - if (getName().equals(aMethod.getName())) { - if (hasMethodParams()) - return matchesParams(aMethod); - return true; - } - } - } - return false; -} -/** - * Sets the id to be [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName, - * or [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName_Parms, if parms exist - */ -public void setIdToReadableString() { - String aParms = getParms() == null ? "" : "_"+getParms().replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$ - String prefix = ""; //$NON-NLS-1$ - switch (MethodElementHelper.getContainedType(this)) { - case MethodElementHelper.METHOD_PERMISSION : - prefix = ((XMIResource)eContainer.eResource()).getID(eContainer); - break; - case MethodElementHelper.METHOD_TRANSACTION : - prefix = ((XMIResource)eContainer.eResource()).getID(eContainer); - break; - } - ((XMIResource)eResource()).setID(this,prefix + "_" + getEnterpriseBean().getName() + "_" + getName() + aParms); //$NON-NLS-1$ //$NON-NLS-2$ -} -protected boolean typeClassImplementsInterface(JavaClass anInterface) { - if (getTypeJavaClass() == null || anInterface == null) return false; - return getTypeJavaClass().implementsInterface(anInterface); -} -/** - * Return true if this MethodElement uniquely identifies - * @aMethod. Return false, even if the MethodElement represents - * @aMethod (i.e., @aMethod is contained in its list of methods). - */ -public boolean uniquelyIdentifies(Method aMethod) { - if (aMethod != null) { - if (getTypeJavaClass() != null && - typeClassImplementsInterface(aMethod.getJavaClass()) && - getName().equals(aMethod.getName())) { - if (hasMethodParams()) - return matchesParams(aMethod); - return aMethod.listParametersWithoutReturn().length==0; - } - } - return false; -} - /** - * @generated This field/method will be replaced during code generation - * The method-name element contains a name of an enterprise bean method, - * or the asterisk (*) character. The asterisk is used when the element - * denotes all the methods of an enterprise bean's remote and home - * interfaces. - - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getParms() { - return parms; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setParms(String newParms) { - String oldParms = parms; - parms = newParms; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__PARMS, oldParms, parms)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public MethodElementKind getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(MethodElementKind newType) { - MethodElementKind oldType = type; - type = newType == null ? TYPE_EDEFAULT : newType; - boolean oldTypeESet = typeESet; - typeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, type, !oldTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetType() { - MethodElementKind oldType = type; - boolean oldTypeESet = typeESet; - type = TYPE_EDEFAULT; - typeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetType() { - return typeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EnterpriseBean getEnterpriseBean() { - if (enterpriseBean != null && enterpriseBean.eIsProxy()) { - EnterpriseBean oldEnterpriseBean = enterpriseBean; - enterpriseBean = (EnterpriseBean)eResolveProxy((InternalEObject)enterpriseBean); - if (enterpriseBean != oldEnterpriseBean) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean)); - } - } - return enterpriseBean; - } - - /** - * - * - * @generated - */ - public EnterpriseBean basicGetEnterpriseBean() { - return enterpriseBean; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEnterpriseBean(EnterpriseBean newEnterpriseBean) { - EnterpriseBean oldEnterpriseBean = enterpriseBean; - enterpriseBean = newEnterpriseBean; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_ELEMENT__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_ELEMENT__NAME: - return getName(); - case EjbPackage.METHOD_ELEMENT__PARMS: - return getParms(); - case EjbPackage.METHOD_ELEMENT__TYPE: - return getType(); - case EjbPackage.METHOD_ELEMENT__DESCRIPTION: - return getDescription(); - case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: - if (resolve) return getEnterpriseBean(); - return basicGetEnterpriseBean(); - case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_ELEMENT__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.METHOD_ELEMENT__PARMS: - return PARMS_EDEFAULT == null ? parms != null : !PARMS_EDEFAULT.equals(parms); - case EjbPackage.METHOD_ELEMENT__TYPE: - return isSetType(); - case EjbPackage.METHOD_ELEMENT__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: - return enterpriseBean != null; - case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_ELEMENT__NAME: - setName((String)newValue); - return; - case EjbPackage.METHOD_ELEMENT__PARMS: - setParms((String)newValue); - return; - case EjbPackage.METHOD_ELEMENT__TYPE: - setType((MethodElementKind)newValue); - return; - case EjbPackage.METHOD_ELEMENT__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: - setEnterpriseBean((EnterpriseBean)newValue); - return; - case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_ELEMENT__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.METHOD_ELEMENT__PARMS: - setParms(PARMS_EDEFAULT); - return; - case EjbPackage.METHOD_ELEMENT__TYPE: - unsetType(); - return; - case EjbPackage.METHOD_ELEMENT__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: - setEnterpriseBean((EnterpriseBean)null); - return; - case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", parms: "); //$NON-NLS-1$ - result.append(parms); - result.append(", type: "); //$NON-NLS-1$ - if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodPermissionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodPermissionImpl.java deleted file mode 100644 index e6c07c97f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodPermissionImpl.java +++ /dev/null @@ -1,465 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodPermission; - - -/** - * The method-permission element specifies that one or more security roles are allowed to invoke one or more enterprise bean methods. The method-permission element consists of an optional description, a list of security role names, and a list of method elements. The security roles used in the method-permission element must be defined in the security-role element of the deployment descriptor, and the methods must be methods defined in the enterprise bean's remote and//or home interfaces. - */ -public class MethodPermissionImpl extends EObjectImpl implements MethodPermission, EObject { - - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #isUnchecked() Unchecked}' attribute. - * - * - * @see #isUnchecked() - * @generated - * @ordered - */ - protected static final boolean UNCHECKED_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean unchecked = UNCHECKED_EDEFAULT; - /** - * This is true if the Unchecked attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean uncheckedESet = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList roles = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList methodElements = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public MethodPermissionImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getMethodPermission(); - } - -public List getMethodElements(EnterpriseBean anEJB) { - if (anEJB == null) return Collections.EMPTY_LIST; - List result = new ArrayList(); - List elements = getMethodElements(); - MethodElement me; - for (int i = 0; i < elements.size(); i++){ - me = (MethodElement) elements.get(i); - if (anEJB.equals(me.getEnterpriseBean())) - result.add(me); - } - return result; -} -public SecurityRole getSecurityRole(String aRoleName) { - if (aRoleName == null) return null; - List myRoles = getRoles(); - int size = myRoles.size(); - SecurityRole role; - for (int i = 0; i < size; i++){ - role = (SecurityRole) myRoles.get(i); - if (aRoleName.equals(role.getRoleName())) - return role; - } - return null; -} -/** - * Return true if this permission contains @aSecurityRole - */ -public boolean hasSecurityRole(SecurityRole aSecurityRole) { - if (aSecurityRole == null) - return false; - List myRoles = getRoles(); - int size = myRoles.size(); - for (int i = 0; i < size; i++) { - if (aSecurityRole == myRoles.get(i)) - return true; - } - return false; -} -public boolean hasSecurityRole(String aRoleName) { - return getSecurityRole(aRoleName) != null; -} -/** - * Return true if this MethodPermission and @anotherMethodPermission - * have the same roles. - */ -public boolean isEquivalent(MethodPermission anotherMethodPermission) { - if (anotherMethodPermission == null) return false; - return getRoles().size() == anotherMethodPermission.getRoles().size() && - getRoles().containsAll(anotherMethodPermission.getRoles()); -} - /** - * @generated This field/method will be replaced during code generation - * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public boolean isUnchecked() { - return unchecked; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUnchecked(boolean newUnchecked) { - boolean oldUnchecked = unchecked; - unchecked = newUnchecked; - boolean oldUncheckedESet = uncheckedESet; - uncheckedESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, unchecked, !oldUncheckedESet)); - } - - /** - * - * - * @generated - */ - public void unsetUnchecked() { - boolean oldUnchecked = unchecked; - boolean oldUncheckedESet = uncheckedESet; - unchecked = UNCHECKED_EDEFAULT; - uncheckedESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, UNCHECKED_EDEFAULT, oldUncheckedESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetUnchecked() { - return uncheckedESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public AssemblyDescriptor getAssemblyDescriptor() { - if (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR) return null; - return (AssemblyDescriptor)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { - if (newAssemblyDescriptor != eContainer || (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) { - if (EcoreUtil.isAncestor(this, newAssemblyDescriptor)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newAssemblyDescriptor != null) - msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getRoles() { - if (roles == null) { - roles = new EObjectResolvingEList(SecurityRole.class, this, EjbPackage.METHOD_PERMISSION__ROLES); - } - return roles; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getMethodElements() { - if (methodElements == null) { - methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS); - } - return methodElements; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_PERMISSION__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - return eBasicSetContainer(null, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); - case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: - return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); - case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - return eContainer.eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_PERMISSION__DESCRIPTION: - return getDescription(); - case EjbPackage.METHOD_PERMISSION__UNCHECKED: - return isUnchecked() ? Boolean.TRUE : Boolean.FALSE; - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - return getAssemblyDescriptor(); - case EjbPackage.METHOD_PERMISSION__ROLES: - return getRoles(); - case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: - return getMethodElements(); - case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_PERMISSION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.METHOD_PERMISSION__UNCHECKED: - return isSetUnchecked(); - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - return getAssemblyDescriptor() != null; - case EjbPackage.METHOD_PERMISSION__ROLES: - return roles != null && !roles.isEmpty(); - case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: - return methodElements != null && !methodElements.isEmpty(); - case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_PERMISSION__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.METHOD_PERMISSION__UNCHECKED: - setUnchecked(((Boolean)newValue).booleanValue()); - return; - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)newValue); - return; - case EjbPackage.METHOD_PERMISSION__ROLES: - getRoles().clear(); - getRoles().addAll((Collection)newValue); - return; - case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: - getMethodElements().clear(); - getMethodElements().addAll((Collection)newValue); - return; - case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_PERMISSION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.METHOD_PERMISSION__UNCHECKED: - unsetUnchecked(); - return; - case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)null); - return; - case EjbPackage.METHOD_PERMISSION__ROLES: - getRoles().clear(); - return; - case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: - getMethodElements().clear(); - return; - case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", unchecked: "); //$NON-NLS-1$ - if (uncheckedESet) result.append(unchecked); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodTransactionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodTransactionImpl.java deleted file mode 100644 index 67dc074e9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/MethodTransactionImpl.java +++ /dev/null @@ -1,432 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; - - -/** - * Specifies how the container must manage transaction scopes for the enterprise bean's method invocations. It consists of an optional description, a list of method elements, and a transaction attribute.The transaction attribute is to be applied to all the specified methods. - */ -public class MethodTransactionImpl extends EObjectImpl implements MethodTransaction, EObject { - - /** - * The default value of the '{@link #getTransactionAttribute() Transaction Attribute}' attribute. - * - * - * @see #getTransactionAttribute() - * @generated - * @ordered - */ - protected static final TransactionAttributeType TRANSACTION_ATTRIBUTE_EDEFAULT = TransactionAttributeType.NOT_SUPPORTED_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected TransactionAttributeType transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT; - /** - * This is true if the Transaction Attribute attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transactionAttributeESet = false; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList methodElements = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public MethodTransactionImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getMethodTransaction(); - } - -/** - * Return an array of Strings for all the EEnumLiteral values - * for the transactionAttribute enumeration. - */ -public static String[] getAvailableTransactionAttributeNames() { - List l = getAvailableTransactionAttributes(); - String[] names = new String[l.size()]; - for (int i = 0; i < l.size(); i++) - names[i] = ((EEnumLiteral)l.get(i)).toString(); - return names; -} -/** - * Return a List of the all the EEnumLiteral values - * for the transactionAttribute enumeration. - * The toString() method for a EEnumLiteral will display - * the String value for the enumeration value. - */ -public static List getAvailableTransactionAttributes() { - EjbPackage pack = (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); - return pack.getTransactionAttributeType().getELiterals(); -} -public List getMethodElements(EnterpriseBean anEJB) { - List result = new ArrayList(); - List elements = getMethodElements(); - MethodElement me; - for (int i = 0; i < elements.size(); i++){ - me = (MethodElement) elements.get(i); - if (me.getEnterpriseBean() != null && me.getEnterpriseBean().equals(anEJB)) - result.add(me); - } - return result; -} -public MethodElement getMostSpecificMethodElement(Method aMethod) { - return MethodElementImpl.getMostSpecificMethodElement(getMethodElements(), aMethod); -} -public boolean isEquivalent(MethodTransaction anotherMethodTransaction) { - return getTransactionAttribute() == anotherMethodTransaction.getTransactionAttribute(); -} - /** - * @generated This field/method will be replaced during code generation - * The trans-attribute element specifies how the container must manage the transaction boundaries when delegating a method invocation to an enterprise bean's business method. - - */ - public TransactionAttributeType getTransactionAttribute() { - return transactionAttribute; - } - - /** - * - * - * @generated - */ - public void setTransactionAttribute(TransactionAttributeType newTransactionAttribute) { - TransactionAttributeType oldTransactionAttribute = transactionAttribute; - transactionAttribute = newTransactionAttribute == null ? TRANSACTION_ATTRIBUTE_EDEFAULT : newTransactionAttribute; - boolean oldTransactionAttributeESet = transactionAttributeESet; - transactionAttributeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, transactionAttribute, !oldTransactionAttributeESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransactionAttribute() { - TransactionAttributeType oldTransactionAttribute = transactionAttribute; - boolean oldTransactionAttributeESet = transactionAttributeESet; - transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT; - transactionAttributeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, TRANSACTION_ATTRIBUTE_EDEFAULT, oldTransactionAttributeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransactionAttribute() { - return transactionAttributeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public AssemblyDescriptor getAssemblyDescriptor() { - if (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR) return null; - return (AssemblyDescriptor)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { - if (newAssemblyDescriptor != eContainer || (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) { - if (EcoreUtil.isAncestor(this, newAssemblyDescriptor)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newAssemblyDescriptor != null) - msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getMethodElements() { - if (methodElements == null) { - methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS); - } - return methodElements; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - return eBasicSetContainer(null, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); - case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: - return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); - case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - return eContainer.eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: - return getTransactionAttribute(); - case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: - return getDescription(); - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - return getAssemblyDescriptor(); - case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: - return getMethodElements(); - case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: - return isSetTransactionAttribute(); - case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - return getAssemblyDescriptor() != null; - case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: - return methodElements != null && !methodElements.isEmpty(); - case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: - setTransactionAttribute((TransactionAttributeType)newValue); - return; - case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)newValue); - return; - case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: - getMethodElements().clear(); - getMethodElements().addAll((Collection)newValue); - return; - case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: - unsetTransactionAttribute(); - return; - case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: - setAssemblyDescriptor((AssemblyDescriptor)null); - return; - case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: - getMethodElements().clear(); - return; - case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (transactionAttribute: "); //$NON-NLS-1$ - if (transactionAttributeESet) result.append(transactionAttribute); else result.append(""); //$NON-NLS-1$ - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledKeyAttributeFilter.java deleted file mode 100644 index e55c4145e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledKeyAttributeFilter.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * This filter will return a subset of the keyAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter method. - * It will remove any keyAttributes that are held by EjbRelationshipRole objects (including - * inherited EjbRelationshipRole attributes). - * That means the returned list of CMPAttributes will be key attributes that were defined locally - * and all inherited key attributes minus any key attributes pointed to by EjbRelationshipRoles, thus the - * key attributes will only be key attributes that were defined by the user. - * Creation date: (11/28/2000 8:09:10 PM) - * @author: Administrator - */ -public class ModelledKeyAttributeFilter extends ContainerManagedEntityFilter { - private static ModelledKeyAttributeFilter singleton; -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - return getSourceAttributes(cmp); -} -/** - * Return the proper list of attributes from cmpExt. - * Return all attributes minus those added due to Relationship Roles. - */ -protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { - java.util.List all, localRoleKeyAttributes; - all = new java.util.ArrayList(cmp.getKeyAttributes()); - localRoleKeyAttributes = cmp.getFilteredFeatures(KeyRelationshipRoleAttributeFilter.singleton()); - filterRoleAttributesByName(all, localRoleKeyAttributes); - return all; -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledKeyAttributeFilter - */ -public static ModelledKeyAttributeFilter singleton() { - if (singleton == null) - singleton = new ModelledKeyAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledPersistentAttributeFilter.java deleted file mode 100644 index 1bb683d96..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/ModelledPersistentAttributeFilter.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * This filter will return a subset of the persistentAttributes from the - * ContainerManagedEntityExtension that is passed as an argument to the filter method. - * It will remove any persistentAttributes that are held by EjbRelationshipRole objects (including - * inherited EjbRelationshipRole attributes). - * That means the returned list of CMPAttributes will be attributes that were defined locally - * and all inherited attributes minus any attributes pointed to by EjbRelationshipRoles, thus the - * attributes will only be attributes that were defined by the user. - * Creation date: (11/28/2000 7:31:42 PM) - * @author: Administrator - */ -public class ModelledPersistentAttributeFilter extends ContainerManagedEntityFilter { - private static ModelledPersistentAttributeFilter singleton; -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - return getSourceAttributes(cmp); -} -/** - * Return the proper list of attributes from cmpExt. - * Return all attributes minus those added due to Relationship Roles. - */ -protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { - java.util.List all, roleAttributes; - all = new java.util.ArrayList(cmp.getPersistentAttributes()); - roleAttributes = cmp.getFilteredFeatures(RelationshipRoleAttributeFilter.singleton()); - filterRoleAttributesByName(all, roleAttributes); - return all; -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledPersistentAttributeFilter - */ -public static ModelledPersistentAttributeFilter singleton() { - if (singleton == null) - singleton = new ModelledPersistentAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/NonKeyRequiredRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/NonKeyRequiredRoleFilter.java deleted file mode 100644 index 83a92205f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/NonKeyRequiredRoleFilter.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on May 5, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * @author jlanuti - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class NonKeyRequiredRoleFilter extends ContainerManagedEntityFilter { - - private static NonKeyRequiredRoleFilter singleton; - - /** - * filter method comment. - */ - public List filter(ContainerManagedEntity cmp) { - List roles = new ArrayList(); - Iterator it = getRelationshipRoles(cmp).iterator(); - CommonRelationshipRole role; - while (it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - if (!role.isKey() && role.isRequired()) roles.add(role); - } - return roles; - } - - /** - * Insert the method's description here. Creation date: (11/28/2000 7:15:37 - * PM) - * - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter - */ - public static NonKeyRequiredRoleFilter singleton() { - if (singleton == null) singleton = new NonKeyRequiredRoleFilter(); - return singleton; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryImpl.java deleted file mode 100644 index 47eb451ca..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryImpl.java +++ /dev/null @@ -1,513 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; - - -/** - * The query element is used to specify a finder or select query. It contains an optional description of the query; the specification of the finder or select method it is used by; a specification of the return type mapping, if any, if the query is for a select method; and the EJB QL query string that defines the query. Queries that are expressible in EJB QL must use the ejb-ql element to specify the query. If a query - * is not expressible in EJB QL, the description element should be used to describe the semantics of the query and the ejb-ql element should be empty. - */ -public class QueryImpl extends EObjectImpl implements Query, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getEjbQL() Ejb QL}' attribute. - * - * - * @see #getEjbQL() - * @generated - * @ordered - */ - protected static final String EJB_QL_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String ejbQL = EJB_QL_EDEFAULT; - /** - * The default value of the '{@link #getReturnTypeMapping() Return Type Mapping}' attribute. - * - * - * @see #getReturnTypeMapping() - * @generated - * @ordered - */ - protected static final ReturnTypeMapping RETURN_TYPE_MAPPING_EDEFAULT = ReturnTypeMapping.LOCAL_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected ReturnTypeMapping returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT; - /** - * This is true if the Return Type Mapping attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean returnTypeMappingESet = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected QueryMethod queryMethod = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public QueryImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getQuery(); - } - -public boolean isLocalResultMapping() { - // override bug in the model which made Remote the default - return getReturnTypeMapping().getValue() == ReturnTypeMapping.LOCAL; -} -public boolean isRemoteResultMapping() { - return getReturnTypeMapping().getValue() == ReturnTypeMapping.REMOTE; -} - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing the query. - * - * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains the EJB QL query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. The ejb-ql element must be specified for all queries that are expressible in EJB QL. - * - * @invariant The value must be a valid EJB QL query string for the entity bean or dependent object class for which the query is specified. - * @invariant The ejb-ql element must be specified for all queries that are expressible in EJB QL. - * - * Example: - * - * - * ejbSelectPendingLineitems - * - * - * SELECT ENTITY(l) - * FROM LineItems l - * WHERE l.shipped is FALSE - * - * - */ - public String getEjbQL() { - return ejbQL; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbQL(String newEjbQL) { - String oldEjbQL = ejbQL; - ejbQL = newEjbQL; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__EJB_QL, oldEjbQL, ejbQL)); - } - - /** - * @generated This field/method will be replaced during code generation - * The return-type-mapping element is used in the query element to specify whether an abstract schema type that is returned by a query for a select method is to be mapped to an EJBLocalObject or EJBObject type. The value of the return-type-mapping element, if specified must be one of the following. - */ - public ReturnTypeMapping getReturnTypeMapping() { - return returnTypeMapping; - } - - /** - * - * - * @generated - */ - public void setReturnTypeMapping(ReturnTypeMapping newReturnTypeMapping) { - ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping; - returnTypeMapping = newReturnTypeMapping == null ? RETURN_TYPE_MAPPING_EDEFAULT : newReturnTypeMapping; - boolean oldReturnTypeMappingESet = returnTypeMappingESet; - returnTypeMappingESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, returnTypeMapping, !oldReturnTypeMappingESet)); - } - - /** - * - * - * @generated - */ - public void unsetReturnTypeMapping() { - ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping; - boolean oldReturnTypeMappingESet = returnTypeMappingESet; - returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT; - returnTypeMappingESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, RETURN_TYPE_MAPPING_EDEFAULT, oldReturnTypeMappingESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetReturnTypeMapping() { - return returnTypeMappingESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The query-method element is used to specify the method (DB//SR//CM-"on the home") for a finder or - * select query. - * - * The method-name element specifies the name of a finder or select - * method in the entity bean's implementation class or a select method in - * the dependent object class. - * - * Each method-param must be defined for a query-method using the - * method-params element. - * - * Used in: query - * - * Example: - * - * Example: - * - * Method finds large orders - * - * findLargeOrders - * - * - * SELECT ENTITY(o) FROM Order o WHERE o.amount > 1000 - * - */ - public QueryMethod getQueryMethod() { - return queryMethod; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetQueryMethod(QueryMethod newQueryMethod, NotificationChain msgs) { - QueryMethod oldQueryMethod = queryMethod; - queryMethod = newQueryMethod; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, oldQueryMethod, newQueryMethod); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setQueryMethod(QueryMethod newQueryMethod) { - if (newQueryMethod != queryMethod) { - NotificationChain msgs = null; - if (queryMethod != null) - msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs); - if (newQueryMethod != null) - msgs = ((InternalEObject)newQueryMethod).eInverseAdd(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs); - msgs = basicSetQueryMethod(newQueryMethod, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, newQueryMethod, newQueryMethod)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public ContainerManagedEntity getEntity() { - if (eContainerFeatureID != EjbPackage.QUERY__ENTITY) return null; - return (ContainerManagedEntity)eContainer; - } - - /** - * - * - * @generated - */ - public void setEntity(ContainerManagedEntity newEntity) { - if (newEntity != eContainer || (eContainerFeatureID != EjbPackage.QUERY__ENTITY && newEntity != null)) { - if (EcoreUtil.isAncestor(this, newEntity)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newEntity != null) - msgs = ((InternalEObject)newEntity).eInverseAdd(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newEntity, EjbPackage.QUERY__ENTITY, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__ENTITY, newEntity, newEntity)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.QUERY__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.QUERY__QUERY_METHOD: - if (queryMethod != null) - msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.QUERY__QUERY_METHOD, null, msgs); - return basicSetQueryMethod((QueryMethod)otherEnd, msgs); - case EjbPackage.QUERY__ENTITY: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.QUERY__ENTITY, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.QUERY__QUERY_METHOD: - return basicSetQueryMethod(null, msgs); - case EjbPackage.QUERY__ENTITY: - return eBasicSetContainer(null, EjbPackage.QUERY__ENTITY, msgs); - case EjbPackage.QUERY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.QUERY__ENTITY: - return eContainer.eInverseRemove(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY__DESCRIPTION: - return getDescription(); - case EjbPackage.QUERY__EJB_QL: - return getEjbQL(); - case EjbPackage.QUERY__RETURN_TYPE_MAPPING: - return getReturnTypeMapping(); - case EjbPackage.QUERY__QUERY_METHOD: - return getQueryMethod(); - case EjbPackage.QUERY__ENTITY: - return getEntity(); - case EjbPackage.QUERY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.QUERY__EJB_QL: - return EJB_QL_EDEFAULT == null ? ejbQL != null : !EJB_QL_EDEFAULT.equals(ejbQL); - case EjbPackage.QUERY__RETURN_TYPE_MAPPING: - return isSetReturnTypeMapping(); - case EjbPackage.QUERY__QUERY_METHOD: - return queryMethod != null; - case EjbPackage.QUERY__ENTITY: - return getEntity() != null; - case EjbPackage.QUERY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.QUERY__EJB_QL: - setEjbQL((String)newValue); - return; - case EjbPackage.QUERY__RETURN_TYPE_MAPPING: - setReturnTypeMapping((ReturnTypeMapping)newValue); - return; - case EjbPackage.QUERY__QUERY_METHOD: - setQueryMethod((QueryMethod)newValue); - return; - case EjbPackage.QUERY__ENTITY: - setEntity((ContainerManagedEntity)newValue); - return; - case EjbPackage.QUERY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.QUERY__EJB_QL: - setEjbQL(EJB_QL_EDEFAULT); - return; - case EjbPackage.QUERY__RETURN_TYPE_MAPPING: - unsetReturnTypeMapping(); - return; - case EjbPackage.QUERY__QUERY_METHOD: - setQueryMethod((QueryMethod)null); - return; - case EjbPackage.QUERY__ENTITY: - setEntity((ContainerManagedEntity)null); - return; - case EjbPackage.QUERY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(", ejbQL: "); //$NON-NLS-1$ - result.append(ejbQL); - result.append(", returnTypeMapping: "); //$NON-NLS-1$ - if (returnTypeMappingESet) result.append(returnTypeMapping); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryMethodImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryMethodImpl.java deleted file mode 100644 index a4606fd09..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/QueryMethodImpl.java +++ /dev/null @@ -1,373 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MethodElementKind; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; - -/** - * @generated - */ -public class QueryMethodImpl extends MethodElementImpl implements QueryMethod{ - - public QueryMethodImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getQueryMethod(); - } - -/** - * For Query methods, their enterprise bean must be derived. - * It is the Entity which contains the Query. - */ -public EnterpriseBean getEnterpriseBean() { - if (enterpriseBean == null) { - if (getQuery() != null) - enterpriseBean = getQuery().getEntity(); - } - return enterpriseBean; -} -/** - * Answer the method for which this method element applies in the HOME INTERFACE. - */ -protected Method getHomeMethod() { - Method result = null; - JavaClass javaClass = getEnterpriseBean().getHomeInterface(); - if (javaClass != null) { - String methodName = getName().trim(); - if (hasMethodParams()) - result = javaClass.getPublicMethodExtended(methodName, getMethodParams()); - else { - List methods = javaClass.getPublicMethodsExtendedNamed(methodName); - if (!methods.isEmpty()) - result = (Method) methods.get(0); - } - } - return result; -} -/** - * Answer the method for which this method element applies in the LOCAL HOME INTERFACE. - */ -protected Method getLocalHomeMethod() { - Method result = null; - JavaClass javaClass = getEnterpriseBean().getLocalHomeInterface(); - if (javaClass != null) { - String methodName = getName().trim(); - if (hasMethodParams()) - result = javaClass.getPublicMethodExtended(methodName, getMethodParams()); - else { - List methods = javaClass.getPublicMethodsExtendedNamed(methodName); - if (!methods.isEmpty()) - result = (Method) methods.get(0); - } - } - return result; -} - - - -protected void addMethodIfNotNull(List aList, Method aMethod) { - if (aMethod != null) - aList.add(aMethod); -} -/** - * This method will return a zero-length Method[] if there is no matching method - * on the home, local home, or bean class. It will return exactly one method - * for ejbSelect, and one or two methods for finders. The two method case occurs - * when the same method with the same signature exists on both the home and - * local home. - */ -public Method[] getMethods() { - List result = new ArrayList(2); - if (getName().startsWith("ejbSelect")) { //$NON-NLS-1$ - addMethodIfNotNull(result, getSelectMethod()); - } else { - addMethodIfNotNull(result, getHomeMethod()); - addMethodIfNotNull(result, getLocalHomeMethod()); - } - return (Method[])result.toArray(new Method[result.size()]); -} -/** - * Answer the method for which this method element applies in the HOME INTERFACE. - */ -protected Method getSelectMethod() { - Method result = null; - JavaClass javaClass = getEnterpriseBean().getEjbClass(); - String methodName = getName().trim(); - if (hasMethodParams()) - result = javaClass.getPublicMethodExtended(name, getMethodParams()); - else { - List methods = javaClass.getPublicMethodsExtendedNamed(methodName); - if (!methods.isEmpty()) - result = (Method) methods.iterator().next(); - } - return result; -} - /** - * @generated This field/method will be replaced during code generation - */ - public Query getQuery() { - if (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY) return null; - return (Query)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setQuery(Query newQuery) { - if (newQuery != eContainer || (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY && newQuery != null)) { - if (EcoreUtil.isAncestor(this, newQuery)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newQuery != null) - msgs = ((InternalEObject)newQuery).eInverseAdd(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newQuery, EjbPackage.QUERY_METHOD__QUERY, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY_METHOD__QUERY, newQuery, newQuery)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.QUERY_METHOD__QUERY: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.QUERY_METHOD__QUERY, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.QUERY_METHOD__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.QUERY_METHOD__QUERY: - return eBasicSetContainer(null, EjbPackage.QUERY_METHOD__QUERY, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.QUERY_METHOD__QUERY: - return eContainer.eInverseRemove(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY_METHOD__NAME: - return getName(); - case EjbPackage.QUERY_METHOD__PARMS: - return getParms(); - case EjbPackage.QUERY_METHOD__TYPE: - return getType(); - case EjbPackage.QUERY_METHOD__DESCRIPTION: - return getDescription(); - case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: - if (resolve) return getEnterpriseBean(); - return basicGetEnterpriseBean(); - case EjbPackage.QUERY_METHOD__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.QUERY_METHOD__QUERY: - return getQuery(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY_METHOD__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.QUERY_METHOD__PARMS: - return PARMS_EDEFAULT == null ? parms != null : !PARMS_EDEFAULT.equals(parms); - case EjbPackage.QUERY_METHOD__TYPE: - return isSetType(); - case EjbPackage.QUERY_METHOD__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: - return enterpriseBean != null; - case EjbPackage.QUERY_METHOD__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.QUERY_METHOD__QUERY: - return getQuery() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY_METHOD__NAME: - setName((String)newValue); - return; - case EjbPackage.QUERY_METHOD__PARMS: - setParms((String)newValue); - return; - case EjbPackage.QUERY_METHOD__TYPE: - setType((MethodElementKind)newValue); - return; - case EjbPackage.QUERY_METHOD__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: - setEnterpriseBean((EnterpriseBean)newValue); - return; - case EjbPackage.QUERY_METHOD__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.QUERY_METHOD__QUERY: - setQuery((Query)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.QUERY_METHOD__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.QUERY_METHOD__PARMS: - setParms(PARMS_EDEFAULT); - return; - case EjbPackage.QUERY_METHOD__TYPE: - unsetType(); - return; - case EjbPackage.QUERY_METHOD__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: - setEnterpriseBean((EnterpriseBean)null); - return; - case EjbPackage.QUERY_METHOD__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.QUERY_METHOD__QUERY: - setQuery((Query)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * You should use getClientTypeJavaClasses to ensure you pick up both home interfaces - * if they exist. - */ - public JavaClass getTypeJavaClass() { - JavaClass[] result = getClientTypeJavaClasses(); - if (result != null && result.length > 0) - return result[0]; - return null; - } - - /** - * Return an array of JavaClasses of all the interfaces or bean class that this method is presented - * to a client. If it is an ejbSelect... on the bean class will be returned and if - * it if a find both home interfaces will be returned if they exist. - * - * May return null. - */ - public JavaClass[] getClientTypeJavaClasses() { - if (getName() == null || getEnterpriseBean() == null) return null; - EnterpriseBean ejb = getEnterpriseBean(); - if (getName().startsWith(SELECT_PREFIX)) - return new JavaClass[]{ejb.getEjbClass()}; - //Next case is tougher since you could have both a remove and local client - //We want to return the home interface in this case. - if (getName().startsWith(FIND_PREFIX)) { - if (ejb.hasLocalClient() && !ejb.hasRemoteClient()) - return new JavaClass[]{getEnterpriseBean().getLocalHomeInterface()}; - if (ejb.hasRemoteClient() && !ejb.hasLocalClient()) - return new JavaClass[]{ejb.getHomeInterface()}; - if (ejb.hasRemoteClient() && ejb.hasLocalClient()) - return new JavaClass[]{ejb.getLocalHomeInterface(), ejb.getHomeInterface()}; - } - return null; - } -} - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipRoleAttributeFilter.java deleted file mode 100644 index 7fda8fc5e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipRoleAttributeFilter.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - -/** - * This filter will return a subset of the persistentAttributes (this includes inherited - * attributes) from the ContainerManagedEntityExtension that is passed as an - * argument to the filter method. - * It will remove any attribute that is not pointed to by an EjbRelationshipRole. - * Thus, the returned list will contain attributes (including inherited attributes) that only - * belong to roles. - * Creation date: (11/28/2000 6:46:08 PM) - * @author: Administrator - */ -public class RelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { - private static RelationshipRoleAttributeFilter singleton; -/** - * Return the proper list of roles from cmpExt. - */ -protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { - return getRelationshipRoles(cmp); -} -/** - * Insert the method's description here. - * Creation date: (11/28/2000 5:36:00 PM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RelationshipRoleAttributeFilter - */ -public static RelationshipRoleAttributeFilter singleton() { - if (singleton == null) - singleton = new RelationshipRoleAttributeFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipsImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipsImpl.java deleted file mode 100644 index 6485db257..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RelationshipsImpl.java +++ /dev/null @@ -1,313 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.Relationships; - - -/** - * The relationships describes the relationships in which entity beans with container managed persistence participate. The relationships element contains an optional description; and a list of ejb-relation elements, which specify the container managed relationships. - */ -public class RelationshipsImpl extends EObjectImpl implements Relationships, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList ejbRelations = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public RelationshipsImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getRelationships(); - } - - /** - * @generated This field/method will be replaced during code generation - * The description is used by the ejb-jar file producer to provide text describing the collection of relationships. - * - * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EJBJar getEjbJar() { - if (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR) return null; - return (EJBJar)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEjbJar(EJBJar newEjbJar) { - if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR && newEjbJar != null)) { - if (EcoreUtil.isAncestor(this, newEjbJar)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newEjbJar != null) - msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__EJB_JAR, newEjbJar, newEjbJar)); - } - - /** - * @generated This field/method will be replaced during code generation - * A list of ejb-relation elements, which specify the container managed - * relationships. - */ - public EList getEjbRelations() { - if (ejbRelations == null) { - ejbRelations = new EObjectContainmentWithInverseEList(EJBRelation.class, this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST); - } - return ejbRelations; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.RELATIONSHIPS__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.RELATIONSHIPS__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - return ((InternalEList)getEjbRelations()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.RELATIONSHIPS__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - return ((InternalEList)getEjbRelations()).basicRemove(otherEnd, msgs); - case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.RELATIONSHIPS__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.RELATIONSHIPS__DESCRIPTION: - return getDescription(); - case EjbPackage.RELATIONSHIPS__EJB_JAR: - return getEjbJar(); - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - return getEjbRelations(); - case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.RELATIONSHIPS__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.RELATIONSHIPS__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - return ejbRelations != null && !ejbRelations.isEmpty(); - case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.RELATIONSHIPS__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.RELATIONSHIPS__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - getEjbRelations().clear(); - getEjbRelations().addAll((Collection)newValue); - return; - case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.RELATIONSHIPS__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.RELATIONSHIPS__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: - getEjbRelations().clear(); - return; - case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredLocalRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredLocalRelationshipRoleFilter.java deleted file mode 100644 index 8cc4114f3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredLocalRelationshipRoleFilter.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collections; - -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; - - -/** - * Insert the type's description here. - * Creation date: (10/15/2001 11:35:00 AM) - * @author: Administrator - */ -public class RequiredLocalRelationshipRoleFilter extends AbstractRequiredRelationshipRoleFilter { - private static RequiredLocalRelationshipRoleFilter singleton; -protected java.util.List getRolesToFilter(ContainerManagedEntity cmp) { - EjbModuleExtensionHelper modHelper = getEjbModuleExtHelper(cmp); - if(modHelper != null) - return modHelper.getLocalRelationshipRoles_cmp11(cmp); - return Collections.EMPTY_LIST; -} -/** - * Insert the method's description here. - * Creation date: (8/6/2001 11:27:25 AM) - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredLocalRelationshipRoleFilter - */ -public static RequiredLocalRelationshipRoleFilter singleton() { - if (singleton == null) - singleton = new RequiredLocalRelationshipRoleFilter(); - return singleton; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredRelationshipRoleFilter.java deleted file mode 100644 index 6eab1b390..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RequiredRelationshipRoleFilter.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; - - -/** - * Insert the type's description here. Creation date: (8/6/2001 11:26:10 AM) - * @author: Administrator - */ -public class RequiredRelationshipRoleFilter extends ContainerManagedEntityFilter { - - private static RequiredRelationshipRoleFilter singleton; - - /** - * filter method comment. - */ - public List filter(ContainerManagedEntity cmp) { - List roles = new ArrayList(); - Iterator it = getRelationshipRoles(cmp).iterator(); - CommonRelationshipRole role; - while (it.hasNext()) { - role = (CommonRelationshipRole) it.next(); - if (shouldAddFilteredResult(role)) roles.add(role); - } - return roles; - } - - /** - * Return true if the multiplicity for @aRole is required. - */ - protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) { - return aRole.isRequired(); - } - - /** - * Insert the method's description here. Creation date: (8/6/2001 11:27:25 - * AM) - * - * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredRelationshipRoleFilter - */ - public static RequiredRelationshipRoleFilter singleton() { - if (singleton == null) singleton = new RequiredRelationshipRoleFilter(); - return singleton; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleShapeStrategy.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleShapeStrategy.java deleted file mode 100644 index d91141219..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleShapeStrategy.java +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy; - - -/** - * Insert the type's description here. - * Creation date: (11/6/2000 11:41:33 AM) - * @author: Administrator - */ -public abstract class RoleShapeStrategy implements IRoleShapeStrategy { - protected boolean busy = false; - protected CommonRelationshipRole role; - protected ArrayList visitedKeyTypes = new ArrayList(5); -/** - * FlattenedRoleShapeStrategy constructor comment. - */ -public RoleShapeStrategy(CommonRelationshipRole aRole) { - super(); - setRole(aRole); -} -protected String appendName(String fullName, String additionalName) { - return fullName + ATTRIBUTE_NAME_JOINER + additionalName; -} -protected boolean canContinue() { - return !busy && role.isForward() && role.getName() != null; -} -protected boolean canComputeNames() { - //return getRole().getOpposite() != null; - return true; -} -/** - * Insert the method's description here. - * Creation date: (11/16/00 9:19:27 PM) - * @return CommonRelationshipRole - */ -public CommonRelationshipRole getRole() { - return role; -} -/** - * Insert the method's description here. - * Creation date: (11/16/00 9:19:27 PM) - * @return CommonRelationshipRole - */ - -public boolean isFlat () { - return false; -} -public boolean isRound () { - return false; -} -/** - * Creates an appended name while uppercasing the first letter of the secondName. - */ -public static String makeJavaName(String firstName, String secondName) { - StringBuffer nameBuffer = new StringBuffer(firstName); - nameBuffer.append(Character.toUpperCase(secondName.charAt(0))); - for (int i = 1; i < secondName.length(); i++) - nameBuffer.append(secondName.charAt(i)); - return nameBuffer.toString(); -} -public void reconcileAttributes(List roleAttributes) { - if (canContinue()) { - busy = true; - String attributeName = getRole().getName(); - List computedNames = new ArrayList(); - if (canComputeNames()){ - visitedKeyTypes.clear(); - reconcileAttributes(getRole(), attributeName, roleAttributes, computedNames); - } - removeExtraAttributes(computedNames); - busy = false; - } -} -/** - * getFields method comment. - */ -protected abstract void reconcileAttributes(CommonRelationshipRole aRole, String attributeName, List aList, List computedNames); -/** - * Remove attributes from our role whose name is not contained in the list of - * @computedNames. Also, remove from the role's source EJB. - */ -protected void removeExtraAttributes(List computedNames) { - if (!getRole().getAttributes().isEmpty()) { - java.util.Iterator it = getRole().getAttributes().iterator(); - ContainerManagedEntity cmp = getRole().getSourceEntity(); - CMPAttribute attribute; - while (it.hasNext()) { - attribute = (CMPAttribute) it.next(); - if (computedNames.contains(attribute.getName())) - continue; - it.remove(); - cmp.getKeyAttributes().remove(attribute); - cmp.getPersistentAttributes().remove(attribute); - } - } -} -/** - * Insert the method's description here. - * Creation date: (11/16/00 9:19:27 PM) - * @param newRole com.ibm.ejs.models.base.extensions.ejbext.EjbRelationshipRole - */ -public void setRole(CommonRelationshipRole newRole) { - role = newRole; -} -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleSourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleSourceImpl.java deleted file mode 100644 index 4abb644b8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/RoleSourceImpl.java +++ /dev/null @@ -1,330 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.RoleSource; - - -/** - * Designates the source of a role that participates in a relationship. A relationship-role-source element uniquely identifies an entity bean. - * @invariant The content of each role-source element shall refer to an existing entity bean, entity bean reference. - */ -public class RoleSourceImpl extends EObjectImpl implements RoleSource, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected ContainerManagedEntity entityBean = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public RoleSourceImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getRoleSource(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EJBRelationshipRole getRole() { - if (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE) return null; - return (EJBRelationshipRole)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRole(EJBRelationshipRole newRole) { - if (newRole != eContainer || (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE && newRole != null)) { - if (EcoreUtil.isAncestor(this, newRole)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newRole != null) - msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.ROLE_SOURCE__ROLE, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ROLE, newRole, newRole)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public ContainerManagedEntity getEntityBean() { - if (entityBean != null && entityBean.eIsProxy()) { - ContainerManagedEntity oldEntityBean = entityBean; - entityBean = (ContainerManagedEntity)eResolveProxy((InternalEObject)entityBean); - if (entityBean != oldEntityBean) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean)); - } - } - return entityBean; - } - - /** - * - * - * @generated - */ - public ContainerManagedEntity basicGetEntityBean() { - return entityBean; - } - - /** - * - * - * @generated - */ - public void setEntityBean(ContainerManagedEntity newEntityBean) { - ContainerManagedEntity oldEntityBean = entityBean; - entityBean = newEntityBean; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ROLE_SOURCE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ROLE_SOURCE__ROLE: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.ROLE_SOURCE__ROLE, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.ROLE_SOURCE__ROLE: - return eBasicSetContainer(null, EjbPackage.ROLE_SOURCE__ROLE, msgs); - case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.ROLE_SOURCE__ROLE: - return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ROLE_SOURCE__DESCRIPTION: - return getDescription(); - case EjbPackage.ROLE_SOURCE__ROLE: - return getRole(); - case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: - if (resolve) return getEntityBean(); - return basicGetEntityBean(); - case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ROLE_SOURCE__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.ROLE_SOURCE__ROLE: - return getRole() != null; - case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: - return entityBean != null; - case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ROLE_SOURCE__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.ROLE_SOURCE__ROLE: - setRole((EJBRelationshipRole)newValue); - return; - case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: - setEntityBean((ContainerManagedEntity)newValue); - return; - case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.ROLE_SOURCE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.ROLE_SOURCE__ROLE: - setRole((EJBRelationshipRole)null); - return; - case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: - setEntityBean((ContainerManagedEntity)null); - return; - case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SessionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SessionImpl.java deleted file mode 100644 index b1c846906..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SessionImpl.java +++ /dev/null @@ -1,670 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.SecurityIdentity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Session; -import org.eclipse.jst.j2ee.ejb.SessionType; -import org.eclipse.jst.j2ee.ejb.TransactionType; - - -/** - * The session element declares an session bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a name assigned - * to the enterprise bean in the deployment description; the names of the session bean's home and remote interfaces, if any; the names of the session bean's local home and local interfaces, if any; the session bean's implementation class; the session bean's state management type; the session bean's transaction management type; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; and an optional declaration of the bean's resource environment references. The elements that are optional are "optional" in the sense that they are omitted when if lists represented by them are empty. - */ -public class SessionImpl extends EnterpriseBeanImpl implements Session, EnterpriseBean { - - /** - * The default value of the '{@link #getTransactionType() Transaction Type}' attribute. - * - * - * @see #getTransactionType() - * @generated - * @ordered - */ - protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT; - /** - * This is true if the Transaction Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transactionTypeESet = false; - - /** - * The default value of the '{@link #getSessionType() Session Type}' attribute. - * - * - * @see #getSessionType() - * @generated - * @ordered - */ - protected static final SessionType SESSION_TYPE_EDEFAULT = SessionType.STATEFUL_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected SessionType sessionType = SESSION_TYPE_EDEFAULT; - /** - * This is true if the Session Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean sessionTypeESet = false; - - /** - * The cached value of the '{@link #getServiceEndpoint() Service Endpoint}' reference. - * - * - * @see #getServiceEndpoint() - * @generated - * @ordered - */ - protected JavaClass serviceEndpoint = null; - - public SessionImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return EjbPackage.eINSTANCE.getSession(); - } - - public boolean isSession() { - return true; - } - /** - * @generated This field/method will be replaced during code generation - * The transaction-type element specifies an enterprise bean's transaction management type. - * - - */ - public TransactionType getTransactionType() { - return transactionType; - } - - /** - * - * - * @generated - */ - public void setTransactionType(TransactionType newTransactionType) { - TransactionType oldTransactionType = transactionType; - transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType; - boolean oldTransactionTypeESet = transactionTypeESet; - transactionTypeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransactionType() { - TransactionType oldTransactionType = transactionType; - boolean oldTransactionTypeESet = transactionTypeESet; - transactionType = TRANSACTION_TYPE_EDEFAULT; - transactionTypeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransactionType() { - return transactionTypeESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public SessionType getSessionType() { - return sessionType; - } - - /** - * - * - * @generated - */ - public void setSessionType(SessionType newSessionType) { - SessionType oldSessionType = sessionType; - sessionType = newSessionType == null ? SESSION_TYPE_EDEFAULT : newSessionType; - boolean oldSessionTypeESet = sessionTypeESet; - sessionTypeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, sessionType, !oldSessionTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetSessionType() { - SessionType oldSessionType = sessionType; - boolean oldSessionTypeESet = sessionTypeESet; - sessionType = SESSION_TYPE_EDEFAULT; - sessionTypeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, SESSION_TYPE_EDEFAULT, oldSessionTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetSessionType() { - return sessionTypeESet; - } - - /** - * - * - * @generated - */ - public JavaClass getServiceEndpoint() { - if (serviceEndpoint != null && serviceEndpoint.eIsProxy()) { - JavaClass oldServiceEndpoint = serviceEndpoint; - serviceEndpoint = (JavaClass)eResolveProxy((InternalEObject)serviceEndpoint); - if (serviceEndpoint != oldServiceEndpoint) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint)); - } - } - return serviceEndpoint; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetServiceEndpoint() { - return serviceEndpoint; - } - - /** - * - * - * @generated - */ - public void setServiceEndpoint(JavaClass newServiceEndpoint) { - JavaClass oldServiceEndpoint = serviceEndpoint; - serviceEndpoint = newServiceEndpoint; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.SESSION__EJB_JAR: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, EjbPackage.SESSION__EJB_JAR, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case EjbPackage.SESSION__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case EjbPackage.SESSION__EJB_JAR: - return eBasicSetContainer(null, EjbPackage.SESSION__EJB_JAR, msgs); - case EjbPackage.SESSION__SECURITY_IDENTITY: - return basicSetSecurityIdentity(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case EjbPackage.SESSION__EJB_JAR: - return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.SESSION__ICONS: - return getIcons(); - case EjbPackage.SESSION__DISPLAY_NAMES: - return getDisplayNames(); - case EjbPackage.SESSION__DESCRIPTIONS: - return getDescriptions(); - case EjbPackage.SESSION__SMALL_ICON: - return getSmallIcon(); - case EjbPackage.SESSION__LARGE_ICON: - return getLargeIcon(); - case EjbPackage.SESSION__DESCRIPTION: - return getDescription(); - case EjbPackage.SESSION__DISPLAY_NAME: - return getDisplayName(); - case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case EjbPackage.SESSION__RESOURCE_REFS: - return getResourceRefs(); - case EjbPackage.SESSION__EJB_REFS: - return getEjbRefs(); - case EjbPackage.SESSION__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case EjbPackage.SESSION__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case EjbPackage.SESSION__SERVICE_REFS: - return getServiceRefs(); - case EjbPackage.SESSION__NAME: - return getName(); - case EjbPackage.SESSION__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case EjbPackage.SESSION__EJB_CLASS: - if (resolve) return getEjbClass(); - return basicGetEjbClass(); - case EjbPackage.SESSION__HOME_INTERFACE: - if (resolve) return getHomeInterface(); - return basicGetHomeInterface(); - case EjbPackage.SESSION__REMOTE_INTERFACE: - if (resolve) return getRemoteInterface(); - return basicGetRemoteInterface(); - case EjbPackage.SESSION__EJB_JAR: - return getEjbJar(); - case EjbPackage.SESSION__SECURITY_IDENTITY: - return getSecurityIdentity(); - case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: - if (resolve) return getLocalHomeInterface(); - return basicGetLocalHomeInterface(); - case EjbPackage.SESSION__LOCAL_INTERFACE: - if (resolve) return getLocalInterface(); - return basicGetLocalInterface(); - case EjbPackage.SESSION__TRANSACTION_TYPE: - return getTransactionType(); - case EjbPackage.SESSION__SESSION_TYPE: - return getSessionType(); - case EjbPackage.SESSION__SERVICE_ENDPOINT: - if (resolve) return getServiceEndpoint(); - return basicGetServiceEndpoint(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.SESSION__ICONS: - return icons != null && !icons.isEmpty(); - case EjbPackage.SESSION__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case EjbPackage.SESSION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case EjbPackage.SESSION__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case EjbPackage.SESSION__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case EjbPackage.SESSION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case EjbPackage.SESSION__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case EjbPackage.SESSION__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case EjbPackage.SESSION__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case EjbPackage.SESSION__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case EjbPackage.SESSION__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case EjbPackage.SESSION__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case EjbPackage.SESSION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case EjbPackage.SESSION__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case EjbPackage.SESSION__EJB_CLASS: - return ejbClass != null; - case EjbPackage.SESSION__HOME_INTERFACE: - return homeInterface != null; - case EjbPackage.SESSION__REMOTE_INTERFACE: - return remoteInterface != null; - case EjbPackage.SESSION__EJB_JAR: - return getEjbJar() != null; - case EjbPackage.SESSION__SECURITY_IDENTITY: - return securityIdentity != null; - case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: - return localHomeInterface != null; - case EjbPackage.SESSION__LOCAL_INTERFACE: - return localInterface != null; - case EjbPackage.SESSION__TRANSACTION_TYPE: - return isSetTransactionType(); - case EjbPackage.SESSION__SESSION_TYPE: - return isSetSessionType(); - case EjbPackage.SESSION__SERVICE_ENDPOINT: - return serviceEndpoint != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.SESSION__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case EjbPackage.SESSION__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case EjbPackage.SESSION__DESCRIPTION: - setDescription((String)newValue); - return; - case EjbPackage.SESSION__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__NAME: - setName((String)newValue); - return; - case EjbPackage.SESSION__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case EjbPackage.SESSION__EJB_CLASS: - setEjbClass((JavaClass)newValue); - return; - case EjbPackage.SESSION__HOME_INTERFACE: - setHomeInterface((JavaClass)newValue); - return; - case EjbPackage.SESSION__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)newValue); - return; - case EjbPackage.SESSION__EJB_JAR: - setEjbJar((EJBJar)newValue); - return; - case EjbPackage.SESSION__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)newValue); - return; - case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)newValue); - return; - case EjbPackage.SESSION__LOCAL_INTERFACE: - setLocalInterface((JavaClass)newValue); - return; - case EjbPackage.SESSION__TRANSACTION_TYPE: - setTransactionType((TransactionType)newValue); - return; - case EjbPackage.SESSION__SESSION_TYPE: - setSessionType((SessionType)newValue); - return; - case EjbPackage.SESSION__SERVICE_ENDPOINT: - setServiceEndpoint((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case EjbPackage.SESSION__ICONS: - getIcons().clear(); - return; - case EjbPackage.SESSION__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case EjbPackage.SESSION__DESCRIPTIONS: - getDescriptions().clear(); - return; - case EjbPackage.SESSION__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case EjbPackage.SESSION__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case EjbPackage.SESSION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case EjbPackage.SESSION__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case EjbPackage.SESSION__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case EjbPackage.SESSION__EJB_REFS: - getEjbRefs().clear(); - return; - case EjbPackage.SESSION__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case EjbPackage.SESSION__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case EjbPackage.SESSION__SERVICE_REFS: - getServiceRefs().clear(); - return; - case EjbPackage.SESSION__NAME: - setName(NAME_EDEFAULT); - return; - case EjbPackage.SESSION__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case EjbPackage.SESSION__EJB_CLASS: - setEjbClass((JavaClass)null); - return; - case EjbPackage.SESSION__HOME_INTERFACE: - setHomeInterface((JavaClass)null); - return; - case EjbPackage.SESSION__REMOTE_INTERFACE: - setRemoteInterface((JavaClass)null); - return; - case EjbPackage.SESSION__EJB_JAR: - setEjbJar((EJBJar)null); - return; - case EjbPackage.SESSION__SECURITY_IDENTITY: - setSecurityIdentity((SecurityIdentity)null); - return; - case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: - setLocalHomeInterface((JavaClass)null); - return; - case EjbPackage.SESSION__LOCAL_INTERFACE: - setLocalInterface((JavaClass)null); - return; - case EjbPackage.SESSION__TRANSACTION_TYPE: - unsetTransactionType(); - return; - case EjbPackage.SESSION__SESSION_TYPE: - unsetSessionType(); - return; - case EjbPackage.SESSION__SERVICE_ENDPOINT: - setServiceEndpoint((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (transactionType: "); //$NON-NLS-1$ - if (transactionTypeESet) result.append(transactionType); else result.append(""); //$NON-NLS-1$ - result.append(", sessionType: "); //$NON-NLS-1$ - if (sessionTypeESet) result.append(sessionType); else result.append(""); //$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.Session#setServiceEndpointName(java.lang.String) - */ - public void setServiceEndpointName(String serviceEndpointName) { - eSet(EjbPackage.eINSTANCE.getSession_ServiceEndpoint(), createClassRef(serviceEndpointName)); - } - /* - * @see EnterpriseBean#hasLocalClient() - */ - public boolean hasServiceEndpoint() { - return getServiceEndpoint() != null; - } - public String getServiceEndpointName() { - getServiceEndpoint(); - return serviceEndpoint == null ? null : serviceEndpoint.getQualifiedName(); - } -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SupertypeCMPAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SupertypeCMPAttributeFilter.java deleted file mode 100644 index c3b64c2e2..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/impl/SupertypeCMPAttributeFilter.java +++ /dev/null @@ -1,117 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.impl; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; - - -/** - * Insert the type's description here. - * Creation date: (11/28/2000 6:54:26 PM) - * @author: Administrator - */ -public abstract class SupertypeCMPAttributeFilter extends ContainerManagedEntityFilter { -/** - * SupertypeCMPAttributeFilter constructor comment. - */ -public SupertypeCMPAttributeFilter() { - super(); -} -/** - * filter method comment. - */ -public List filter(ContainerManagedEntity cmp) { - ContainerManagedEntity supertype = null; - EjbModuleExtensionHelper extensionHelper = getEjbModuleExtHelper(cmp); - if(extensionHelper != null) - supertype = (ContainerManagedEntity)extensionHelper.getSuperType(cmp); - if (supertype == null) - return getSourceAttributes(cmp); - return filterUsingSupertype(cmp, supertype); -} -/** - * filter method comment. - */ -protected java.util.List filterUsingSupertype(ContainerManagedEntity cmp, ContainerManagedEntity supertype) { - ContainerManagedEntity superEntity = supertype; - List result = new ArrayList(); - Iterator it = getSourceAttributes(cmp).iterator(); - CMPAttribute attribute; - while (it.hasNext()) { - attribute = (CMPAttribute) it.next(); - if (!isSupertypeAttribute(superEntity, attribute)) - result.add(attribute); - } - return result; -} -/** - * Return the proper list of attributes from cmpExt. - */ -protected abstract java.util.List getSourceAttributes(ContainerManagedEntity cmp) ; -/** - * Return a boolean indicating whether anAttribute also exists in the superEntity. - */ -protected abstract boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) ; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPFieldDescriptor.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPFieldDescriptor.java deleted file mode 100644 index 3913dbf45..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPFieldDescriptor.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -/** - * A parameter descriptor is used to describe a method parameter. - * It holds the parameter name and type. The type is held in - * Java readable form (not a signature). - */ -public class CMPFieldDescriptor { - private String fType = null; - private String fName = null; -/** - * JavaParameterDescriptor default constructor. - */ -public CMPFieldDescriptor() { - super(); -} -/** - * @return the parameter name. - */ -public String getName() { - return fName; -} -/** - * Returns the parameter type. - * @return The parameter type in Java readable form (not a signature) - */ -public String getType() { - return fType; -} -/** - * Sets the parameter name. - */ -public void setName(String newName) { - fName = (newName == null) ? null : newName.trim(); -} -/** - * Sets the parameter type. - * @param newType The parameter name in Java readable form (not a signature) - */ -public void setType(String newType) { - fType = (newType == null) ? null : newType.trim(); -} -/** - * Returns "type name". The {@link JavaParameterDescriptor#getType()} - * and {@link JavaParameterDescriptor#getName()} methods are used - * to build the result. - */ -public String toString() { - StringBuffer sb = new StringBuffer(100); - sb.append(getType()); - sb.append(' '); - sb.append(getName()); - return sb.toString(); -} -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPHelper.java deleted file mode 100644 index 501a4fcc9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPHelper.java +++ /dev/null @@ -1,263 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaParameter; -import org.eclipse.jem.java.JavaVisibilityKind; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; - - -public class CMPHelper { - - public static final String GET = "get"; //$NON-NLS-1$ - public static final String SET = "set"; //$NON-NLS-1$ - protected static Comparator methodComparator = new Comparator() { - /** - * @see Comparator#compare(Object, Object) - */ - public int compare(Object o1, Object o2) { - Method m1 = (Method) o1; - Method m2 = (Method) o2; - String s1 = m1.getName(); - String s2 = m2.getName(); - if (s1 == null) - return "".compareTo(s2); //$NON-NLS-1$ - return s1.compareTo(s2); - } - }; - - public interface CMPFieldExistTester { - boolean isExisting(Field aField); - boolean isExisting(Method aMethod); - }; - - protected CMPHelper() { - super(); - } - - /** - * For CMP 2.0 beans, the bean class is abstract and - * contains abstract get/set methods for the fields - * This infers the those fields based on the get/set methods - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass) { - return getAvailableCMP20FieldDescriptors(beanClass, null); - } - - /** - * For CMP 2.0 beans, the bean class is abstract and - * contains abstract get/set methods for the fields - * This infers the those fields based on the get/set methods - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) { - if (beanClass == null) - return Collections.EMPTY_LIST; - List result = new ArrayList(); - Map getters = new HashMap(); - List methods = beanClass.getPublicMethodsExtended(); - Collections.sort(methods, methodComparator); - for (int i = 0; i < methods.size(); i++) { - Method aMethod = (Method) methods.get(i); - if (isGetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic() && - (fieldTester == null || fieldTester.isExisting(aMethod))) - getters.put(getFieldName(aMethod), aMethod); - else if (isSetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic()) { - String fieldName = getFieldName(aMethod); - Method getter = (Method) getters.get(fieldName); - if (typesAgree(getter, aMethod)) { - String typeName = getReturnTypeName(getter); - if (typeName != null && (fieldTester == null || fieldTester.isExisting(getter))) - result.add(createFieldDescriptor(fieldName, typeName)); - } - } - } - return result; - } - - /** - * For CMP 1.1 beans, the list is simply the fields, extended, - * on the bean class - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass) { - return getAvailableCMP11FieldDescriptors(beanClass, null); - } - - /** - * For CMP 1.1 beans, the list is simply the fields, extended, - * on the bean class - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) { - if (beanClass == null) - return Collections.EMPTY_LIST; - List fields = beanClass.getFieldsExtended(); - List result = new ArrayList(); - for (int i = 0; i < fields.size(); i++) { - Field aField = (Field) fields.get(i); - if (!isPublic(aField) || aField.isStatic() || aField.isTransient() || - (fieldTester != null && !fieldTester.isExisting(aField))) - continue; - String name = aField.getName(); - String typeName = getTypeName(aField); - if (typeName != null && name != null) - result.add(createFieldDescriptor(name, typeName)); - } - return result; - } - - /** - * Get a list of available cmp fields for the CMP bean; if the bean - * is v1.1, this is the fields on the bean class; if it is 2.0, this - * is defined by the abstract get/set methods on the bean class - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean) { - return getAvailableCMPFieldDescriptors(cmpBean, null); - } - - /** - * Get a list of available cmp fields for the CMP bean; if the bean - * is v1.1, this is the fields on the bean class; if it is 2.0, this - * is defined by the abstract get/set methods on the bean class - * - * @return java.util.List of {@link CMPFieldDescriptor} - */ - public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean, CMPHelper.CMPFieldExistTester fieldTester) { - JavaClass beanClass = cmpBean.getEjbClass(); - if (beanClass == null) - return Collections.EMPTY_LIST; - switch(cmpBean.getVersionID()) { - case J2EEVersionConstants.EJB_1_0_ID: - case J2EEVersionConstants.EJB_1_1_ID: - return getAvailableCMP11FieldDescriptors(beanClass, fieldTester); - case J2EEVersionConstants.EJB_2_0_ID: - case J2EEVersionConstants.EJB_2_1_ID: default: - return getAvailableCMP20FieldDescriptors(beanClass, fieldTester); - } - } - - /** - * Does the method name start with "get", and is the method a zero arg - * method, that does not return void? - */ - protected static boolean isGetter(Method aMethod) { - String name = aMethod.getName(); - return name != null && - name.startsWith(GET) && - name.length() > 3 && - aMethod.listParametersWithoutReturn().length==0 && - !aMethod.isVoid(); - } - - - /** - * Does the method name start with "get", and is the method a one arg - * method, that is void - */ - protected static boolean isSetter(Method aMethod) { - String name = aMethod.getName(); - return name != null && - name.startsWith(SET) && - name.length() > 3 && - aMethod.listParametersWithoutReturn().length == 1 && - aMethod.isVoid(); - } - - protected static String getFieldName(Method aMethod) { - if (aMethod == null) - return null; - - return getFieldName(aMethod.getName()); - } - - public static String getFieldName(String methodName) { - if (methodName == null) - return null; - StringBuffer sb = new StringBuffer(methodName); - sb.delete(0, 3); - char lower = Character.toLowerCase(sb.charAt(0)); - sb.setCharAt(0, lower); - return sb.toString(); - } - - protected static String getReturnTypeName(Method getter) { - if (getter == null) - return null; - JavaHelpers retType = getter.getReturnType(); - return getTypeName(retType); - } - - protected static String getTypeName(Field aField) { - if (aField == null) - return null; - JavaHelpers type = (JavaHelpers)aField.getEType(); - return getTypeName(type); - } - - protected static String getTypeName(JavaHelpers helpers) { - if (helpers == null) - return null; - return helpers.getQualifiedName(); - } - /** - * Precondition: setter must take one parameter, and getter must return - * a type, not void - */ - protected static boolean typesAgree(Method getter, Method setter) { - if (getter == null || getter.isVoid() || setter == null) - return false; - - JavaParameter[] parameters = setter.listParametersWithoutReturn(); - if (parameters.length != 1) - return false; - - JavaParameter param = parameters[0]; - return param.getEType() != null && - param.getEType() == getter.getReturnType(); - } - - protected static CMPFieldDescriptor createFieldDescriptor(String name, String typeName) { - CMPFieldDescriptor desc = new CMPFieldDescriptor(); - desc.setName(name); - desc.setType(typeName); - return desc; - } - - protected static boolean isPublic(Field field) { - if (field == null) - return false; - return (JavaVisibilityKind.PUBLIC_LITERAL.getValue() == field.getJavaVisibility().getValue()); - } - - - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPKeySynchronizationAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPKeySynchronizationAdapter.java deleted file mode 100644 index a2e3c08b9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/CMPKeySynchronizationAdapter.java +++ /dev/null @@ -1,398 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Oct 24, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.ejb.util; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jem.java.Field; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaVisibilityKind; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EjbFactory; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.ContainerManagedEntityImpl; - - -/** - * @author jlanuti - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class CMPKeySynchronizationAdapter extends AdapterImpl { - - public static final String ADAPTER_TYPE = CMPKeySynchronizationAdapter.class.getName(); - - private boolean initialized = false; - - protected ContainerManagedEntity cmp = null; - private boolean isUpdating = false; - private boolean isEnabled = true; - - /** - * Default constructor - */ - public CMPKeySynchronizationAdapter(ContainerManagedEntity cmp) { - super(); - this.cmp = cmp; - } - - /** - * If the keyAttributes list is empty, try to reflect - * the keyAttributes from the fields of the primaryKey class. - */ - public void initializeKeyAttributes() { - if(cmp == null || initialized) - return; - - Resource res = cmp.eResource(); - if(res == null) - return; - - boolean cachedIsModified = res.isModified(); - - try { - // Handle primkeyfield scenario - if (cmp.getPrimKeyField()!=null) - initializeForPrimKey(); - - // Handle compound key scenario - else - initializeForCompoundKey(); - } finally { - res.setModified(cachedIsModified); - } - - initialized = true; - } - - protected void initializeForPrimKey() { - // Ensure the key attributes list contains only the primKeyField attribute - if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(cmp.getPrimKeyField()))) - primKeyFieldChanged(cmp.getPrimKeyField()); - } - - protected void initializeForCompoundKey() { - List keys = getKeyAttributes(); - // clear key list - keys.clear(); - //ensure the key class is not null - JavaClass keyClass = cmp.getPrimaryKey(); - if (keyClass == null) - return; - keyClass.eAdapters().add(this); - - // reflect key fields into key attributes list - List keyFields = keyClass.getFieldsExtended(); - for (int i = 0; i < keyFields.size(); i++) { - Field field = (Field) keyFields.get(i); - if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields - CMPAttribute keyAttribute = cmp.getPersistentAttribute(field.getName()); - if (keyAttribute != null) - keys.add(keyAttribute); - } - } - } - - public void notifyChanged(Notification notification) { - if (isUpdating || !isEnabled) return; //we don't want to react to our own changes - try { - isUpdating = true; - EClass featureClass = ((EObject)notification.getNotifier()).eClass(); - if (EjbPackage.eINSTANCE.getContainerManagedEntity().equals(featureClass)) { - switch (notification.getFeatureID(ContainerManagedEntity.class)) { - // handle if cmp attribute is updated, added, removed - case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES : { - handleCMPAttributeEvent(notification); - break; - } - // handle the key attributes list is updated programatically - case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES : { - handleCMPAttributeEvent(notification); - break; - } - // handle if the key class is changed,added, removed - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY : { - handleKeyClassEvent(notification); - break; - } - // handle prim key field sets, adds, removes - case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD : { - handlePrimKeyFieldEvent(notification); - break; - } - } - } else if (EjbPackage.eINSTANCE.getCMPAttribute().equals(featureClass)) { - switch (notification.getFeatureID(CMPAttribute.class)) { - // handle a set or change of an attribute name - case (EjbPackage.CMP_ATTRIBUTE__NAME) : { - handleCMPAttributeRenameEvent((CMPAttribute)notification.getNotifier(), notification.getOldValue()); - break; - } - } - } - } finally { - // restore initial notification state - isUpdating = false; - } - } - - /** - * @param attribute - */ - private void handleCMPAttributeRenameEvent(CMPAttribute attribute, Object oldValue) { - // if renamed attribute was in key and is not anymore, remove it from key list - if (getKeyAttributes().contains(attribute)) { - if (!isAttributeKeyClassField(attribute.getName())) - removeKeyAttribute(attribute,(String)oldValue); - } - // if renamed attribute is now part of the key, add it to the key list - else - attributeAdded(attribute); - } - - /** - * @param notification - */ - private void handlePrimKeyFieldEvent(Notification notification) { - EObject newPrimKeyField = (EObject)notification.getNewValue(); - cmp.setPrimKeyField((CMPAttribute)newPrimKeyField); - // if primKeyField is removed or a proxy, recompute key attributes based on key class - if (newPrimKeyField == null || newPrimKeyField.eIsProxy()) { - CMPAttribute primField = (CMPAttribute)newPrimKeyField; - if (primField!=null && primField.getName() == null) { - primField.setName(((InternalEObject)primField).eProxyURI().toString()); - makePrimKeyFieldProxy(primField.getName()); - } - removeAllKeyAttributes(); - initialized = false; - initializeKeyAttributes(); - } - // Ensure the key attributes list contains only the primKeyField attribute - else if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(newPrimKeyField))) { - primKeyFieldChanged(newPrimKeyField); - } - - } - - /** - * @param notification - */ - private void handleKeyClassEvent(Notification notification) { - // if primkey null or proxy, clear key fields and reinitialize if key class not null - if (cmp.getPrimKeyField()==null || cmp.getPrimKeyField().eIsProxy()) { - keyClassChanged(); - } - // if primkey is not null, then do nothing - - } - - /** - * @param notification - */ - private void handleCMPAttributeEvent(Notification notification) { - int eventType = notification.getEventType(); - // handle a CMPAttribute added - if (eventType == Notification.ADD) { - attributeAdded((CMPAttribute)notification.getNewValue()); - } - // handle a CMPAttribute removed - else if (eventType == Notification.REMOVE) { - CMPAttribute attribute = (CMPAttribute)notification.getOldValue(); - // remove this adapter from the deleted attribute - attribute.eAdapters().remove(this); - removeKeyAttribute(attribute, attribute.getName()); - - } - } - - protected void removeKeyAttribute(CMPAttribute attribute, String oldName) { - - // if attribute was a key attribute it will be removed, otherwise do nothing - getKeyAttributes().remove(attribute); - - // if it is the prim key attribute, then make the prim key attribute a proxy - if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().equals(attribute)) { - makePrimKeyFieldProxy(oldName); - } - - } - - public void makePrimKeyFieldProxy(String oldName) { - if (cmp.getPrimKeyField() == null) return; - cmp.setPrimKeyField(EjbFactory.eINSTANCE.createCMPAttribute()); - cmp.getPrimKeyField().setName(oldName); - ((InternalEObject)cmp.getPrimKeyField()).eSetProxyURI(URI.createURI(oldName)); - - } - - protected void removeAllKeyAttributes() { - // clear key attributes list on cmp - getKeyAttributes().clear(); - } - - protected void addKeyAttribute(CMPAttribute attribute) { - - CMPAttribute primKeyField = cmp.getPrimKeyField(); - // if prim key is null add attribute to key list - if (primKeyField==null || primKeyField.eIsProxy()) { - if (!getKeyAttributes().contains(attribute)) - getKeyAttributes().add(attribute); - // if att is only key att, and type is the key class type, set the prim key field - if (getKeyAttributes().size()==1 && attribute.getType().equals(cmp.getPrimaryKey())) - cmp.setPrimKeyField(attribute); - } - // if primkey set + primkeyfield is the new attribute ensure its the only one - else if (primKeyField.equals(attribute)) { - if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(attribute))) { - getKeyAttributes().clear(); - getKeyAttributes().add(attribute); - } - } - // if primkey set,new attribute not prim key, key atts > 1, remove primkey field - else { - cmp.setPrimKeyField(null); - if (!getKeyAttributes().contains(attribute)) - getKeyAttributes().add(attribute); - } - } - - protected void attributeAdded(CMPAttribute attribute) { - //Make sure cmp key adapters are initialized if needed - cmp.getKeyAttributes(); - - // add this as a listener to name changes on this attribute - if (!attribute.eAdapters().contains(this)) - attribute.eAdapters().add(this); - - if (attribute.getName() ==null) return; - // add it to the key list if applicable and sort the key list - if (isAttributeKeyClassField(attribute.getName())) { - addKeyAttribute(attribute); - sortKeyAttributeList(); - } - // if new attribute name is now prim key name, fix up prim key field - else if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().eIsProxy() && attribute.getName().equals(cmp.getPrimKeyField().getName())) { - cmp.setPrimKeyField(attribute); - primKeyFieldChanged(attribute); - } - } - - - /** - * Is the cmp attribute also a field in the key class? - */ - protected boolean isAttributeKeyClassField(String attributeName) { - // ensure key class is not null - JavaClass keyClass = cmp.getPrimaryKey(); - if (keyClass == null) - return false; - // see if the attribute name matchs any of the reflected key class public field names - List keyFields = keyClass.getFieldsExtended(); - for (int i = 0; i < keyFields.size(); i++) { - Field field = (Field) keyFields.get(i); - if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { - if (field.getName().equals(attributeName)) - return true; - } - } - return false; - } - - /** - * Sort the list of the key attributes to match the order of the key class - */ - private void sortKeyAttributeList() { - - List result = new ArrayList(); - JavaClass keyClass = cmp.getPrimaryKey(); - if (keyClass == null) return; - List keyFields = keyClass.getFieldsExtended(); - List currentKeys = getKeyAttributes(); - - // create a new list of the attributes in order of key class fields. - for (int i = 0; i < keyFields.size(); i++) { - Field field = (Field) keyFields.get(i); - if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields - for (int j=0; j 1) { - //remove one force a disconnect - getRelationship().getCommonRoles().remove(0); - } - } - /** - * Add this Adapter to @aRole and the ContainerManagedEntity - * that the ContainerManagedEntityExtension container is pointing to. - * This only works if @aRole is contained. - */ - protected void addAdaptors(CommonRelationshipRole aRole) { - removeAdaptors(aRole); //to ensure this adapter is not added twice - aRole.eAdapters().add(this); - ContainerManagedEntity cmp = aRole.getSourceEntity(); - if (cmp != null) - cmp.eAdapters().add(this); - } - /** - * Remove this Adapter from @aRole and the ContainerManagedEntity - * that the ContainerManagedEntityExtension container is pointing to. - * This only works if @aRole is contained. - */ - protected void removeAdaptors(CommonRelationshipRole aRole) { - aRole.eAdapters().remove(this); - ContainerManagedEntity cmp = aRole.getSourceEntity(); - if (cmp != null) - cmp.eAdapters().remove(this); - } - protected void addedRole(CommonRelationshipRole aRole) { - addAdaptors(aRole); - if ((getRelationship().eContainer() != null) && rolesFullyReflected()) - reconcileRoleAttributes(); - } - protected boolean rolesFullyReflected() { - List roles = getRelationship().getCommonRoles(); - if (roles.isEmpty()) - return false; - CommonRelationshipRole role = null; - for (int i = 0; i < roles.size(); i++) { - role = (CommonRelationshipRole) roles.get(i); - if (role.getSourceEntity() == null) - return false; - } - return true; - } - - protected void removedRole(CommonRelationshipRole aRole) { - removeAdaptors(aRole); - if (getRelationship().eContainer() != null) { - aRole.reconcileAttributes(); - reconcileRoleAttributes(); - } - } - - /* (non-Javadoc) - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#setTarget(org.eclipse.emf.common.notify.Notifier) - */ - public void setTarget(Notifier notifier) { - //Only set the target if it is a CommonRelationship - if (notifier == null || notifier instanceof CommonRelationship) - super.setTarget(notifier); - } - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/ConvertedEJBAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/ConvertedEJBAdapter.java deleted file mode 100644 index c419cd2b9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/ConvertedEJBAdapter.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import org.eclipse.emf.common.notify.impl.AdapterImpl; - -public class ConvertedEJBAdapter extends AdapterImpl { - - public static final String ADAPTER_KEY = "ConvertedEJBAdpater"; //$NON-NLS-1$ - public static final int VERSION_1_0 = 1; - - protected int version = -1; - protected boolean readOnly = false; - - - /** - * Constructor for ConvertedEJBAdapter. - */ - public ConvertedEJBAdapter() { - super(); - } - - /** - * Gets the version. This will be one of the static constants. - * @return Returns a int - */ - public int getVersion() { - return version; - } - - /** - * Sets the version. This should be one of the static constants. - * @param version The version to set - */ - public void setVersion(int version) { - this.version = version; - } - - /** - * Gets the readOnly. - * @return Returns a boolean - */ - public boolean isReadOnly() { - return readOnly; - } - - /** - * Sets the readOnly. - * @param readOnly The readOnly to set - */ - public void setReadOnly(boolean readOnly) { - this.readOnly = readOnly; - } - - public boolean isFromVersion1_0() { - return version == VERSION_1_0; - } - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBAttributeMaintenanceFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBAttributeMaintenanceFactoryImpl.java deleted file mode 100644 index 7a8d988e1..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBAttributeMaintenanceFactoryImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; - - -public class EJBAttributeMaintenanceFactoryImpl extends EjbAdapterFactory { - public static final String ADAPTER_KEY = "EJBAttributeMaintenance"; //$NON-NLS-1$ - - public EJBAttributeMaintenanceFactoryImpl() { - super(); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.ejb.util.EjbAdapterFactory#createAdapter(org.eclipse.emf.common.notify.Notifier) - */ - public Adapter createAdapter(Notifier target) { - Adapter targetAdapter = (Adapter) modelSwitch.doSwitch((EObject)target); - return ExtendedEcoreUtil.createAdapterForLoading(targetAdapter, (EObject) target); - } - - - public Adapter createEJBRelationAdapter() { - return new EJBRelationAttributeMaintenanceAdapter(); - } - - public Adapter createRelationshipsAdapter() { - return new RelationshipsAttributeMaintenanceAdapter(); - } - - public boolean isFactoryForType(Object type) { - return ADAPTER_KEY == type; - } -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBRelationAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBRelationAttributeMaintenanceAdapter.java deleted file mode 100644 index 17f594efc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EJBRelationAttributeMaintenanceAdapter.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import org.eclipse.emf.ecore.EObject; - -public class EJBRelationAttributeMaintenanceAdapter extends CommonRelationshipAttributeMaintenanceAdapter { - /** - * Constructor for EJBRelationAttributeMaintenanceAdapter. - * @param aRelationship - */ - public EJBRelationAttributeMaintenanceAdapter() { - super(); - } - - /** - * @see org.eclipse.jst.j2ee.internal.ejb.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipRolesSF(EObject) - */ - protected boolean isRelationshipRolesSF(EObject sf) { - return sf == EJB_PACK.getEJBRelation_RelationshipRoles(); - } - - /** - * @see org.eclipse.jst.j2ee.internal.ejb.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipsSF(EObject) - */ - protected boolean isRelationshipsSF(EObject sf) { - return sf == EJB_PACK.getRelationships_EjbRelations(); - } - - /** - * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(Object) - */ - public boolean isAdapterForType(Object type) { - return EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY == type; - } - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbAdapterFactory.java deleted file mode 100644 index 5e564284a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbAdapterFactory.java +++ /dev/null @@ -1,607 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.ETypedElement; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.Relationships; -import org.eclipse.jst.j2ee.ejb.RoleSource; -import org.eclipse.jst.j2ee.ejb.Session; - -public class EjbAdapterFactory extends AdapterFactoryImpl { - protected static EjbPackage modelPackage; - public EjbAdapterFactory() { - if (modelPackage == null) { - modelPackage = (EjbPackage) EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject) type).eClass().eContainer() == modelPackage; - } - return false; - } - protected EjbSwitch sw = new EjbSwitch() { - public Object caseMethodPermission(MethodPermission object) { - return createMethodPermissionAdapter(); - } - public Object caseAssemblyDescriptor(AssemblyDescriptor object) { - return createAssemblyDescriptorAdapter(); - } - public Object caseMethodTransaction(MethodTransaction object) { - return createMethodTransactionAdapter(); - } - public Object caseEnterpriseBean(EnterpriseBean object) { - return createEnterpriseBeanAdapter(); - } - public Object caseEntity(Entity object) { - return createEntityAdapter(); - } - public Object caseContainerManagedEntity(ContainerManagedEntity object) { - return createContainerManagedEntityAdapter(); - } - public Object caseCMPAttribute(CMPAttribute object) { - return createCMPAttributeAdapter(); - } - public Object caseCMRField(CMRField object) { - return createCMRFieldAdapter(); - } - public Object caseEJBRelationshipRole(EJBRelationshipRole object) { - return createEJBRelationshipRoleAdapter(); - } - public Object caseEJBRelation(EJBRelation object) { - return createEJBRelationAdapter(); - } - public Object caseRelationships(Relationships object) { - return createRelationshipsAdapter(); - } - public Object caseEJBJar(EJBJar object) { - return createEJBJarAdapter(); - } - public Object caseRoleSource(RoleSource object) { - return createRoleSourceAdapter(); - } - public Object caseQuery(Query object) { - return createQueryAdapter(); - } - public Object caseQueryMethod(QueryMethod object) { - return createQueryMethodAdapter(); - } - public Object caseMethodElement(MethodElement object) { - return createMethodElementAdapter(); - } - public Object caseExcludeList(ExcludeList object) { - return createExcludeListAdapter(); - } - public Object caseSession(Session object) { - return createSessionAdapter(); - } - public Object caseMessageDriven(MessageDriven object) { - return createMessageDrivenAdapter(); - } - public Object caseMessageDrivenDestination(MessageDrivenDestination object) { - return createMessageDrivenDestinationAdapter(); - } - public Object caseActivationConfig(ActivationConfig object) { - return createActivationConfigAdapter(); - } - public Object caseActivationConfigProperty(ActivationConfigProperty object) { - return createActivationConfigPropertyAdapter(); - } - public Object caseEJBMethodCategory(EJBMethodCategory object) { - return createEJBMethodCategoryAdapter(); - } - public Object caseEClass(EClass object) { - return createEClassAdapter(); - } - public Object caseEAttribute(EAttribute object) { - return createEAttributeAdapter(); - } - public Object caseEStructuralFeature(EStructuralFeature object) { - return createEStructuralFeatureAdapter(); - } - public Object caseEClassifier(EClassifier object) { - return createEClassifierAdapter(); - } - public Object caseEModelElement(EModelElement object) { - return createEModelElementAdapter(); - } - public Object caseENamedElement(ENamedElement object) { - return createENamedElementAdapter(); - } - }; - public Adapter createAdapter(Notifier target) { - return (Adapter) sw.doSwitch((EObject) target); - } - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases - * anyway. - */ - public Adapter createMethodPermissionAdapter() { - return null; - } - public Adapter createAssemblyDescriptorAdapter() { - return null; - } - public Adapter createMethodTransactionAdapter() { - return null; - } - public Adapter createEnterpriseBeanAdapter() { - return null; - } - public Adapter createEntityAdapter() { - return null; - } - public Adapter createContainerManagedEntityAdapter() { - return null; - } - public Adapter createCMPAttributeAdapter() { - return null; - } - public Adapter createCMRFieldAdapter() { - return null; - } - public Adapter createEJBRelationshipRoleAdapter() { - return null; - } - public Adapter createEJBRelationAdapter() { - return null; - } - public Adapter createRelationshipsAdapter() { - return null; - } - public Adapter createEJBJarAdapter() { - return null; - } - public Adapter createRoleSourceAdapter() { - return null; - } - public Adapter createQueryAdapter() { - return null; - } - public Adapter createQueryMethodAdapter() { - return null; - } - public Adapter createMethodElementAdapter() { - return null; - } - public Adapter createExcludeListAdapter() { - return null; - } - public Adapter createSessionAdapter() { - return null; - } - public Adapter createMessageDrivenAdapter() { - return null; - } - public Adapter createMessageDrivenDestinationAdapter() { - return null; - } - public Adapter createEJBMethodCategoryAdapter() { - return null; - } - public Adapter createEClassAdapter() { - return null; - } - public Adapter createEAttributeAdapter() { - return null; - } - public Adapter createEStructuralFeatureAdapter() { - return null; - } - public Adapter createEClassifierAdapter() { - return null; - } - public Adapter createEModelElementAdapter() { - return null; - } - public Adapter createENamedElementAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEObjectAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject) object).eClass().getEPackage() == modelPackage; - } - return false; - } - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected EjbSwitch modelSwitch = new EjbSwitch() { - public Object caseContainerManagedEntity(ContainerManagedEntity object) { - return createContainerManagedEntityAdapter(); - } - public Object caseMethodPermission(MethodPermission object) { - return createMethodPermissionAdapter(); - } - public Object caseAssemblyDescriptor(AssemblyDescriptor object) { - return createAssemblyDescriptorAdapter(); - } - public Object caseMethodTransaction(MethodTransaction object) { - return createMethodTransactionAdapter(); - } - public Object caseSession(Session object) { - return createSessionAdapter(); - } - public Object caseEntity(Entity object) { - return createEntityAdapter(); - } - public Object caseEnterpriseBean(EnterpriseBean object) { - return createEnterpriseBeanAdapter(); - } - public Object caseEJBMethodCategory(EJBMethodCategory object) { - return createEJBMethodCategoryAdapter(); - } - public Object caseEJBJar(EJBJar object) { - return createEJBJarAdapter(); - } - public Object caseMethodElement(MethodElement object) { - return createMethodElementAdapter(); - } - public Object caseCMPAttribute(CMPAttribute object) { - return createCMPAttributeAdapter(); - } - public Object caseRelationships(Relationships object) { - return createRelationshipsAdapter(); - } - public Object caseQuery(Query object) { - return createQueryAdapter(); - } - public Object caseEJBRelation(EJBRelation object) { - return createEJBRelationAdapter(); - } - public Object caseEJBRelationshipRole(EJBRelationshipRole object) { - return createEJBRelationshipRoleAdapter(); - } - public Object caseRoleSource(RoleSource object) { - return createRoleSourceAdapter(); - } - public Object caseCMRField(CMRField object) { - return createCMRFieldAdapter(); - } - public Object caseMessageDriven(MessageDriven object) { - return createMessageDrivenAdapter(); - } - public Object caseMessageDrivenDestination(MessageDrivenDestination object) { - return createMessageDrivenDestinationAdapter(); - } - public Object caseExcludeList(ExcludeList object) { - return createExcludeListAdapter(); - } - public Object caseQueryMethod(QueryMethod object) { - return createQueryMethodAdapter(); - } - public Object caseActivationConfigProperty(ActivationConfigProperty object) { - return createActivationConfigPropertyAdapter(); - } - public Object caseActivationConfig(ActivationConfig object) { - return createActivationConfigAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return createJNDIEnvRefsGroupAdapter(); - } - public Object caseEModelElement(EModelElement object) { - return createEModelElementAdapter(); - } - public Object caseENamedElement(ENamedElement object) { - return createENamedElementAdapter(); - } - public Object caseETypedElement(ETypedElement object) { - return createETypedElementAdapter(); - } - public Object caseEStructuralFeature(EStructuralFeature object) { - return createEStructuralFeatureAdapter(); - } - public Object caseEAttribute(EAttribute object) { - return createEAttributeAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter) modelSwitch.doSwitch((EObject) target); - } - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases - * anyway. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMethodPermissionAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAssemblyDescriptorAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMethodTransactionAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEnterpriseBeanAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEntityAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createContainerManagedEntityAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createCMPAttributeAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createCMRFieldAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEJBRelationshipRoleAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEJBRelationAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createRelationshipsAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEJBJarAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createRoleSourceAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createQueryAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createQueryMethodAdapterGen() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.ejb.ActivationConfigProperty Activation Config Property}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.ejb.ActivationConfigProperty - * @generated - */ - public Adapter createActivationConfigPropertyAdapter() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.ejb.ActivationConfig Activation Config}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.ejb.ActivationConfig - * @generated - */ - public Adapter createActivationConfigAdapter() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup - * @generated - */ - public Adapter createJNDIEnvRefsGroupAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMethodElementAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createExcludeListAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSessionAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMessageDrivenAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMessageDrivenDestinationAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEJBMethodCategoryAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEAttributeAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEStructuralFeatureAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEModelElementAdapterGen() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createENamedElementAdapterGen() { - return null; - } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypedElement ETyped Element}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.ecore.ETypedElement - * @generated - */ - public Adapter createETypedElementAdapter() { - return null; - } -} //EjbAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbSwitch.java deleted file mode 100644 index 282a95221..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/EjbSwitch.java +++ /dev/null @@ -1,743 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.ETypedElement; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; -import org.eclipse.jst.j2ee.ejb.CMPAttribute; -import org.eclipse.jst.j2ee.ejb.CMRField; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.Entity; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.Query; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.Relationships; -import org.eclipse.jst.j2ee.ejb.RoleSource; -import org.eclipse.jst.j2ee.ejb.Session; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.ejb.EjbPackage - * @generated - */ -public class EjbSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static EjbPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public EjbSwitch() { - if (modelPackage == null) { - modelPackage = EjbPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case EjbPackage.CONTAINER_MANAGED_ENTITY: { - ContainerManagedEntity containerManagedEntity = (ContainerManagedEntity)theEObject; - Object result = caseContainerManagedEntity(containerManagedEntity); - if (result == null) result = caseEntity(containerManagedEntity); - if (result == null) result = caseEnterpriseBean(containerManagedEntity); - if (result == null) result = caseJNDIEnvRefsGroup(containerManagedEntity); - if (result == null) result = caseCompatibilityDescriptionGroup(containerManagedEntity); - if (result == null) result = caseDescriptionGroup(containerManagedEntity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.METHOD_PERMISSION: { - MethodPermission methodPermission = (MethodPermission)theEObject; - Object result = caseMethodPermission(methodPermission); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.ASSEMBLY_DESCRIPTOR: { - AssemblyDescriptor assemblyDescriptor = (AssemblyDescriptor)theEObject; - Object result = caseAssemblyDescriptor(assemblyDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.METHOD_TRANSACTION: { - MethodTransaction methodTransaction = (MethodTransaction)theEObject; - Object result = caseMethodTransaction(methodTransaction); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.SESSION: { - Session session = (Session)theEObject; - Object result = caseSession(session); - if (result == null) result = caseEnterpriseBean(session); - if (result == null) result = caseJNDIEnvRefsGroup(session); - if (result == null) result = caseCompatibilityDescriptionGroup(session); - if (result == null) result = caseDescriptionGroup(session); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.ENTITY: { - Entity entity = (Entity)theEObject; - Object result = caseEntity(entity); - if (result == null) result = caseEnterpriseBean(entity); - if (result == null) result = caseJNDIEnvRefsGroup(entity); - if (result == null) result = caseCompatibilityDescriptionGroup(entity); - if (result == null) result = caseDescriptionGroup(entity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.EJB_METHOD_CATEGORY: { - EJBMethodCategory ejbMethodCategory = (EJBMethodCategory)theEObject; - Object result = caseEJBMethodCategory(ejbMethodCategory); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.EJB_JAR: { - EJBJar ejbJar = (EJBJar)theEObject; - Object result = caseEJBJar(ejbJar); - if (result == null) result = caseCompatibilityDescriptionGroup(ejbJar); - if (result == null) result = caseDescriptionGroup(ejbJar); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.METHOD_ELEMENT: { - MethodElement methodElement = (MethodElement)theEObject; - Object result = caseMethodElement(methodElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.CMP_ATTRIBUTE: { - CMPAttribute cmpAttribute = (CMPAttribute)theEObject; - Object result = caseCMPAttribute(cmpAttribute); - if (result == null) result = caseEAttribute(cmpAttribute); - if (result == null) result = caseEStructuralFeature(cmpAttribute); - if (result == null) result = caseETypedElement(cmpAttribute); - if (result == null) result = caseENamedElement(cmpAttribute); - if (result == null) result = caseEModelElement(cmpAttribute); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.RELATIONSHIPS: { - Relationships relationships = (Relationships)theEObject; - Object result = caseRelationships(relationships); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.QUERY: { - Query query = (Query)theEObject; - Object result = caseQuery(query); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.EJB_RELATION: { - EJBRelation ejbRelation = (EJBRelation)theEObject; - Object result = caseEJBRelation(ejbRelation); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.EJB_RELATIONSHIP_ROLE: { - EJBRelationshipRole ejbRelationshipRole = (EJBRelationshipRole)theEObject; - Object result = caseEJBRelationshipRole(ejbRelationshipRole); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.ROLE_SOURCE: { - RoleSource roleSource = (RoleSource)theEObject; - Object result = caseRoleSource(roleSource); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.CMR_FIELD: { - CMRField cmrField = (CMRField)theEObject; - Object result = caseCMRField(cmrField); - if (result == null) result = caseCMPAttribute(cmrField); - if (result == null) result = caseEAttribute(cmrField); - if (result == null) result = caseEStructuralFeature(cmrField); - if (result == null) result = caseETypedElement(cmrField); - if (result == null) result = caseENamedElement(cmrField); - if (result == null) result = caseEModelElement(cmrField); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.MESSAGE_DRIVEN: { - MessageDriven messageDriven = (MessageDriven)theEObject; - Object result = caseMessageDriven(messageDriven); - if (result == null) result = caseEnterpriseBean(messageDriven); - if (result == null) result = caseJNDIEnvRefsGroup(messageDriven); - if (result == null) result = caseCompatibilityDescriptionGroup(messageDriven); - if (result == null) result = caseDescriptionGroup(messageDriven); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.MESSAGE_DRIVEN_DESTINATION: { - MessageDrivenDestination messageDrivenDestination = (MessageDrivenDestination)theEObject; - Object result = caseMessageDrivenDestination(messageDrivenDestination); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.EXCLUDE_LIST: { - ExcludeList excludeList = (ExcludeList)theEObject; - Object result = caseExcludeList(excludeList); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.QUERY_METHOD: { - QueryMethod queryMethod = (QueryMethod)theEObject; - Object result = caseQueryMethod(queryMethod); - if (result == null) result = caseMethodElement(queryMethod); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.ACTIVATION_CONFIG_PROPERTY: { - ActivationConfigProperty activationConfigProperty = (ActivationConfigProperty)theEObject; - Object result = caseActivationConfigProperty(activationConfigProperty); - if (result == null) result = defaultCase(theEObject); - return result; - } - case EjbPackage.ACTIVATION_CONFIG: { - ActivationConfig activationConfig = (ActivationConfig)theEObject; - Object result = caseActivationConfig(activationConfig); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Container Managed Entity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Container Managed Entity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseContainerManagedEntity(ContainerManagedEntity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Method Permission'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Method Permission'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMethodPermission(MethodPermission object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Assembly Descriptor'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Assembly Descriptor'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseAssemblyDescriptor(AssemblyDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Method Transaction'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Method Transaction'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMethodTransaction(MethodTransaction object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Session'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Session'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSession(Session object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Entity'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Entity'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEntity(Entity object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Enterprise Bean'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Enterprise Bean'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEnterpriseBean(EnterpriseBean object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Method Category'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Method Category'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBMethodCategory(EJBMethodCategory object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Jar'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Jar'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBJar(EJBJar object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Method Element'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Method Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMethodElement(MethodElement object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'CMP Attribute'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'CMP Attribute'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCMPAttribute(CMPAttribute object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Relationships'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Relationships'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRelationships(Relationships object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Query'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Query'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQuery(Query object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Relation'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Relation'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBRelation(EJBRelation object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Relationship Role'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Relationship Role'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBRelationshipRole(EJBRelationshipRole object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Role Source'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Role Source'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRoleSource(RoleSource object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'CMR Field'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'CMR Field'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCMRField(CMRField object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Driven'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Driven'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageDriven(MessageDriven object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Driven Destination'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Driven Destination'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageDrivenDestination(MessageDrivenDestination object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Exclude List'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Exclude List'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseExcludeList(ExcludeList object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Query Method'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Query Method'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQueryMethod(QueryMethod object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Activation Config Property'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Activation Config Property'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseActivationConfigProperty(ActivationConfigProperty object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Activation Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Activation Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseActivationConfig(ActivationConfig object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EModel Element'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EModel Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEModelElement(EModelElement object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'ENamed Element'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'ENamed Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseENamedElement(ENamedElement object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'ETyped Element'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'ETyped Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseETypedElement(ETypedElement object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EStructural Feature'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EStructural Feature'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEStructuralFeature(EStructuralFeature object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EAttribute'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EAttribute'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEAttribute(EAttribute object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //EjbSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/MethodElementHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/MethodElementHelper.java deleted file mode 100644 index e7ef7a4a5..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/MethodElementHelper.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.MethodTransaction; - - -/** - * @author cbridgha - * - * To change this generated comment edit the template variable "typecomment": - * Window>Preferences>Java>Templates. - * To enable and disable the creation of type comments go to - * Window>Preferences>Java>Code Generation. - */ -public class MethodElementHelper { - public static final int NONE = 0; - public static final int METHOD_PERMISSION = 1; - public static final int METHOD_TRANSACTION = 2; - public static final int EXCLUDE_LIST = 3; - public static int getContainedType(MethodElement me) { - EObject container = me.eContainer(); - if (container == null) - return NONE; - if (container instanceof MethodPermission) - return METHOD_PERMISSION; - if (container instanceof MethodTransaction) - return METHOD_TRANSACTION; - if (container instanceof ExcludeList) - return EXCLUDE_LIST; - return NONE; - } - public static MethodPermission getMethodPermission(MethodElement me) { - if (METHOD_PERMISSION == getContainedType(me)) - return (MethodPermission) me.eContainer(); - return null; - } - public static MethodTransaction getMethodTransaction(MethodElement me) { - if (METHOD_TRANSACTION == getContainedType(me)) - return (MethodTransaction) me.eContainer(); - return null; - } - public static ExcludeList getExcludeList(MethodElement me) { - if (EXCLUDE_LIST == getContainedType(me)) - return (ExcludeList) me.eContainer(); - return null; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/RelationshipsAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/RelationshipsAttributeMaintenanceAdapter.java deleted file mode 100644 index abafeeeec..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/util/RelationshipsAttributeMaintenanceAdapter.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.ejb.util; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.ejb.EJBRelation; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; - -public class RelationshipsAttributeMaintenanceAdapter extends AdapterImpl { - /** - * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(Notification) - */ - public void notifyChanged(Notification msg) { - if ((EStructuralFeature)msg.getFeature() == EjbFactoryImpl.getPackage().getRelationships_EjbRelations()) { - switch (msg.getEventType()) { - case Notification.ADD : - addedEJBRelation((EJBRelation) msg.getNewValue(), (EStructuralFeature)msg.getFeature()); - break; - case Notification.REMOVE : - removedEJBRelation((EJBRelation) msg.getOldValue(), (EStructuralFeature)msg.getFeature()); - break; - } - } - } - private void removedEJBRelation(EJBRelation aRelation, EObject sf) { - Adapter a = getAdapter(aRelation); - if (a != null) { - Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.REMOVE,(EStructuralFeature) sf, aRelation, null, Notification.NO_INDEX); - a.notifyChanged(not); - } - } - private void addedEJBRelation(EJBRelation aRelation, EObject sf) { - Adapter a = getAdapter(aRelation); - if (a != null) { - Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.ADD,(EStructuralFeature) sf, null, aRelation, Notification.NO_INDEX); - a.notifyChanged(not); - } - } - private Adapter getAdapter(EObject anObject) { - return EcoreUtil.getAdapter(anObject.eAdapters(),EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY); - } -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEInit.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEInit.java index 812abe481..6cc82a202 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEInit.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEInit.java @@ -17,27 +17,27 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationResourceFactory; import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ApplicationClientResourceFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.J2EEXMIResourceFactory; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EJBJarResourceFactory; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; -import org.eclipse.jst.j2ee.ejb.util.EJBAttributeMaintenanceFactoryImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationResourceFactory; +import org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientResourceFactory; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.ejb.impl.EJBJarResourceFactory; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.util.EJBAttributeMaintenanceFactoryImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.ConnectorResourceFactory; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppResourceFactory; import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.ConnectorResourceFactory; import org.eclipse.jst.j2ee.jsp.JspPackage; import org.eclipse.jst.j2ee.taglib.TaglibPackage; import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebAppResourceFactory; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.WebServicesClientResourceFactory; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapResourceFactory; import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.WebServicesClientResourceFactory; import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; import org.eclipse.jst.j2ee.webservice.wsdd.WsddResourceFactory; diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationFactoryImpl.java new file mode 100644 index 000000000..99b27f918 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationFactoryImpl.java @@ -0,0 +1,121 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationFactory; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.ConnectorModule; +import org.eclipse.jst.j2ee.application.EjbModule; +import org.eclipse.jst.j2ee.application.JavaClientModule; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.application.WebModule; + +/** + * @generated + */ +public class ApplicationFactoryImpl extends EFactoryImpl implements ApplicationFactory{ + + public ApplicationFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ApplicationPackage.APPLICATION: return createApplication(); + case ApplicationPackage.MODULE: return createModule(); + case ApplicationPackage.WEB_MODULE: return createWebModule(); + case ApplicationPackage.JAVA_CLIENT_MODULE: return createJavaClientModule(); + case ApplicationPackage.EJB_MODULE: return createEjbModule(); + case ApplicationPackage.CONNECTOR_MODULE: return createConnectorModule(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + +public static ApplicationFactory getActiveFactory() { + return (ApplicationFactory) getPackage().getEFactoryInstance(); +} + /** + * @generated This field/method will be replaced during code generation. + */ + public Application createApplication() { + ApplicationImpl application = new ApplicationImpl(); + return application; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Module createModule() { + ModuleImpl module = new ModuleImpl(); + return module; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WebModule createWebModule() { + WebModuleImpl webModule = new WebModuleImpl(); + return webModule; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JavaClientModule createJavaClientModule() { + JavaClientModuleImpl javaClientModule = new JavaClientModuleImpl(); + return javaClientModule; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EjbModule createEjbModule() { + EjbModuleImpl ejbModule = new EjbModuleImpl(); + return ejbModule; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ConnectorModule createConnectorModule() { + ConnectorModuleImpl connectorModule = new ConnectorModuleImpl(); + return connectorModule; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ApplicationPackage getApplicationPackage() { + return (ApplicationPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static ApplicationPackage getPackage() { + return ApplicationPackage.eINSTANCE; + } +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationImpl.java new file mode 100644 index 000000000..df318f4d3 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationImpl.java @@ -0,0 +1,434 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; +import org.eclipse.wst.common.internal.emf.utilities.StringUtil; + + +/** + * The application element is the root element of a J2EE application deployment descriptor. + + */ +public class ApplicationImpl extends CompatibilityDescriptionGroupImpl implements Application{ + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityRoles = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList modules = null; + public ApplicationImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getApplication(); + } + +/** + * @see org.eclipse.jst.j2ee.internal.application.Application + */ +public boolean containsSecurityRole(java.lang.String name) { + return getSecurityRoleNamed(name) != null; +} +public Module getModule(String uri) { + return getFirstModule(uri); +} + +public Module getModule(String uri, String altDD) { + List allModules = getModules(); + for (int i = 0; i < allModules.size(); i++) { + Module aModule = (Module) allModules.get(i); + if (StringUtil.stringsEqual(uri, aModule.getUri()) && StringUtil.stringsEqual(altDD, aModule.getAltDD())) + return aModule; + } + return null; +} + /** + * Gets the first module matching the specified uri + * @param uri The uri of a module to find. + * @return The first matching module or null if no module is found. + */ + public Module getFirstModule(String uri){ + if (uri == null) return null; + java.util.Iterator allModules = getModules().iterator(); + while (allModules.hasNext()){ + Module aModule = (Module)allModules.next(); + if(uri.equals(aModule.getUri())) return aModule; + } + return null; + } +/** + * @see org.eclipse.jst.j2ee.internal.application.Application + */ +public Module getModuleHavingAltDD(java.lang.String uri) { + if (uri == null) + return null; + List aModules = getModules(); + for (int i = 0; i < aModules.size(); i++) { + Module aModule = (Module) aModules.get(i); + if (uri.equals(aModule.getAltDD())) + return aModule; + } + return null; +} +public SecurityRole getSecurityRoleNamed(String roleName) { + java.util.List tempRoles = getSecurityRoles(); + SecurityRole role; + for (int i = 0; i < tempRoles.size(); i++) { + role = (SecurityRole) tempRoles.get(i); + if (role.getRoleName().equals(roleName)) + return role; + } + return null; +} + +/** + * Return boolean indicating if this Application was populated from an Applcation1.2 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_2Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.APPLICATION_SYSTEMID_1_2); +} +/** + * Return boolean indicating if this Application was populated from an Application1.3 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_3Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.APPLICATION_SYSTEMID_1_3); +} + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ + public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getModuleVersionID(); + } + /** + *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level + */ + public int getJ2EEVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getJ2EEVersionID(); + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.APPLICATION__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains the definitions of security roles which are + * global to the application. + */ + public EList getSecurityRoles() { + if (securityRoles == null) { + securityRoles = new EObjectContainmentEList(SecurityRole.class, this, ApplicationPackage.APPLICATION__SECURITY_ROLES); + } + return securityRoles; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getModules() { + if (modules == null) { + modules = new EObjectContainmentWithInverseEList(Module.class, this, ApplicationPackage.APPLICATION__MODULES, ApplicationPackage.MODULE__APPLICATION); + } + return modules; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.APPLICATION__MODULES: + return ((InternalEList)getModules()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.APPLICATION__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case ApplicationPackage.APPLICATION__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case ApplicationPackage.APPLICATION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case ApplicationPackage.APPLICATION__SECURITY_ROLES: + return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); + case ApplicationPackage.APPLICATION__MODULES: + return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.APPLICATION__ICONS: + return getIcons(); + case ApplicationPackage.APPLICATION__DISPLAY_NAMES: + return getDisplayNames(); + case ApplicationPackage.APPLICATION__DESCRIPTIONS: + return getDescriptions(); + case ApplicationPackage.APPLICATION__SMALL_ICON: + return getSmallIcon(); + case ApplicationPackage.APPLICATION__LARGE_ICON: + return getLargeIcon(); + case ApplicationPackage.APPLICATION__DESCRIPTION: + return getDescription(); + case ApplicationPackage.APPLICATION__DISPLAY_NAME: + return getDisplayName(); + case ApplicationPackage.APPLICATION__VERSION: + return getVersion(); + case ApplicationPackage.APPLICATION__SECURITY_ROLES: + return getSecurityRoles(); + case ApplicationPackage.APPLICATION__MODULES: + return getModules(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.APPLICATION__ICONS: + return icons != null && !icons.isEmpty(); + case ApplicationPackage.APPLICATION__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case ApplicationPackage.APPLICATION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case ApplicationPackage.APPLICATION__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case ApplicationPackage.APPLICATION__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case ApplicationPackage.APPLICATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case ApplicationPackage.APPLICATION__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case ApplicationPackage.APPLICATION__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case ApplicationPackage.APPLICATION__SECURITY_ROLES: + return securityRoles != null && !securityRoles.isEmpty(); + case ApplicationPackage.APPLICATION__MODULES: + return modules != null && !modules.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.APPLICATION__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case ApplicationPackage.APPLICATION__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case ApplicationPackage.APPLICATION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case ApplicationPackage.APPLICATION__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case ApplicationPackage.APPLICATION__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case ApplicationPackage.APPLICATION__DESCRIPTION: + setDescription((String)newValue); + return; + case ApplicationPackage.APPLICATION__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case ApplicationPackage.APPLICATION__VERSION: + setVersion((String)newValue); + return; + case ApplicationPackage.APPLICATION__SECURITY_ROLES: + getSecurityRoles().clear(); + getSecurityRoles().addAll((Collection)newValue); + return; + case ApplicationPackage.APPLICATION__MODULES: + getModules().clear(); + getModules().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.APPLICATION__ICONS: + getIcons().clear(); + return; + case ApplicationPackage.APPLICATION__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case ApplicationPackage.APPLICATION__DESCRIPTIONS: + getDescriptions().clear(); + return; + case ApplicationPackage.APPLICATION__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case ApplicationPackage.APPLICATION__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case ApplicationPackage.APPLICATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case ApplicationPackage.APPLICATION__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case ApplicationPackage.APPLICATION__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case ApplicationPackage.APPLICATION__SECURITY_ROLES: + getSecurityRoles().clear(); + return; + case ApplicationPackage.APPLICATION__MODULES: + getModules().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); //$NON-NLS-1$ + result.append(version); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationPackageImpl.java new file mode 100644 index 000000000..21183c187 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationPackageImpl.java @@ -0,0 +1,364 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationFactory; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.ConnectorModule; +import org.eclipse.jst.j2ee.application.EjbModule; +import org.eclipse.jst.j2ee.application.JavaClientModule; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.application.WebModule; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class ApplicationPackageImpl extends EPackageImpl implements ApplicationPackage, EPackage { + /** + * + * + * @generated + */ + private EClass applicationEClass = null; + + /** + * + * + * @generated + */ + private EClass moduleEClass = null; + + /** + * + * + * @generated + */ + private EClass webModuleEClass = null; + + /** + * + * + * @generated + */ + private EClass javaClientModuleEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbModuleEClass = null; + + /** + * + * + * @generated + */ + private EClass connectorModuleEClass = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private ApplicationPackageImpl() { + super(eNS_URI, ApplicationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static ApplicationPackage init() { + if (isInited) return (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI); + + // Obtain or create and register package. + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ApplicationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); + + // Step 1: create meta-model objects + theApplicationPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theApplicationPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theApplicationPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getApplication() { + return applicationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getApplication_Version() { + return (EAttribute)applicationEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplication_SecurityRoles() { + return (EReference)applicationEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplication_Modules() { + return (EReference)applicationEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getModule() { + return moduleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getModule_Uri() { + return (EAttribute)moduleEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getModule_AltDD() { + return (EAttribute)moduleEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getModule_Application() { + return (EReference)moduleEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWebModule() { + return webModuleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getWebModule_ContextRoot() { + return (EAttribute)webModuleEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getJavaClientModule() { + return javaClientModuleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEjbModule() { + return ejbModuleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getConnectorModule() { + return connectorModuleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ApplicationFactory getApplicationFactory() { + return (ApplicationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + applicationEClass = createEClass(APPLICATION); + createEAttribute(applicationEClass, APPLICATION__VERSION); + createEReference(applicationEClass, APPLICATION__SECURITY_ROLES); + createEReference(applicationEClass, APPLICATION__MODULES); + + moduleEClass = createEClass(MODULE); + createEAttribute(moduleEClass, MODULE__URI); + createEAttribute(moduleEClass, MODULE__ALT_DD); + createEReference(moduleEClass, MODULE__APPLICATION); + + webModuleEClass = createEClass(WEB_MODULE); + createEAttribute(webModuleEClass, WEB_MODULE__CONTEXT_ROOT); + + javaClientModuleEClass = createEClass(JAVA_CLIENT_MODULE); + + ejbModuleEClass = createEClass(EJB_MODULE); + + connectorModuleEClass = createEClass(CONNECTOR_MODULE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Add supertypes to classes + applicationEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + webModuleEClass.getESuperTypes().add(this.getModule()); + javaClientModuleEClass.getESuperTypes().add(this.getModule()); + ejbModuleEClass.getESuperTypes().add(this.getModule()); + connectorModuleEClass.getESuperTypes().add(this.getModule()); + + // Initialize classes and features; add operations and parameters + initEClass(applicationEClass, Application.class, "Application", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getApplication_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplication_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplication_Modules(), this.getModule(), this.getModule_Application(), "modules", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getModule_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getModule_AltDD(), ecorePackage.getEString(), "altDD", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getModule_Application(), this.getApplication(), this.getApplication_Modules(), "application", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(webModuleEClass, WebModule.class, "WebModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getWebModule_ContextRoot(), ecorePackage.getEString(), "contextRoot", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(javaClientModuleEClass, JavaClientModule.class, "JavaClientModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + + initEClass(ejbModuleEClass, EjbModule.class, "EjbModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + + initEClass(connectorModuleEClass, ConnectorModule.class, "ConnectorModule", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } +} //ApplicationPackageImpl + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceFactory.java new file mode 100644 index 000000000..877d54282 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceFactory.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +public class ApplicationResourceFactory extends TranslatorResourceFactory { + + /** + * Method registerDtds. + */ + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SYSTEMID_1_2, "application_1_2.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SYSTEMID_1_3, "application_1_3.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APPLICATION_SCHEMA_LOC_1_4, "application_1_4.xsd"); //$NON-NLS-1$ + // moved to the web svcs J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SCHEMA_LOC_1_1, "j2ee_web_services_client_1_1.xsd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.J2EE_1_4_XSD_SHORT_NAME, J2EEConstants.J2EE_1_4_XSD_SHORT_NAME); + } + + /** + * @param aRendererFactory + */ + public ApplicationResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) + */ + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new ApplicationResourceImpl(uri, aRenderer); + } + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(aRendererFactory)); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.APPLICATION_DD_URI_OBJ); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceImpl.java new file mode 100644 index 000000000..550a718ec --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ApplicationResourceImpl.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.application.ApplicationTranslator; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + + +public class ApplicationResourceImpl extends XMLResourceImpl implements ApplicationResource { + /** + * @param uri + * @param aRenderer + */ + public ApplicationResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + + } + + /** + * @param aRenderer + */ + public ApplicationResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + /** + * Return the first element in the EList. */ + public Application getApplication() { + return (Application) getRootObject(); + } + + + public int getType() { + return APPLICATION_TYPE; + } + + + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.APPLICATION_DOCTYPE; + default : + return null; + } + + } + /* App version is always the same as the J2EE version + */ + public int getJ2EEVersionID() { + return getModuleVersionID(); + } + public Translator getRootTranslator() { + return ApplicationTranslator.INSTANCE; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.APPLICATION_SYSTEMID_1_2; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.APPLICATION_SYSTEMID_1_3; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.APPLICATION_PUBLICID_1_2; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.APPLICATION_PUBLICID_1_3; + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (J2EE_1_4_ID) : + super.setDoctypeValues(null, null); + break; + case (J2EE_1_3_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (J2EE_1_2_ID) : + super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version(Same as J2EE Version for Application) + */ + public void setJ2EEVersionID(int id) { + primSetVersionID(id); + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + } + syncVersionOfRootObject(); + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + Application app = getApplication(); + if (app == null) + return; + + String version = app.getVersion(); + String newVersion = getModuleVersionString(); + if (!newVersion.equals(version)) + app.setVersion(newVersion); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ConnectorModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ConnectorModuleImpl.java new file mode 100644 index 000000000..8cb3876dd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ConnectorModuleImpl.java @@ -0,0 +1,176 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.ConnectorModule; +import org.eclipse.jst.j2ee.application.Module; + +/** + * Specifies the URI of a resource adapter archive file, relative to the top level of the application package. + */ +public class ConnectorModuleImpl extends ModuleImpl implements ConnectorModule, Module{ + + public ConnectorModuleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getConnectorModule(); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, ApplicationPackage.CONNECTOR_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + return eBasicSetContainer(null, ApplicationPackage.CONNECTOR_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.CONNECTOR_MODULE__URI: + return getUri(); + case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: + return getAltDD(); + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + return getApplication(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.CONNECTOR_MODULE__URI: + setUri((String)newValue); + return; + case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: + setAltDD((String)newValue); + return; + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + setApplication((Application)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.CONNECTOR_MODULE__URI: + setUri(URI_EDEFAULT); + return; + case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: + setAltDD(ALT_DD_EDEFAULT); + return; + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + setApplication((Application)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.CONNECTOR_MODULE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case ApplicationPackage.CONNECTOR_MODULE__ALT_DD: + return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); + case ApplicationPackage.CONNECTOR_MODULE__APPLICATION: + return getApplication() != null; + } + return eDynamicIsSet(eFeature); + } + +public boolean isConnectorModule() { + return true; +} +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/EjbModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/EjbModuleImpl.java new file mode 100644 index 000000000..2eb4f7f2d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/EjbModuleImpl.java @@ -0,0 +1,177 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.EjbModule; +import org.eclipse.jst.j2ee.application.Module; + +/** + * Specifies the URI of a ejb-jar, relative to the top level of the application package. + + */ +public class EjbModuleImpl extends ModuleImpl implements EjbModule, Module { + + public EjbModuleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getEjbModule(); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.EJB_MODULE__APPLICATION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, ApplicationPackage.EJB_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.EJB_MODULE__APPLICATION: + return eBasicSetContainer(null, ApplicationPackage.EJB_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case ApplicationPackage.EJB_MODULE__APPLICATION: + return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.EJB_MODULE__URI: + return getUri(); + case ApplicationPackage.EJB_MODULE__ALT_DD: + return getAltDD(); + case ApplicationPackage.EJB_MODULE__APPLICATION: + return getApplication(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.EJB_MODULE__URI: + setUri((String)newValue); + return; + case ApplicationPackage.EJB_MODULE__ALT_DD: + setAltDD((String)newValue); + return; + case ApplicationPackage.EJB_MODULE__APPLICATION: + setApplication((Application)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.EJB_MODULE__URI: + setUri(URI_EDEFAULT); + return; + case ApplicationPackage.EJB_MODULE__ALT_DD: + setAltDD(ALT_DD_EDEFAULT); + return; + case ApplicationPackage.EJB_MODULE__APPLICATION: + setApplication((Application)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.EJB_MODULE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case ApplicationPackage.EJB_MODULE__ALT_DD: + return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); + case ApplicationPackage.EJB_MODULE__APPLICATION: + return getApplication() != null; + } + return eDynamicIsSet(eFeature); + } + +public boolean isEjbModule() { + return true; +} +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/JavaClientModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/JavaClientModuleImpl.java new file mode 100644 index 000000000..40b606b77 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/JavaClientModuleImpl.java @@ -0,0 +1,177 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.JavaClientModule; +import org.eclipse.jst.j2ee.application.Module; + +/** + * specifies the URI of a java application client module, relative to the top level of the application package. + + */ +public class JavaClientModuleImpl extends ModuleImpl implements JavaClientModule, Module { + + public JavaClientModuleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getJavaClientModule(); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + return eBasicSetContainer(null, ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__URI: + return getUri(); + case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: + return getAltDD(); + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + return getApplication(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__URI: + setUri((String)newValue); + return; + case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: + setAltDD((String)newValue); + return; + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + setApplication((Application)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__URI: + setUri(URI_EDEFAULT); + return; + case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: + setAltDD(ALT_DD_EDEFAULT); + return; + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + setApplication((Application)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.JAVA_CLIENT_MODULE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case ApplicationPackage.JAVA_CLIENT_MODULE__ALT_DD: + return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); + case ApplicationPackage.JAVA_CLIENT_MODULE__APPLICATION: + return getApplication() != null; + } + return eDynamicIsSet(eFeature); + } + +public boolean isJavaModule() { + return true; +} +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ModuleImpl.java new file mode 100644 index 000000000..af08b5cbb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/ModuleImpl.java @@ -0,0 +1,307 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.Module; + + +/** + * The module element represents a single J2EE module and contains an ejb, java, or web element, which indicates the module type and contains a path to the module file, and an optional alt-dd element, which specifies an optional URI to the post-assembly version of the deployment descriptor. The application deployment descriptor must have one module element for each J2EE module in the application package. + + */ +public class ModuleImpl extends EObjectImpl implements Module, EObject { + + /** + * The default value of the '{@link #getUri() Uri}' attribute. + * + * + * @see #getUri() + * @generated + * @ordered + */ + protected static final String URI_EDEFAULT = null; + + protected static final char FORWARD_SLASH = '/'; + protected static final char BACKWARD_SLASH = '\\'; + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String uri = URI_EDEFAULT; + /** + * The default value of the '{@link #getAltDD() Alt DD}' attribute. + * + * + * @see #getAltDD() + * @generated + * @ordered + */ + protected static final String ALT_DD_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String altDD = ALT_DD_EDEFAULT; + public ModuleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getModule(); + } + +public boolean isConnectorModule() { + return false; +} +/* Returns false by default + * + */ +public boolean isEjbModule() { + return false; +} +/* + * Returns false by default + */ +public boolean isJavaModule() { + return false; +} +/* + * Returns false by default + */ +public boolean isWebModule() { + return false; +} + /** + * @generated This field/method will be replaced during code generation + * Specifies the URI of a module, relative to the top level of the application package. + + */ + public String getUri() { + return uri; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUri(String newUri) { + String oldUri = uri; + uri = newUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__URI, oldUri, uri)); + } + + /** + * @generated This field/method will be replaced during code generation + * The alt-dd element specifies an optional URI to the post-assembly version of the deployment descriptor file for a particular J2EE module. The URI must specify the full pathname of the deployment descriptor file relative to the application's root directory. If alt-dd is not specified, the deployer must read the deployment descriptor from the default location and file name required by the respective component specification. + + */ + public String getAltDD() { + return altDD; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAltDD(String newAltDD) { + String oldAltDD = altDD; + altDD = newAltDD; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__ALT_DD, oldAltDD, altDD)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public Application getApplication() { + if (eContainerFeatureID != ApplicationPackage.MODULE__APPLICATION) return null; + return (Application)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setApplication(Application newApplication) { + if (newApplication != eContainer || (eContainerFeatureID != ApplicationPackage.MODULE__APPLICATION && newApplication != null)) { + if (EcoreUtil.isAncestor(this, newApplication)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newApplication != null) + msgs = ((InternalEObject)newApplication).eInverseAdd(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newApplication, ApplicationPackage.MODULE__APPLICATION, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.MODULE__APPLICATION, newApplication, newApplication)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.MODULE__APPLICATION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, ApplicationPackage.MODULE__APPLICATION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.MODULE__APPLICATION: + return eBasicSetContainer(null, ApplicationPackage.MODULE__APPLICATION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case ApplicationPackage.MODULE__APPLICATION: + return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.MODULE__URI: + return getUri(); + case ApplicationPackage.MODULE__ALT_DD: + return getAltDD(); + case ApplicationPackage.MODULE__APPLICATION: + return getApplication(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.MODULE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case ApplicationPackage.MODULE__ALT_DD: + return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); + case ApplicationPackage.MODULE__APPLICATION: + return getApplication() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.MODULE__URI: + setUri((String)newValue); + return; + case ApplicationPackage.MODULE__ALT_DD: + setAltDD((String)newValue); + return; + case ApplicationPackage.MODULE__APPLICATION: + setApplication((Application)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.MODULE__URI: + setUri(URI_EDEFAULT); + return; + case ApplicationPackage.MODULE__ALT_DD: + setAltDD(ALT_DD_EDEFAULT); + return; + case ApplicationPackage.MODULE__APPLICATION: + setApplication((Application)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (uri: "); //$NON-NLS-1$ + result.append(uri); + result.append(", altDD: "); //$NON-NLS-1$ + result.append(altDD); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/WebModuleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/WebModuleImpl.java new file mode 100644 index 000000000..6ae5d9ab8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/impl/WebModuleImpl.java @@ -0,0 +1,233 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.application.WebModule; + + +/** + * Contains the web-uri and context-root of a web application module. + + */ +public class WebModuleImpl extends ModuleImpl implements WebModule, Module { + + /** + * The default value of the '{@link #getContextRoot() Context Root}' attribute. + * + * + * @see #getContextRoot() + * @generated + * @ordered + */ + protected static final String CONTEXT_ROOT_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String contextRoot = CONTEXT_ROOT_EDEFAULT; + public WebModuleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ApplicationPackage.eINSTANCE.getWebModule(); + } + +public boolean isWebModule() { + return true; +} + /** + * @generated This field/method will be replaced during code generation + * The context-root element specifies the context root of a web application + + */ + public String getContextRoot() { + return contextRoot; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setContextRoot(String newContextRoot) { + String oldContextRoot = contextRoot; + contextRoot = newContextRoot; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationPackage.WEB_MODULE__CONTEXT_ROOT, oldContextRoot, contextRoot)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.WEB_MODULE__APPLICATION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, ApplicationPackage.WEB_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ApplicationPackage.WEB_MODULE__APPLICATION: + return eBasicSetContainer(null, ApplicationPackage.WEB_MODULE__APPLICATION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case ApplicationPackage.WEB_MODULE__APPLICATION: + return eContainer.eInverseRemove(this, ApplicationPackage.APPLICATION__MODULES, Application.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.WEB_MODULE__URI: + return getUri(); + case ApplicationPackage.WEB_MODULE__ALT_DD: + return getAltDD(); + case ApplicationPackage.WEB_MODULE__APPLICATION: + return getApplication(); + case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: + return getContextRoot(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.WEB_MODULE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case ApplicationPackage.WEB_MODULE__ALT_DD: + return ALT_DD_EDEFAULT == null ? altDD != null : !ALT_DD_EDEFAULT.equals(altDD); + case ApplicationPackage.WEB_MODULE__APPLICATION: + return getApplication() != null; + case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: + return CONTEXT_ROOT_EDEFAULT == null ? contextRoot != null : !CONTEXT_ROOT_EDEFAULT.equals(contextRoot); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.WEB_MODULE__URI: + setUri((String)newValue); + return; + case ApplicationPackage.WEB_MODULE__ALT_DD: + setAltDD((String)newValue); + return; + case ApplicationPackage.WEB_MODULE__APPLICATION: + setApplication((Application)newValue); + return; + case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: + setContextRoot((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ApplicationPackage.WEB_MODULE__URI: + setUri(URI_EDEFAULT); + return; + case ApplicationPackage.WEB_MODULE__ALT_DD: + setAltDD(ALT_DD_EDEFAULT); + return; + case ApplicationPackage.WEB_MODULE__APPLICATION: + setApplication((Application)null); + return; + case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT: + setContextRoot(CONTEXT_ROOT_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (contextRoot: "); //$NON-NLS-1$ + result.append(contextRoot); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationAdapterFactory.java new file mode 100644 index 000000000..17ec93d6e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationAdapterFactory.java @@ -0,0 +1,248 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.ConnectorModule; +import org.eclipse.jst.j2ee.application.EjbModule; +import org.eclipse.jst.j2ee.application.JavaClientModule; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.application.WebModule; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; + + + +public class ApplicationAdapterFactory extends AdapterFactoryImpl { + protected static ApplicationPackage modelPackage; + + public ApplicationAdapterFactory() { + if (modelPackage == null) { + modelPackage = (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + protected ApplicationSwitch sw = new ApplicationSwitch() { + public Object caseApplication(Application object) { + return createApplicationAdapter(); + } + public Object caseModule(Module object) { + return createModuleAdapter(); + } + public Object caseWebModule(WebModule object) { + return createWebModuleAdapter(); + } + public Object caseJavaClientModule(JavaClientModule object) { + return createJavaClientModuleAdapter(); + } + public Object caseEjbModule(EjbModule object) { + return createEjbModuleAdapter(); + } + public Object caseConnectorModule(ConnectorModule object) { + return createConnectorModuleAdapter(); + } + }; + + public Adapter createAdapter(Notifier target) { + return (Adapter)sw.doSwitch((EObject)target); + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createApplicationAdapter() { + return null; + } + + public Adapter createModuleAdapter() { + return null; + } + + public Adapter createWebModuleAdapter() { + return null; + } + + public Adapter createJavaClientModuleAdapter() { + return null; + } + + public Adapter createEjbModuleAdapter() { + return null; + } + + public Adapter createConnectorModuleAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected ApplicationSwitch modelSwitch = + new ApplicationSwitch() { + public Object caseApplication(Application object) { + return createApplicationAdapter(); + } + public Object caseModule(Module object) { + return createModuleAdapter(); + } + public Object caseWebModule(WebModule object) { + return createWebModuleAdapter(); + } + public Object caseJavaClientModule(JavaClientModule object) { + return createJavaClientModuleAdapter(); + } + public Object caseEjbModule(EjbModule object) { + return createEjbModuleAdapter(); + } + public Object caseConnectorModule(ConnectorModule object) { + return createConnectorModuleAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createApplicationAdapterGen() { + + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createModuleAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWebModuleAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createJavaClientModuleAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEjbModuleAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createConnectorModuleAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ApplicationAdapterFactory + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationSwitch.java new file mode 100644 index 000000000..7e0e14bff --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/application/util/ApplicationSwitch.java @@ -0,0 +1,254 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.application.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.application.ConnectorModule; +import org.eclipse.jst.j2ee.application.EjbModule; +import org.eclipse.jst.j2ee.application.JavaClientModule; +import org.eclipse.jst.j2ee.application.Module; +import org.eclipse.jst.j2ee.application.WebModule; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.application.ApplicationPackage + * @generated + */ +public class ApplicationSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static ApplicationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ApplicationSwitch() { + if (modelPackage == null) { + modelPackage = ApplicationPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case ApplicationPackage.APPLICATION: { + Application application = (Application)theEObject; + Object result = caseApplication(application); + if (result == null) result = caseCompatibilityDescriptionGroup(application); + if (result == null) result = caseDescriptionGroup(application); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationPackage.MODULE: { + Module module = (Module)theEObject; + Object result = caseModule(module); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationPackage.WEB_MODULE: { + WebModule webModule = (WebModule)theEObject; + Object result = caseWebModule(webModule); + if (result == null) result = caseModule(webModule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationPackage.JAVA_CLIENT_MODULE: { + JavaClientModule javaClientModule = (JavaClientModule)theEObject; + Object result = caseJavaClientModule(javaClientModule); + if (result == null) result = caseModule(javaClientModule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationPackage.EJB_MODULE: { + EjbModule ejbModule = (EjbModule)theEObject; + Object result = caseEjbModule(ejbModule); + if (result == null) result = caseModule(ejbModule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationPackage.CONNECTOR_MODULE: { + ConnectorModule connectorModule = (ConnectorModule)theEObject; + Object result = caseConnectorModule(connectorModule); + if (result == null) result = caseModule(connectorModule); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Application'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Application'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseApplication(Application object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseModule(Module object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebModule(WebModule object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Java Client Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Java Client Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJavaClientModule(JavaClientModule object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Ejb Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Ejb Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEjbModule(EjbModule object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Connector Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Connector Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseConnectorModule(ConnectorModule object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //ApplicationSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientImpl.java new file mode 100644 index 000000000..e1a1b3046 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientImpl.java @@ -0,0 +1,606 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; + + +/** + * The application-client element is the root element of an application client deployment descriptor. The application client deployment descriptor describes the EJB components and external resources referenced by the application client. + + */ +public class ApplicationClientImpl extends CompatibilityDescriptionGroupImpl implements ApplicationClient { + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList resourceRefs = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList environmentProps = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList ejbReferences = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList resourceEnvRefs = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass callbackHandler = null; + /** + * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. + * + * + * @see #getServiceRefs() + * @generated + * @ordered + */ + protected EList serviceRefs = null; + + /** + * The cached value of the '{@link #getMessageDestinationRefs() Message Destination Refs}' containment reference list. + * + * + * @see #getMessageDestinationRefs() + * @generated + * @ordered + */ + protected EList messageDestinationRefs = null; + + /** + * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. + * + * + * @see #getMessageDestinations() + * @generated + * @ordered + */ + protected EList messageDestinations = null; + + public ApplicationClientImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return ClientPackage.eINSTANCE.getApplicationClient(); + } + +/** + * createClassRef - return a JavaURL reference to the named Java class + */ +public JavaClass createClassRef(String targetName) { + return JavaRefFactory.eINSTANCE.createClassRef(targetName); +} +public String getCallbackHandlerClassName() { + getCallbackHandler(); + return (callbackHandler == null) ? null : callbackHandler.getQualifiedName(); +} +/** + * Return boolean indicating if this Application Client was populated from an Application Client 1.2 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_2Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.APP_CLIENT_SYSTEMID_1_2); +} +/** + * Return boolean indicating if this Application client was populated from an Application Client 1.3 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_3Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.APP_CLIENT_SYSTEMID_1_3); +} +/** + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_4Descriptor() { + return version != null && J2EEConstants.J2EE_1_4_TEXT.equals(version); +} +public void setCallbackHandlerClassName(String callbackHandlerClassName) { + eSet(ClientPackage.eINSTANCE.getApplicationClient_CallbackHandler(), createClassRef(callbackHandlerClassName)); +} +/** + *This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ +public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getModuleVersionID(); +} +/** + *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level + */ +public int getJ2EEVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getJ2EEVersionID(); +} + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClientPackage.APPLICATION_CLIENT__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains declarations of the application clients's references to an external + * resources. + */ + public EList getResourceRefs() { + if (resourceRefs == null) { + resourceRefs = new EObjectContainmentEList(ResourceRef.class, this, ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS); + } + return resourceRefs; + } + + /** + * @generated This field/method will be replaced during code generation + * The env-entry element contains the declaration of an application client's + * environment entries. Each declaration consists of an optional description, the + * name of the environment entry, and an optional value. + */ + public EList getEnvironmentProps() { + if (environmentProps == null) { + environmentProps = new EObjectContainmentEList(EnvEntry.class, this, ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS); + } + return environmentProps; + } + + /** + * @generated This field/method will be replaced during code generation + * Contains a list of ejb-ref elements used for the declaration of a reference to + * an enterprise + * bean's home. + */ + public EList getEjbReferences() { + if (ejbReferences == null) { + ejbReferences = new EObjectContainmentEList(EjbRef.class, this, ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES); + } + return ejbReferences; + } + + /** + * @generated This field/method will be replaced during code generation + * The resource-env-ref element contains a declaration of an application client's + * reference to an administered object associated with a resource in the + * application client's environment. It consists of an optional + * description, the resource environment reference name, and an indication of the + * resource environment reference type expected by the application client code. + * + * Used in: application-client + * + * Example: + * + * + * jms//StockQueue + * javax.jms.Queue + * + + */ + public EList getResourceEnvRefs() { + if (resourceEnvRefs == null) { + resourceEnvRefs = new EObjectContainmentEList(ResourceEnvRef.class, this, ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS); + } + return resourceEnvRefs; + } + + /** + * @generated This field/method will be replaced during code generation + * A class provided by the application. The class must have a no args constructor and must implement the javax.security.auth.callback.CallbackHandler interface. The class will be instantiated by the application client container and used by the container to collect authentication information from the user. + */ + public JavaClass getCallbackHandler() { + if (callbackHandler != null && callbackHandler.eIsProxy()) { + JavaClass oldCallbackHandler = callbackHandler; + callbackHandler = (JavaClass)eResolveProxy((InternalEObject)callbackHandler); + if (callbackHandler != oldCallbackHandler) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER, oldCallbackHandler, callbackHandler)); + } + } + return callbackHandler; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetCallbackHandler() { + return callbackHandler; + } + + /** + */ + public void setCallbackHandler(JavaClass newCallbackHandler) { + if ((callbackHandler == null || callbackHandler.getQualifiedName() == null) + && (newCallbackHandler == null || newCallbackHandler.getQualifiedName() == null)) { + return; + } + JavaClass oldCallbackHandler = callbackHandler; + callbackHandler = newCallbackHandler; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER, oldCallbackHandler, callbackHandler)); + } + + /** + * + * + * @generated + */ + public EList getServiceRefs() { + if (serviceRefs == null) { + serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, ClientPackage.APPLICATION_CLIENT__SERVICE_REFS); + } + return serviceRefs; + } + + /** + * + * + * @generated + */ + public EList getMessageDestinationRefs() { + if (messageDestinationRefs == null) { + messageDestinationRefs = new EObjectContainmentEList(MessageDestinationRef.class, this, ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS); + } + return messageDestinationRefs; + } + + /** + * + * + * @generated + */ + public EList getMessageDestinations() { + if (messageDestinations == null) { + messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS); + } + return messageDestinations; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case ClientPackage.APPLICATION_CLIENT__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: + return ((InternalEList)getEnvironmentProps()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: + return ((InternalEList)getEjbReferences()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: + return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ClientPackage.APPLICATION_CLIENT__ICONS: + return getIcons(); + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: + return getDisplayNames(); + case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: + return getDescriptions(); + case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: + return getSmallIcon(); + case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: + return getLargeIcon(); + case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: + return getDescription(); + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: + return getDisplayName(); + case ClientPackage.APPLICATION_CLIENT__VERSION: + return getVersion(); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: + return getResourceRefs(); + case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: + return getEnvironmentProps(); + case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: + return getEjbReferences(); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: + if (resolve) return getCallbackHandler(); + return basicGetCallbackHandler(); + case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: + return getServiceRefs(); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: + return getMessageDestinations(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ClientPackage.APPLICATION_CLIENT__ICONS: + return icons != null && !icons.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case ClientPackage.APPLICATION_CLIENT__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: + return environmentProps != null && !environmentProps.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: + return ejbReferences != null && !ejbReferences.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: + return callbackHandler != null; + case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: + return messageDestinations != null && !messageDestinations.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ClientPackage.APPLICATION_CLIENT__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: + setDescription((String)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__VERSION: + setVersion((String)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: + getEnvironmentProps().clear(); + getEnvironmentProps().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: + getEjbReferences().clear(); + getEjbReferences().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: + setCallbackHandler((JavaClass)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + getMessageDestinations().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case ClientPackage.APPLICATION_CLIENT__ICONS: + getIcons().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__DESCRIPTIONS: + getDescriptions().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case ClientPackage.APPLICATION_CLIENT__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case ClientPackage.APPLICATION_CLIENT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case ClientPackage.APPLICATION_CLIENT__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case ClientPackage.APPLICATION_CLIENT__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS: + getEnvironmentProps().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES: + getEjbReferences().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__CALLBACK_HANDLER: + setCallbackHandler((JavaClass)null); + return; + case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS: + getServiceRefs().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); //$NON-NLS-1$ + result.append(version); + result.append(')'); + return result.toString(); + } + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceFactory.java new file mode 100644 index 000000000..b3c01f004 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceFactory.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.impl; + + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +public class ApplicationClientResourceFactory extends TranslatorResourceFactory { + + /** + * Method registerDtds. + */ + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SYSTEMID_1_2, "application-client_1_2.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SYSTEMID_1_3, "application-client_1_3.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.APP_CLIENT_SCHEMA_LOC_1_4, "application-client_1_4.xsd"); //$NON-NLS-1$ + + } + + /** + * Constructor for ApplicationClientResourceFactory. + * @param aRendererFactory + */ + public ApplicationClientResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + + /** + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(URI, Renderer) + */ + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new ApplicationClientResourceImpl(uri, aRenderer); + } + + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(aRendererFactory)); + } + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.APP_CLIENT_DD_URI_OBJ); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceImpl.java new file mode 100644 index 000000000..a772a6fb1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ApplicationClientResourceImpl.java @@ -0,0 +1,154 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.impl; + + + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ApplicationClientResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.client.ApplicationClientTranslator; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + +public class ApplicationClientResourceImpl extends XMLResourceImpl implements ApplicationClientResource { + /** + * Constructor for ApplicationClientResourceImpl. + * @param uri + * @param aRenderer + */ + public ApplicationClientResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + /** + * Constructor for ApplicationClientResourceImpl. + * @param aRenderer + */ + public ApplicationClientResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /** + * Return the first element in the EList. + */ + public ApplicationClient getApplicationClient() { + return (ApplicationClient) getRootObject(); + } + + + public int getType() { + return APP_CLIENT_TYPE; + } + + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.APP_CLIENT_SYSTEMID_1_2; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.APP_CLIENT_SYSTEMID_1_3; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.APP_CLIENT_PUBLICID_1_2; + } + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.APP_CLIENT_PUBLICID_1_3; + } + + + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.APP_CLIENT_DOCTYPE; + default : + return null; + } + } + + /** + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return ApplicationClientTranslator.INSTANCE; + } + + /* App client version is always the same as the J2EE version + */ + public int getJ2EEVersionID() { + return getModuleVersionID(); + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (J2EE_1_4_ID) : + super.setDoctypeValues(null, null); + break; + case (J2EE_1_3_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (J2EE_1_2_ID) : + super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version(Same as J2EE Version for App client) + */ + public void setJ2EEVersionID(int id) { + primSetVersionID(id); + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + } + syncVersionOfRootObject(); + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + ApplicationClient clt = getApplicationClient(); + if (clt == null) + return; + + String version = clt.getVersion(); + String newVersion = getModuleVersionString(); + if (!newVersion.equals(version)) + clt.setVersion(newVersion); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientFactoryImpl.java new file mode 100644 index 000000000..e1ea503b0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientFactoryImpl.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ClientFactory; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.client.ResAuthApplicationType; + +/** + * @generated + */ +public class ClientFactoryImpl extends EFactoryImpl implements ClientFactory{ + + public ClientFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ClientPackage.APPLICATION_CLIENT: return createApplicationClient(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ClientPackage.RES_AUTH_APPLICATION_TYPE: + return ResAuthApplicationType.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ClientPackage.RES_AUTH_APPLICATION_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + +public static ClientFactory getActiveFactory() { + return (ClientFactory) getPackage().getEFactoryInstance(); +} + /** + * @generated This field/method will be replaced during code generation. + */ + public ApplicationClient createApplicationClient() { + ApplicationClientImpl applicationClient = new ApplicationClientImpl(); + return applicationClient; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ClientPackage getClientPackage() { + return (ClientPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static ClientPackage getPackage() { + return ClientPackage.eINSTANCE; + } +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientPackageImpl.java new file mode 100644 index 000000000..55c7491fd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/impl/ClientPackageImpl.java @@ -0,0 +1,321 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ClientFactory; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.client.ResAuthApplicationType; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.J2EEInit; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class ClientPackageImpl extends EPackageImpl implements ClientPackage, EPackage { + /** + * + * + * @generated + */ + private EClass applicationClientEClass = null; + + /** + * + * + * @generated + */ + private EEnum resAuthApplicationTypeEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private ClientPackageImpl() { + super(eNS_URI, ClientFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static ClientPackage init() { + if (isInited) return (ClientPackage)EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI); + + // Obtain or create and register package. + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ClientPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + // init J2EE in case its not already initialized... + J2EEInit.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); + + // Step 1: create meta-model objects + theClientPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theClientPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theClientPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getApplicationClient() { + return applicationClientEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getApplicationClient_Version() { + return (EAttribute)applicationClientEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplicationClient_ResourceRefs() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplicationClient_EnvironmentProps() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplicationClient_EjbReferences() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplicationClient_ResourceEnvRefs() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getApplicationClient_CallbackHandler() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getApplicationClient_ServiceRefs() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getApplicationClient_MessageDestinationRefs() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getApplicationClient_MessageDestinations() { + return (EReference)applicationClientEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EEnum getResAuthApplicationType() { + return resAuthApplicationTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ClientFactory getClientFactory() { + return (ClientFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + applicationClientEClass = createEClass(APPLICATION_CLIENT); + createEAttribute(applicationClientEClass, APPLICATION_CLIENT__VERSION); + createEReference(applicationClientEClass, APPLICATION_CLIENT__RESOURCE_REFS); + createEReference(applicationClientEClass, APPLICATION_CLIENT__ENVIRONMENT_PROPS); + createEReference(applicationClientEClass, APPLICATION_CLIENT__EJB_REFERENCES); + createEReference(applicationClientEClass, APPLICATION_CLIENT__RESOURCE_ENV_REFS); + createEReference(applicationClientEClass, APPLICATION_CLIENT__CALLBACK_HANDLER); + createEReference(applicationClientEClass, APPLICATION_CLIENT__SERVICE_REFS); + createEReference(applicationClientEClass, APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS); + createEReference(applicationClientEClass, APPLICATION_CLIENT__MESSAGE_DESTINATIONS); + + // Create enums + resAuthApplicationTypeEEnum = createEEnum(RES_AUTH_APPLICATION_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); + + // Add supertypes to classes + applicationClientEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(applicationClientEClass, ApplicationClient.class, "ApplicationClient", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getApplicationClient_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_ResourceRefs(), theCommonPackage.getResourceRef(), null, "resourceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_EnvironmentProps(), theCommonPackage.getEnvEntry(), null, "environmentProps", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_EjbReferences(), theCommonPackage.getEjbRef(), null, "ejbReferences", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_ResourceEnvRefs(), theCommonPackage.getResourceEnvRef(), null, "resourceEnvRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_CallbackHandler(), theJavaRefPackage.getJavaClass(), null, "callbackHandler", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_ServiceRefs(), theWebservice_clientPackage.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_MessageDestinationRefs(), theCommonPackage.getMessageDestinationRef(), null, "messageDestinationRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getApplicationClient_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(resAuthApplicationTypeEEnum, ResAuthApplicationType.class, "ResAuthApplicationType"); //$NON-NLS-1$ + addEEnumLiteral(resAuthApplicationTypeEEnum, ResAuthApplicationType.APPLICATION_LITERAL); + addEEnumLiteral(resAuthApplicationTypeEEnum, ResAuthApplicationType.CONTAINER_LITERAL); + + // Create resource + createResource(eNS_URI); + } +} //ClientPackageImpl + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientAdapterFactory.java new file mode 100644 index 000000000..6006b02f4 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientAdapterFactory.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; + + + +public class ClientAdapterFactory extends AdapterFactoryImpl { + protected static ClientPackage modelPackage; + + public ClientAdapterFactory() { + if (modelPackage == null) { + modelPackage = (ClientPackage)EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + protected ClientSwitch sw = new ClientSwitch() { + public Object caseApplicationClient(ApplicationClient object) { + return createApplicationClientAdapter(); + } + }; + + public Adapter createAdapter(Notifier target) { + return (Adapter)sw.doSwitch((EObject)target); + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createApplicationClientAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected ClientSwitch modelSwitch = + new ClientSwitch() { + public Object caseApplicationClient(ApplicationClient object) { + return createApplicationClientAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createApplicationClientAdapterGen() { + + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ClientAdapterFactory + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientSwitch.java new file mode 100644 index 000000000..ccaca19c1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/client/util/ClientSwitch.java @@ -0,0 +1,140 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.client.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.client.ApplicationClient; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.client.ClientPackage + * @generated + */ +public class ClientSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static ClientPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ClientSwitch() { + if (modelPackage == null) { + modelPackage = ClientPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case ClientPackage.APPLICATION_CLIENT: { + ApplicationClient applicationClient = (ApplicationClient)theEObject; + Object result = caseApplicationClient(applicationClient); + if (result == null) result = caseCompatibilityDescriptionGroup(applicationClient); + if (result == null) result = caseDescriptionGroup(applicationClient); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Application Client'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Application Client'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseApplicationClient(ApplicationClient object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //ClientSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonFactoryImpl.java new file mode 100644 index 000000000..7530eedb4 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonFactoryImpl.java @@ -0,0 +1,369 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EjbRefType; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.EnvEntryType; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.Identity; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.common.ResAuthTypeBase; +import org.eclipse.jst.j2ee.common.ResSharingScopeType; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.common.UseCallerIdentity; + + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory { + /** + * Creates and instance of the factory. + * + * + * @generated + */ + public CommonFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CommonPackage.EJB_REF: return createEjbRef(); + case CommonPackage.ENV_ENTRY: return createEnvEntry(); + case CommonPackage.RESOURCE_REF: return createResourceRef(); + case CommonPackage.SECURITY_ROLE_REF: return createSecurityRoleRef(); + case CommonPackage.SECURITY_ROLE: return createSecurityRole(); + case CommonPackage.RESOURCE_ENV_REF: return createResourceEnvRef(); + case CommonPackage.EJB_LOCAL_REF: return createEJBLocalRef(); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY: return createRunAsSpecifiedIdentity(); + case CommonPackage.IDENTITY: return createIdentity(); + case CommonPackage.ICON_TYPE: return createIconType(); + case CommonPackage.DISPLAY_NAME: return createDisplayName(); + case CommonPackage.MESSAGE_DESTINATION_REF: return createMessageDestinationRef(); + case CommonPackage.MESSAGE_DESTINATION: return createMessageDestination(); + case CommonPackage.PARAM_VALUE: return createParamValue(); + case CommonPackage.DESCRIPTION_GROUP: return createDescriptionGroup(); + case CommonPackage.SECURITY_IDENTITY: return createSecurityIdentity(); + case CommonPackage.USE_CALLER_IDENTITY: return createUseCallerIdentity(); + case CommonPackage.DESCRIPTION: return createDescription(); + case CommonPackage.QNAME: return createQName(); + case CommonPackage.LISTENER: return createListener(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP: return createCompatibilityDescriptionGroup(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case CommonPackage.ENV_ENTRY_TYPE: + return EnvEntryType.get(initialValue); + case CommonPackage.RES_AUTH_TYPE_BASE: + return ResAuthTypeBase.get(initialValue); + case CommonPackage.EJB_REF_TYPE: + return EjbRefType.get(initialValue); + case CommonPackage.RES_SHARING_SCOPE_TYPE: + return ResSharingScopeType.get(initialValue); + case CommonPackage.MESSAGE_DESTINATION_USAGE_TYPE: + return MessageDestinationUsageType.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case CommonPackage.ENV_ENTRY_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case CommonPackage.RES_AUTH_TYPE_BASE: + return instanceValue == null ? null : instanceValue.toString(); + case CommonPackage.EJB_REF_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case CommonPackage.RES_SHARING_SCOPE_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case CommonPackage.MESSAGE_DESTINATION_USAGE_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public EjbRef createEjbRef() { + EjbRefImpl ejbRef = new EjbRefImpl(); + return ejbRef; + } + + /** + * + * + * @generated + */ + public EnvEntry createEnvEntry() { + EnvEntryImpl envEntry = new EnvEntryImpl(); + return envEntry; + } + + /** + * + * + * @generated + */ + public ResourceRef createResourceRef() { + ResourceRefImpl resourceRef = new ResourceRefImpl(); + return resourceRef; + } + + /** + * + * + * @generated + */ + public SecurityRoleRef createSecurityRoleRef() { + SecurityRoleRefImpl securityRoleRef = new SecurityRoleRefImpl(); + return securityRoleRef; + } + + /** + * + * + * @generated + */ + public SecurityRole createSecurityRole() { + SecurityRoleImpl securityRole = new SecurityRoleImpl(); + return securityRole; + } + + /** + * + * + * @generated + */ + public ResourceEnvRef createResourceEnvRef() { + ResourceEnvRefImpl resourceEnvRef = new ResourceEnvRefImpl(); + return resourceEnvRef; + } + + /** + * + * + * @generated + */ + public EJBLocalRef createEJBLocalRef() { + EJBLocalRefImpl ejbLocalRef = new EJBLocalRefImpl(); + return ejbLocalRef; + } + + /** + * + * + * @generated + */ + public RunAsSpecifiedIdentity createRunAsSpecifiedIdentity() { + RunAsSpecifiedIdentityImpl runAsSpecifiedIdentity = new RunAsSpecifiedIdentityImpl(); + return runAsSpecifiedIdentity; + } + + /** + * + * + * @generated + */ + public Identity createIdentity() { + IdentityImpl identity = new IdentityImpl(); + return identity; + } + + /** + * + * + * @generated + */ + public IconType createIconType() { + IconTypeImpl iconType = new IconTypeImpl(); + return iconType; + } + + /** + * + * + * @generated + */ + public DisplayName createDisplayName() { + DisplayNameImpl displayName = new DisplayNameImpl(); + return displayName; + } + + /** + * + * + * @generated + */ + public MessageDestinationRef createMessageDestinationRef() { + MessageDestinationRefImpl messageDestinationRef = new MessageDestinationRefImpl(); + return messageDestinationRef; + } + + /** + * + * + * @generated + */ + public MessageDestination createMessageDestination() { + MessageDestinationImpl messageDestination = new MessageDestinationImpl(); + return messageDestination; + } + + /** + * + * + * @generated + */ + public ParamValue createParamValue() { + ParamValueImpl paramValue = new ParamValueImpl(); + return paramValue; + } + + /** + * + * + * @generated + */ + public DescriptionGroup createDescriptionGroup() { + DescriptionGroupImpl descriptionGroup = new DescriptionGroupImpl(); + return descriptionGroup; + } + + /** + * + * + * @generated + */ + public SecurityIdentity createSecurityIdentity() { + SecurityIdentityImpl securityIdentity = new SecurityIdentityImpl(); + return securityIdentity; + } + + /** + * + * + * @generated + */ + public UseCallerIdentity createUseCallerIdentity() { + UseCallerIdentityImpl useCallerIdentity = new UseCallerIdentityImpl(); + return useCallerIdentity; + } + + /** + * + * + * @generated + */ + public Description createDescription() { + DescriptionImpl description = new DescriptionImpl(); + return description; + } + + /** + * + * + * @generated + */ + public QName createQName() { + QNameImpl qName = new QNameImpl(); + return qName; + } + + /** + * + * + * @generated + */ + public Listener createListener() { + ListenerImpl listener = new ListenerImpl(); + return listener; + } + + /** + * + * + * @generated + */ + public CompatibilityDescriptionGroup createCompatibilityDescriptionGroup() { + CompatibilityDescriptionGroupImpl compatibilityDescriptionGroup = new CompatibilityDescriptionGroupImpl(); + return compatibilityDescriptionGroup; + } + + /** + * + * + * @generated + */ + public CommonPackage getCommonPackage() { + return (CommonPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + public static CommonPackage getPackage() { + return CommonPackage.eINSTANCE; + } +} //CommonFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonPackageImpl.java new file mode 100644 index 000000000..53a52ce05 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CommonPackageImpl.java @@ -0,0 +1,1502 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EjbRefType; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.EnvEntryType; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.Identity; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.common.ResAuthTypeBase; +import org.eclipse.jst.j2ee.common.ResSharingScopeType; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.common.UseCallerIdentity; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class CommonPackageImpl extends EPackageImpl implements CommonPackage, EPackage { + /** + * + * + * @generated + */ + private EClass ejbRefEClass = null; + + /** + * + * + * @generated + */ + private EClass envEntryEClass = null; + + /** + * + * + * @generated + */ + private EClass resourceRefEClass = null; + + /** + * + * + * @generated + */ + private EClass securityRoleRefEClass = null; + + /** + * + * + * @generated + */ + private EClass securityRoleEClass = null; + + /** + * + * + * @generated + */ + private EClass resourceEnvRefEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbLocalRefEClass = null; + + /** + * + * + * @generated + */ + private EClass runAsSpecifiedIdentityEClass = null; + + /** + * + * + * @generated + */ + private EClass securityIdentityEClass = null; + + /** + * + * + * @generated + */ + private EClass identityEClass = null; + + /** + * + * + * @generated + */ + private EClass iconTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass displayNameEClass = null; + + /** + * + * + * @generated + */ + private EClass messageDestinationRefEClass = null; + + /** + * + * + * @generated + */ + private EClass messageDestinationEClass = null; + + /** + * + * + * @generated + */ + private EClass paramValueEClass = null; + + /** + * + * + * @generated + */ + private EClass descriptionGroupEClass = null; + + /** + * + * + * @generated + */ + private EClass jndiEnvRefsGroupEClass = null; + + /** + * + * + * @generated + */ + private EClass useCallerIdentityEClass = null; + + /** + * + * + * @generated + */ + private EClass descriptionEClass = null; + + /** + * + * + * @generated + */ + private EClass qNameEClass = null; + + /** + * + * + * @generated + */ + private EClass listenerEClass = null; + + /** + * + * + * @generated + */ + private EClass compatibilityDescriptionGroupEClass = null; + + /** + * + * + * @generated + */ + private EEnum envEntryTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum resAuthTypeBaseEEnum = null; + + /** + * + * + * @generated + */ + private EEnum ejbRefTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum resSharingScopeTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum messageDestinationUsageTypeEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private CommonPackageImpl() { + super(eNS_URI, CommonFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static CommonPackage init() { + if (isInited) return (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Obtain or create and register package. + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new CommonPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackageImpl.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); + + // Step 1: create meta-model objects + theCommonPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + + // Step 2: complete initialization + theCommonPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + + return theCommonPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSecurityRole() { + return securityRoleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityRole_Description() { + return (EAttribute)securityRoleEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityRole_RoleName() { + return (EAttribute)securityRoleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSecurityRole_Descriptions() { + return (EReference)securityRoleEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getResourceRef() { + return resourceRefEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_Description() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_Name() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_Type() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_Auth() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_Link() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceRef_ResSharingScope() { + return (EAttribute)resourceRefEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getResourceRef_Descriptions() { + return (EReference)resourceRefEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEjbRef() { + return ejbRefEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Name() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Type() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Home() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Remote() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Link() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEjbRef_Description() { + return (EAttribute)ejbRefEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getEjbRef_Descriptions() { + return (EReference)ejbRefEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEJBLocalRef() { + return ejbLocalRefEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEJBLocalRef_LocalHome() { + return (EAttribute)ejbLocalRefEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getEJBLocalRef_Local() { + return (EAttribute)ejbLocalRefEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEnvEntry() { + return envEntryEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEnvEntry_Description() { + return (EAttribute)envEntryEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEnvEntry_Name() { + return (EAttribute)envEntryEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEnvEntry_Value() { + return (EAttribute)envEntryEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEnvEntry_Type() { + return (EAttribute)envEntryEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getEnvEntry_Descriptions() { + return (EReference)envEntryEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSecurityRoleRef() { + return securityRoleRefEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityRoleRef_Name() { + return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityRoleRef_Description() { + return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityRoleRef_Link() { + return (EAttribute)securityRoleRefEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getSecurityRoleRef_Descriptions() { + return (EReference)securityRoleRefEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getRunAsSpecifiedIdentity() { + return runAsSpecifiedIdentityEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getRunAsSpecifiedIdentity_Identity() { + return (EReference)runAsSpecifiedIdentityEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSecurityIdentity() { + return securityIdentityEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityIdentity_Description() { + return (EAttribute)securityIdentityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSecurityIdentity_Descriptions() { + return (EReference)securityIdentityEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getUseCallerIdentity() { + return useCallerIdentityEClass; + } + + /** + * + * + * @generated + */ + public EClass getDescription() { + return descriptionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDescription_Lang() { + return (EAttribute)descriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDescription_Value() { + return (EAttribute)descriptionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getQName() { + return qNameEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getQName_NamespaceURI() { + return (EAttribute)qNameEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getQName_LocalPart() { + return (EAttribute)qNameEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getQName_CombinedQName() { + return (EAttribute)qNameEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getQName_InternalPrefixOrNsURI() { + return (EAttribute)qNameEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getListener() { + return listenerEClass; + } + + /** + * + * + * @generated + */ + public EReference getListener_ListenerClass() { + return (EReference)listenerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCompatibilityDescriptionGroup() { + return compatibilityDescriptionGroupEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCompatibilityDescriptionGroup_SmallIcon() { + return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCompatibilityDescriptionGroup_LargeIcon() { + return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCompatibilityDescriptionGroup_Description() { + return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCompatibilityDescriptionGroup_DisplayName() { + return (EAttribute)compatibilityDescriptionGroupEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getIdentity() { + return identityEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getIdentity_Description() { + return (EAttribute)identityEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getIdentity_RoleName() { + return (EAttribute)identityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getIdentity_Descriptions() { + return (EReference)identityEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getIconType() { + return iconTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIconType_SmallIcon() { + return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getIconType_LargeIcon() { + return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getIconType_Lang() { + return (EAttribute)iconTypeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getDisplayName() { + return displayNameEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDisplayName_Lang() { + return (EAttribute)displayNameEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDisplayName_Value() { + return (EAttribute)displayNameEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getMessageDestinationRef() { + return messageDestinationRefEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDestinationRef_Name() { + return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDestinationRef_Type() { + return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDestinationRef_Usage() { + return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDestinationRef_Link() { + return (EAttribute)messageDestinationRefEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getMessageDestinationRef_Descriptions() { + return (EReference)messageDestinationRefEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getMessageDestination() { + return messageDestinationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDestination_Name() { + return (EAttribute)messageDestinationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getParamValue() { + return paramValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getParamValue_Name() { + return (EAttribute)paramValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getParamValue_Value() { + return (EAttribute)paramValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getParamValue_Description() { + return (EAttribute)paramValueEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getParamValue_Descriptions() { + return (EReference)paramValueEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getDescriptionGroup() { + return descriptionGroupEClass; + } + + /** + * + * + * @generated + */ + public EReference getDescriptionGroup_Icons() { + return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDescriptionGroup_DisplayNames() { + return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDescriptionGroup_Descriptions() { + return (EReference)descriptionGroupEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getJNDIEnvRefsGroup() { + return jndiEnvRefsGroupEClass; + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_EnvironmentProperties() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_ResourceRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_EjbRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_ResourceEnvRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_EjbLocalRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_MessageDestinationRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getJNDIEnvRefsGroup_ServiceRefs() { + return (EReference)jndiEnvRefsGroupEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getResourceEnvRef() { + return resourceEnvRefEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceEnvRef_Description() { + return (EAttribute)resourceEnvRefEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceEnvRef_Name() { + return (EAttribute)resourceEnvRefEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getResourceEnvRef_Type() { + return (EReference)resourceEnvRefEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getResourceEnvRef_Descriptions() { + return (EReference)resourceEnvRefEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getEjbRefType() { + return ejbRefTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getEnvEntryType() { + return envEntryTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getResAuthTypeBase() { + return resAuthTypeBaseEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getResSharingScopeType() { + return resSharingScopeTypeEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getMessageDestinationUsageType() { + return messageDestinationUsageTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public CommonFactory getCommonFactory() { + return (CommonFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + ejbRefEClass = createEClass(EJB_REF); + createEAttribute(ejbRefEClass, EJB_REF__NAME); + createEAttribute(ejbRefEClass, EJB_REF__TYPE); + createEAttribute(ejbRefEClass, EJB_REF__HOME); + createEAttribute(ejbRefEClass, EJB_REF__REMOTE); + createEAttribute(ejbRefEClass, EJB_REF__LINK); + createEAttribute(ejbRefEClass, EJB_REF__DESCRIPTION); + createEReference(ejbRefEClass, EJB_REF__DESCRIPTIONS); + + envEntryEClass = createEClass(ENV_ENTRY); + createEAttribute(envEntryEClass, ENV_ENTRY__DESCRIPTION); + createEAttribute(envEntryEClass, ENV_ENTRY__NAME); + createEAttribute(envEntryEClass, ENV_ENTRY__VALUE); + createEAttribute(envEntryEClass, ENV_ENTRY__TYPE); + createEReference(envEntryEClass, ENV_ENTRY__DESCRIPTIONS); + + resourceRefEClass = createEClass(RESOURCE_REF); + createEAttribute(resourceRefEClass, RESOURCE_REF__DESCRIPTION); + createEAttribute(resourceRefEClass, RESOURCE_REF__NAME); + createEAttribute(resourceRefEClass, RESOURCE_REF__TYPE); + createEAttribute(resourceRefEClass, RESOURCE_REF__AUTH); + createEAttribute(resourceRefEClass, RESOURCE_REF__LINK); + createEAttribute(resourceRefEClass, RESOURCE_REF__RES_SHARING_SCOPE); + createEReference(resourceRefEClass, RESOURCE_REF__DESCRIPTIONS); + + securityRoleRefEClass = createEClass(SECURITY_ROLE_REF); + createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__NAME); + createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__DESCRIPTION); + createEAttribute(securityRoleRefEClass, SECURITY_ROLE_REF__LINK); + createEReference(securityRoleRefEClass, SECURITY_ROLE_REF__DESCRIPTIONS); + + securityRoleEClass = createEClass(SECURITY_ROLE); + createEAttribute(securityRoleEClass, SECURITY_ROLE__DESCRIPTION); + createEAttribute(securityRoleEClass, SECURITY_ROLE__ROLE_NAME); + createEReference(securityRoleEClass, SECURITY_ROLE__DESCRIPTIONS); + + resourceEnvRefEClass = createEClass(RESOURCE_ENV_REF); + createEAttribute(resourceEnvRefEClass, RESOURCE_ENV_REF__DESCRIPTION); + createEAttribute(resourceEnvRefEClass, RESOURCE_ENV_REF__NAME); + createEReference(resourceEnvRefEClass, RESOURCE_ENV_REF__TYPE); + createEReference(resourceEnvRefEClass, RESOURCE_ENV_REF__DESCRIPTIONS); + + ejbLocalRefEClass = createEClass(EJB_LOCAL_REF); + createEAttribute(ejbLocalRefEClass, EJB_LOCAL_REF__LOCAL_HOME); + createEAttribute(ejbLocalRefEClass, EJB_LOCAL_REF__LOCAL); + + runAsSpecifiedIdentityEClass = createEClass(RUN_AS_SPECIFIED_IDENTITY); + createEReference(runAsSpecifiedIdentityEClass, RUN_AS_SPECIFIED_IDENTITY__IDENTITY); + + identityEClass = createEClass(IDENTITY); + createEAttribute(identityEClass, IDENTITY__DESCRIPTION); + createEAttribute(identityEClass, IDENTITY__ROLE_NAME); + createEReference(identityEClass, IDENTITY__DESCRIPTIONS); + + iconTypeEClass = createEClass(ICON_TYPE); + createEAttribute(iconTypeEClass, ICON_TYPE__SMALL_ICON); + createEAttribute(iconTypeEClass, ICON_TYPE__LARGE_ICON); + createEAttribute(iconTypeEClass, ICON_TYPE__LANG); + + displayNameEClass = createEClass(DISPLAY_NAME); + createEAttribute(displayNameEClass, DISPLAY_NAME__LANG); + createEAttribute(displayNameEClass, DISPLAY_NAME__VALUE); + + messageDestinationRefEClass = createEClass(MESSAGE_DESTINATION_REF); + createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__NAME); + createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__TYPE); + createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__USAGE); + createEAttribute(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__LINK); + createEReference(messageDestinationRefEClass, MESSAGE_DESTINATION_REF__DESCRIPTIONS); + + messageDestinationEClass = createEClass(MESSAGE_DESTINATION); + createEAttribute(messageDestinationEClass, MESSAGE_DESTINATION__NAME); + + paramValueEClass = createEClass(PARAM_VALUE); + createEAttribute(paramValueEClass, PARAM_VALUE__NAME); + createEAttribute(paramValueEClass, PARAM_VALUE__VALUE); + createEAttribute(paramValueEClass, PARAM_VALUE__DESCRIPTION); + createEReference(paramValueEClass, PARAM_VALUE__DESCRIPTIONS); + + descriptionGroupEClass = createEClass(DESCRIPTION_GROUP); + createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__ICONS); + createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__DISPLAY_NAMES); + createEReference(descriptionGroupEClass, DESCRIPTION_GROUP__DESCRIPTIONS); + + jndiEnvRefsGroupEClass = createEClass(JNDI_ENV_REFS_GROUP); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__RESOURCE_REFS); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__EJB_REFS); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS); + createEReference(jndiEnvRefsGroupEClass, JNDI_ENV_REFS_GROUP__SERVICE_REFS); + + securityIdentityEClass = createEClass(SECURITY_IDENTITY); + createEAttribute(securityIdentityEClass, SECURITY_IDENTITY__DESCRIPTION); + createEReference(securityIdentityEClass, SECURITY_IDENTITY__DESCRIPTIONS); + + useCallerIdentityEClass = createEClass(USE_CALLER_IDENTITY); + + descriptionEClass = createEClass(DESCRIPTION); + createEAttribute(descriptionEClass, DESCRIPTION__LANG); + createEAttribute(descriptionEClass, DESCRIPTION__VALUE); + + qNameEClass = createEClass(QNAME); + createEAttribute(qNameEClass, QNAME__NAMESPACE_URI); + createEAttribute(qNameEClass, QNAME__LOCAL_PART); + createEAttribute(qNameEClass, QNAME__COMBINED_QNAME); + createEAttribute(qNameEClass, QNAME__INTERNAL_PREFIX_OR_NS_URI); + + listenerEClass = createEClass(LISTENER); + createEReference(listenerEClass, LISTENER__LISTENER_CLASS); + + compatibilityDescriptionGroupEClass = createEClass(COMPATIBILITY_DESCRIPTION_GROUP); + createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON); + createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON); + createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION); + createEAttribute(compatibilityDescriptionGroupEClass, COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME); + + // Create enums + envEntryTypeEEnum = createEEnum(ENV_ENTRY_TYPE); + resAuthTypeBaseEEnum = createEEnum(RES_AUTH_TYPE_BASE); + ejbRefTypeEEnum = createEEnum(EJB_REF_TYPE); + resSharingScopeTypeEEnum = createEEnum(RES_SHARING_SCOPE_TYPE); + messageDestinationUsageTypeEEnum = createEEnum(MESSAGE_DESTINATION_USAGE_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); + + // Add supertypes to classes + ejbLocalRefEClass.getESuperTypes().add(this.getEjbRef()); + runAsSpecifiedIdentityEClass.getESuperTypes().add(this.getSecurityIdentity()); + messageDestinationEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); + jndiEnvRefsGroupEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); + useCallerIdentityEClass.getESuperTypes().add(this.getSecurityIdentity()); + listenerEClass.getESuperTypes().add(this.getCompatibilityDescriptionGroup()); + compatibilityDescriptionGroupEClass.getESuperTypes().add(this.getDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(ejbRefEClass, EjbRef.class, "EjbRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEjbRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEjbRef_Type(), this.getEjbRefType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEjbRef_Home(), ecorePackage.getEString(), "home", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEjbRef_Remote(), ecorePackage.getEString(), "remote", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEjbRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEjbRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEjbRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(envEntryEClass, EnvEntry.class, "EnvEntry", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEnvEntry_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEnvEntry_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEnvEntry_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEnvEntry_Type(), this.getEnvEntryType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnvEntry_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(resourceRefEClass, ResourceRef.class, "ResourceRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getResourceRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceRef_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceRef_Auth(), this.getResAuthTypeBase(), "auth", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceRef_ResSharingScope(), this.getResSharingScopeType(), "resSharingScope", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getResourceRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(securityRoleRefEClass, SecurityRoleRef.class, "SecurityRoleRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getSecurityRoleRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getSecurityRoleRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getSecurityRoleRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getSecurityRoleRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(securityRoleEClass, SecurityRole.class, "SecurityRole", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getSecurityRole_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getSecurityRole_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getSecurityRole_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(resourceEnvRefEClass, ResourceEnvRef.class, "ResourceEnvRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getResourceEnvRef_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getResourceEnvRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getResourceEnvRef_Type(), theJavaRefPackage.getJavaClass(), null, "type", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getResourceEnvRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(ejbLocalRefEClass, EJBLocalRef.class, "EJBLocalRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEJBLocalRef_LocalHome(), ecorePackage.getEString(), "localHome", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBLocalRef_Local(), ecorePackage.getEString(), "local", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(runAsSpecifiedIdentityEClass, RunAsSpecifiedIdentity.class, "RunAsSpecifiedIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getRunAsSpecifiedIdentity_Identity(), this.getIdentity(), null, "identity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(identityEClass, Identity.class, "Identity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getIdentity_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getIdentity_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getIdentity_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(iconTypeEClass, IconType.class, "IconType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getIconType_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getIconType_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getIconType_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(displayNameEClass, DisplayName.class, "DisplayName", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getDisplayName_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getDisplayName_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(messageDestinationRefEClass, MessageDestinationRef.class, "MessageDestinationRef", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMessageDestinationRef_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDestinationRef_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDestinationRef_Usage(), this.getMessageDestinationUsageType(), "usage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDestinationRef_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDestinationRef_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(messageDestinationEClass, MessageDestination.class, "MessageDestination", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMessageDestination_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(paramValueEClass, ParamValue.class, "ParamValue", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getParamValue_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getParamValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getParamValue_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getParamValue_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(descriptionGroupEClass, DescriptionGroup.class, "DescriptionGroup", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getDescriptionGroup_Icons(), this.getIconType(), null, "icons", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getDescriptionGroup_DisplayNames(), this.getDisplayName(), null, "displayNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getDescriptionGroup_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(jndiEnvRefsGroupEClass, JNDIEnvRefsGroup.class, "JNDIEnvRefsGroup", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_EnvironmentProperties(), this.getEnvEntry(), null, "environmentProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_ResourceRefs(), this.getResourceRef(), null, "resourceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_EjbRefs(), this.getEjbRef(), null, "ejbRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_ResourceEnvRefs(), this.getResourceEnvRef(), null, "resourceEnvRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_EjbLocalRefs(), this.getEJBLocalRef(), null, "ejbLocalRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_MessageDestinationRefs(), this.getMessageDestinationRef(), null, "messageDestinationRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getJNDIEnvRefsGroup_ServiceRefs(), theWebservice_clientPackage.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(securityIdentityEClass, SecurityIdentity.class, "SecurityIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getSecurityIdentity_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getSecurityIdentity_Descriptions(), this.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(useCallerIdentityEClass, UseCallerIdentity.class, "UseCallerIdentity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + + initEClass(descriptionEClass, Description.class, "Description", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getDescription_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getDescription_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(qNameEClass, QName.class, "QName", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getQName_NamespaceURI(), ecorePackage.getEString(), "namespaceURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getQName_LocalPart(), ecorePackage.getEString(), "localPart", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getQName_CombinedQName(), ecorePackage.getEString(), "combinedQName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getQName_InternalPrefixOrNsURI(), ecorePackage.getEString(), "internalPrefixOrNsURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(listenerEClass, Listener.class, "Listener", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getListener_ListenerClass(), theJavaRefPackage.getJavaClass(), null, "listenerClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(compatibilityDescriptionGroupEClass, CompatibilityDescriptionGroup.class, "CompatibilityDescriptionGroup", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getCompatibilityDescriptionGroup_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getCompatibilityDescriptionGroup_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getCompatibilityDescriptionGroup_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getCompatibilityDescriptionGroup_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(envEntryTypeEEnum, EnvEntryType.class, "EnvEntryType"); //$NON-NLS-1$ + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.STRING_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.INTEGER_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.BOOLEAN_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.DOUBLE_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.BYTE_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.SHORT_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.LONG_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.FLOAT_LITERAL); + addEEnumLiteral(envEntryTypeEEnum, EnvEntryType.CHARACTER_LITERAL); + + initEEnum(resAuthTypeBaseEEnum, ResAuthTypeBase.class, "ResAuthTypeBase"); //$NON-NLS-1$ + addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.CONTAINER_LITERAL); + addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.APPLICATION_LITERAL); + addEEnumLiteral(resAuthTypeBaseEEnum, ResAuthTypeBase.SERVLET_LITERAL); + + initEEnum(ejbRefTypeEEnum, EjbRefType.class, "EjbRefType"); //$NON-NLS-1$ + addEEnumLiteral(ejbRefTypeEEnum, EjbRefType.SESSION_LITERAL); + addEEnumLiteral(ejbRefTypeEEnum, EjbRefType.ENTITY_LITERAL); + + initEEnum(resSharingScopeTypeEEnum, ResSharingScopeType.class, "ResSharingScopeType"); //$NON-NLS-1$ + addEEnumLiteral(resSharingScopeTypeEEnum, ResSharingScopeType.SHAREABLE_LITERAL); + addEEnumLiteral(resSharingScopeTypeEEnum, ResSharingScopeType.UNSHAREABLE_LITERAL); + + initEEnum(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.class, "MessageDestinationUsageType"); //$NON-NLS-1$ + addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.CONSUMES_LITERAL); + addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.PRODUCES_LITERAL); + addEEnumLiteral(messageDestinationUsageTypeEEnum, MessageDestinationUsageType.CONSUMES_PRODUCES_LITERAL); + + // Create resource + createResource(eNS_URI); + } +} //CommonPackageImpl + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CompatibilityDescriptionGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CompatibilityDescriptionGroupImpl.java new file mode 100644 index 000000000..94d0ebd4c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/CompatibilityDescriptionGroupImpl.java @@ -0,0 +1,601 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; + + +/** + * + * An implementation of the model object 'Compatibility Description Group'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getSmallIcon Small Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getLargeIcon Large Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getDescription Description}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl#getDisplayName Display Name}
  • + *
+ *

+ * + * @generated + */ +public class CompatibilityDescriptionGroupImpl extends DescriptionGroupImpl implements CompatibilityDescriptionGroup { + /** + * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected static final String SMALL_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected String smallIcon = SMALL_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected static final String LARGE_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected String largeIcon = LARGE_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected static final String DISPLAY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected String displayName = DISPLAY_NAME_EDEFAULT; + + /** + * + * + * + */ + protected CompatibilityDescriptionGroupImpl() { + super(); + eAdapters().add(new DescriptionGroupAdapter()); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup(); + } + + public String getSmallIcon() { + if(eResource() == null) + return getSmallIconGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getSmallIconGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getIcons().size() > 0) + return ((IconType)getIcons().get(0)).getSmallIcon(); + } + return null; + } + + public void setSmallIcon(String newSmallIcon) { + if(eResource() == null) { + setSmallIconGen(newSmallIcon); + internalSetSmallIconInList(newSmallIcon); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setSmallIconGen(newSmallIcon); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetSmallIconInList(newSmallIcon); + break; + } + } + /** + * @param newSmallIcon + */ + protected void internalSetSmallIconInList(String newSmallIcon) { + IconType newValue = null; + if(getIcons().size() > 0) { + newValue = (IconType) getIcons().get(0); + newValue.setSmallIcon(newSmallIcon); + } + else { + newValue = CommonFactory.eINSTANCE.createIconType(); + newValue.setSmallIcon(newSmallIcon); + getIcons().add(newValue); + } + } + + /** + * + * + * @generated + */ + public String getSmallIconGen() { + return smallIcon; + } + + /** + * + * + * @generated + */ + public void setSmallIconGen(String newSmallIcon) { + String oldSmallIcon = smallIcon; + smallIcon = newSmallIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON, oldSmallIcon, smallIcon)); + } + + public String getLargeIcon() { + if(eResource() == null) + return getLargeIconGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getLargeIconGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getIcons().size() > 0) + return ((IconType)getIcons().get(0)).getLargeIcon(); + } + return null; + } + + public void setLargeIcon(String newLargeIcon) { + if(eResource() == null) { + setLargeIconGen(newLargeIcon); + internalSetLargeIconInList(newLargeIcon); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setLargeIconGen(newLargeIcon); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetLargeIconInList(newLargeIcon); + break; + } + } + + /** + * @param newLargeIcon + */ + protected void internalSetLargeIconInList(String newLargeIcon) { + IconType newValue = null; + if(getIcons().size() > 0) { + newValue = (IconType) getIcons().get(0); + newValue.setLargeIcon(newLargeIcon); + } + else { + newValue = CommonFactory.eINSTANCE.createIconType(); + newValue.setLargeIcon(newLargeIcon); + getIcons().add(newValue); + } + + } + + /** + * + * + * @generated + */ + public String getLargeIconGen() { + return largeIcon; + } + + /** + * + * + * @generated + */ + public void setLargeIconGen(String newLargeIcon) { + String oldLargeIcon = largeIcon; + largeIcon = newLargeIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON, oldLargeIcon, largeIcon)); + } + + public String getDescription() { + if(eResource() == null) + return getDescriptionGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getDescriptionGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getDescriptions().size() > 0) + return ((Description)getDescriptions().get(0)).getValue(); + } + return null; + } + + public void setDescription(String newDescription) { + if(eResource() == null) { + setDescriptionGen(newDescription); + internalSetDescriptionInList(newDescription); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setDescriptionGen(newDescription); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetDescriptionInList(newDescription); + break; + } + } + + /** + * @param newDescription + */ + protected void internalSetDescriptionInList(String newDescription) { + Description newValue = null; + if(getDescriptions().size() > 0) { + newValue = (Description) getDescriptions().get(0); + newValue.setValue(newDescription); + } + else { + newValue = CommonFactory.eINSTANCE.createDescription(); + newValue.setValue(newDescription); + getDescriptions().add(newValue); + } + + } + + /** + * + * + * @generated + */ + public String getDescriptionGen() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescriptionGen(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION, oldDescription, description)); + } + + public String getDisplayName() { + if(eResource() == null) + return getDisplayNameGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getDisplayNameGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getDisplayNames().size() > 0) + return ((DisplayName)getDisplayNames().get(0)).getValue(); + } + return null; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#setDisplayName(java.lang.String) + */ + public void setDisplayName(String newDisplayName) { + if(eResource() == null) { + setDisplayNameGen(newDisplayName); + internalSetDisplayNameInList(newDisplayName); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setDisplayNameGen(newDisplayName); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetDisplayNameInList(newDisplayName); + break; + } + } + + /** + * @param newDisplayName + */ + protected void internalSetDisplayNameInList(String newDisplayName) { + DisplayName newValue = null; + if(getDisplayNames().size() > 0) { + newValue = (DisplayName) getDisplayNames().get(0); + newValue.setValue(newDisplayName); + } + else { + newValue = CommonFactory.eINSTANCE.createDisplayName(); + newValue.setValue(newDisplayName); + getDisplayNames().add(newValue); + } + + } + + /** + * + * + * @generated + */ + public String getDisplayNameGen() { + return displayName; + } + + /** + * + * + * @generated + */ + public void setDisplayNameGen(String newDisplayName) { + String oldDisplayName = displayName; + displayName = newDisplayName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME, oldDisplayName, displayName)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: + return getIcons(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: + return getDisplayNames(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: + return getSmallIcon(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: + return getLargeIcon(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: + return getDescription(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: + return getDisplayName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: + getIcons().clear(); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__ICONS: + return icons != null && !icons.isEmpty(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (smallIcon: "); //$NON-NLS-1$ + result.append(smallIcon); + result.append(", largeIcon: "); //$NON-NLS-1$ + result.append(largeIcon); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(", displayName: "); //$NON-NLS-1$ + result.append(displayName); + result.append(')'); + return result.toString(); + } + +} //CompatibilityDescriptionGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupAdapter.java new file mode 100644 index 000000000..a3d2f3ee4 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupAdapter.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 3, 2004 + * + * To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.IconType; + + + +/** + * @author cbridgha + * + * To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ + public class DescriptionGroupAdapter extends AdapterImpl { + + /* (non-Javadoc) + * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification) + */ + public void notifyChanged(Notification msg) { + if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Icons() || + msg.getFeature() == CommonPackage.eINSTANCE.getIconType_LargeIcon() || + msg.getFeature() == CommonPackage.eINSTANCE.getIconType_SmallIcon()) { + synchIcons(); + return; + } + else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Descriptions() || + msg.getFeature() == CommonPackage.eINSTANCE.getDescription_Value()) { + synchDescription(); + return; + } + else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames() || + msg.getFeature() == CommonPackage.eINSTANCE.getDisplayName_Value()) { + synchDisplayName(); + return; + } + + } + + /** + * + */ + private void synchDescription() { + CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); + if (myTarget.getDescriptions().isEmpty()) + myTarget.setDescriptionGen(null); + else { + Description aDescription = (Description)myTarget.getDescriptions().get(0); + if (!aDescription.eAdapters().contains(this)) + aDescription.eAdapters().add(this); + else + myTarget.setDescriptionGen(aDescription.getValue()); + } + } + + /** + * + */ + private void synchDisplayName() { + CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); + if (myTarget.getDisplayNames().isEmpty()) + myTarget.setDisplayNameGen(null); + else { + DisplayName aDisplayName = (DisplayName)myTarget.getDisplayNames().get(0); + if (!aDisplayName.eAdapters().contains(this)) + aDisplayName.eAdapters().add(this); + myTarget.setDisplayNameGen(aDisplayName.getValue()); + } + } + + /** + * + */ + private void synchIcons() { + CompatibilityDescriptionGroup myTarget = (CompatibilityDescriptionGroup)getTarget(); + if (myTarget.getIcons().isEmpty()) { + myTarget.setLargeIconGen(null); + myTarget.setSmallIconGen(null); + } + else { + IconType anIcon = (IconType)myTarget.getIcons().get(0); + if (!anIcon.eAdapters().contains(this)) + anIcon.eAdapters().add(this); + else { + myTarget.setLargeIconGen(anIcon.getLargeIcon()); + myTarget.setSmallIconGen(anIcon.getSmallIcon()); + } + } + } + + /* (non-Javadoc) + * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier) + */ + public void setTarget(Notifier newTarget) { + if (newTarget instanceof CompatibilityDescriptionGroup) + super.setTarget(newTarget); + } +} \ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupImpl.java new file mode 100644 index 000000000..4927789cd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionGroupImpl.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; + + +/** + * An implementation of the model object 'Description Group'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getIcons Icons}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getDisplayNames Display Names}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl#getDescriptions Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class DescriptionGroupImpl extends EObjectImpl implements DescriptionGroup { + /** + * The cached value of the '{@link #getIcons() Icons}' containment reference list. + * + * + * @see #getIcons() @generated @ordered + */ + protected EList icons = null; + + /** + * The cached value of the '{@link #getDisplayNames() Display Names}' containment + * reference list. + * + * @see #getDisplayNames() @generated @ordered + */ + protected EList displayNames = null; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment + * reference list. + * + * @see #getDescriptions() @generated @ordered + */ + protected EList descriptions = null; + + /** + * @generated + */ + protected DescriptionGroupImpl() { + super(); + } + + /** + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getDescriptionGroup(); + } + + /** + * @generated + */ + public EList getIcons() { + if (icons == null) { + icons = new EObjectContainmentEList(IconType.class, this, CommonPackage.DESCRIPTION_GROUP__ICONS); + } + return icons; + } + + /** + * @generated + */ + public EList getDisplayNames() { + if (displayNames == null) { + displayNames = new EObjectContainmentEList(DisplayName.class, this, CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES); + } + return displayNames; + } + + /** + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS); + } + return descriptions; + } + + /** + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.DESCRIPTION_GROUP__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION_GROUP__ICONS: + return getIcons(); + case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: + return getDisplayNames(); + case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION_GROUP__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION_GROUP__ICONS: + getIcons().clear(); + return; + case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION_GROUP__ICONS: + return icons != null && !icons.isEmpty(); + case CommonPackage.DESCRIPTION_GROUP__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case CommonPackage.DESCRIPTION_GROUP__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#getJ2EEVersionID() + */ + public int getJ2EEVersionID() throws IllegalStateException { + + try { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) + throw new IllegalStateException(); + return res.getJ2EEVersionID(); + } catch (ClassCastException exception) { + return J2EEVersionConstants.J2EE_1_3_ID; + } + + } + +} //DescriptionGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionImpl.java new file mode 100644 index 000000000..15a022d1c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DescriptionImpl.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; + + +/** + * + * An implementation of the model object 'Description'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionImpl#getLang Lang}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DescriptionImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class DescriptionImpl extends EObjectImpl implements Description { + /** + * The default value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected static final String LANG_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected String lang = LANG_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DescriptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getDescription(); + } + + /** + * + * + * @generated + */ + public String getLang() { + return lang; + } + + /** + * + * + * @generated + */ + public void setLang(String newLang) { + String oldLang = lang; + lang = newLang; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DESCRIPTION__LANG, oldLang, lang)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DESCRIPTION__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION__LANG: + return getLang(); + case CommonPackage.DESCRIPTION__VALUE: + return getValue(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION__LANG: + setLang((String)newValue); + return; + case CommonPackage.DESCRIPTION__VALUE: + setValue((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION__LANG: + setLang(LANG_EDEFAULT); + return; + case CommonPackage.DESCRIPTION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DESCRIPTION__LANG: + return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); + case CommonPackage.DESCRIPTION__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (lang: "); //$NON-NLS-1$ + result.append(lang); + result.append(", value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} //DescriptionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DisplayNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DisplayNameImpl.java new file mode 100644 index 000000000..efa84c7b0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/DisplayNameImpl.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.DisplayName; + + +/** + * + * An implementation of the model object 'Display Name'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DisplayNameImpl#getLang Lang}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.DisplayNameImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class DisplayNameImpl extends EObjectImpl implements DisplayName { + /** + * The default value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected static final String LANG_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected String lang = LANG_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DisplayNameImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getDisplayName(); + } + + /** + * + * + * @generated + */ + public String getLang() { + return lang; + } + + /** + * + * + * @generated + */ + public void setLang(String newLang) { + String oldLang = lang; + lang = newLang; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DISPLAY_NAME__LANG, oldLang, lang)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.DISPLAY_NAME__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DISPLAY_NAME__LANG: + return getLang(); + case CommonPackage.DISPLAY_NAME__VALUE: + return getValue(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DISPLAY_NAME__LANG: + setLang((String)newValue); + return; + case CommonPackage.DISPLAY_NAME__VALUE: + setValue((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DISPLAY_NAME__LANG: + setLang(LANG_EDEFAULT); + return; + case CommonPackage.DISPLAY_NAME__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.DISPLAY_NAME__LANG: + return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); + case CommonPackage.DISPLAY_NAME__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (lang: "); //$NON-NLS-1$ + result.append(lang); + result.append(", value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} //DisplayNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EJBLocalRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EJBLocalRefImpl.java new file mode 100644 index 000000000..bc40268b7 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EJBLocalRefImpl.java @@ -0,0 +1,333 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EjbRefType; + +/** + * The ejb-local-ref element is used for the declaration of a reference to another enterprise bean's local home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing enterprise bean; the expected type of the referenced enterprise bean; the expected local home and local interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. + * Used in: entity, session, message-driven + */ +public class EJBLocalRefImpl extends EjbRefImpl implements EJBLocalRef, EjbRef{ + + /** + * The default value of the '{@link #getLocalHome() Local Home}' attribute. + * + * + * @see #getLocalHome() + * @generated + * @ordered + */ + protected static final String LOCAL_HOME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalHome() Local Home}' attribute. + * + * + * @see #getLocalHome() + * @generated + * @ordered + */ + protected String localHome = LOCAL_HOME_EDEFAULT; + + /** + * The default value of the '{@link #getLocal() Local}' attribute. + * + * + * @see #getLocal() + * @generated + * @ordered + */ + protected static final String LOCAL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocal() Local}' attribute. + * + * + * @see #getLocal() + * @generated + * @ordered + */ + protected String local = LOCAL_EDEFAULT; + + public EJBLocalRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getEJBLocalRef(); + } + + /** + * + * + * @generated + */ + public String getLocalHome() { + return localHome; + } + + /** + * + * + * @generated + */ + public void setLocalHome(String newLocalHome) { + String oldLocalHome = localHome; + localHome = newLocalHome; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_LOCAL_REF__LOCAL_HOME, oldLocalHome, localHome)); + } + + /** + * + * + * @generated + */ + public String getLocal() { + return local; + } + + /** + * + * + * @generated + */ + public void setLocal(String newLocal) { + String oldLocal = local; + local = newLocal; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_LOCAL_REF__LOCAL, oldLocal, local)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_LOCAL_REF__NAME: + return getName(); + case CommonPackage.EJB_LOCAL_REF__TYPE: + return getType(); + case CommonPackage.EJB_LOCAL_REF__HOME: + return getHome(); + case CommonPackage.EJB_LOCAL_REF__REMOTE: + return getRemote(); + case CommonPackage.EJB_LOCAL_REF__LINK: + return getLink(); + case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: + return getDescription(); + case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: + return getLocalHome(); + case CommonPackage.EJB_LOCAL_REF__LOCAL: + return getLocal(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_LOCAL_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__TYPE: + setType((EjbRefType)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__HOME: + setHome((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__REMOTE: + setRemote((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__LINK: + setLink((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: + setLocalHome((String)newValue); + return; + case CommonPackage.EJB_LOCAL_REF__LOCAL: + setLocal((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_LOCAL_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__TYPE: + unsetType(); + return; + case CommonPackage.EJB_LOCAL_REF__HOME: + setHome(HOME_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__REMOTE: + setRemote(REMOTE_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__LINK: + setLink(LINK_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: + setLocalHome(LOCAL_HOME_EDEFAULT); + return; + case CommonPackage.EJB_LOCAL_REF__LOCAL: + setLocal(LOCAL_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_LOCAL_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.EJB_LOCAL_REF__TYPE: + return isSetType(); + case CommonPackage.EJB_LOCAL_REF__HOME: + return HOME_EDEFAULT == null ? home != null : !HOME_EDEFAULT.equals(home); + case CommonPackage.EJB_LOCAL_REF__REMOTE: + return REMOTE_EDEFAULT == null ? remote != null : !REMOTE_EDEFAULT.equals(remote); + case CommonPackage.EJB_LOCAL_REF__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case CommonPackage.EJB_LOCAL_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.EJB_LOCAL_REF__LOCAL_HOME: + return LOCAL_HOME_EDEFAULT == null ? localHome != null : !LOCAL_HOME_EDEFAULT.equals(localHome); + case CommonPackage.EJB_LOCAL_REF__LOCAL: + return LOCAL_EDEFAULT == null ? local != null : !LOCAL_EDEFAULT.equals(local); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (localHome: "); //$NON-NLS-1$ + result.append(localHome); + result.append(", local: "); //$NON-NLS-1$ + result.append(local); + result.append(')'); + return result.toString(); + } + +/** + * Return true if the ejbref is for a local ejb interface. + */ +public boolean isLocal(){ + return true; +} + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.EJB_LOCAL_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.EjbRef#getRemote() + */ + public String getRemote() { + return getLocal(); //forward to the local + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.EjbRef#setRemote(java.lang.String) + */ + public void setRemote(String value) { + setLocal(value); //forward to the local + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.EjbRef#getHome() + */ + public String getHome() { + return getLocalHome(); //forward to the local home + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.EjbRef#setHome(java.lang.String) + */ + public void setHome(String value) { + setLocalHome(value); //forward to the local home + } +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EjbRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EjbRefImpl.java new file mode 100644 index 000000000..79058066d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EjbRefImpl.java @@ -0,0 +1,514 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EjbRefType; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; + +/** + * The ejb-ref element is used for the declaration of a reference to an enterprise bean's home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing application client; the expected type of the referenced enterprise bean; the expected home and remote interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. + */ +public class EjbRefImpl extends EObjectImpl implements EjbRef, EObject{ + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final EjbRefType TYPE_EDEFAULT = EjbRefType.SESSION_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EjbRefType type = TYPE_EDEFAULT; + /** + * This is true if the Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean typeESet = false; + + /** + * The default value of the '{@link #getHome() Home}' attribute. + * + * + * @see #getHome() + * @generated + * @ordered + */ + protected static final String HOME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String home = HOME_EDEFAULT; + /** + * The default value of the '{@link #getRemote() Remote}' attribute. + * + * + * @see #getRemote() + * @generated + * @ordered + */ + protected static final String REMOTE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String remote = REMOTE_EDEFAULT; + /** + * The default value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected static final String LINK_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String link = LINK_EDEFAULT; + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public EjbRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getEjbRef(); + } + +/** + * Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter. + * The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise + * return null + */ +public EnterpriseBean getLinkedEjb(EJBJar ejbJar) { + if (getLink() == null) { + return null; + } + return ejbJar.getEnterpiseBeanFromRef(this); +}/** + * Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter. + * The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise + * return null + */ +public boolean isEquivalent(EjbRef anEjbRef) { + if (anEjbRef == null) return false; + boolean equiv = true; + equiv = getName() == anEjbRef.getName() || (getName() != null && getName().equals(anEjbRef.getName())); + if (equiv) + equiv = getHome() == anEjbRef.getHome() || (getHome() != null && getHome().equals(anEjbRef.getHome())); + if (equiv) + equiv = getRemote() == anEjbRef.getRemote() || (getRemote() != null && getRemote().equals(anEjbRef.getRemote())); + if (equiv) + equiv = getLink() == anEjbRef.getLink() || (getLink() != null && getLink().equals(anEjbRef.getLink())); + return equiv; +} +public boolean isLinked(EnterpriseBean anEJB) { + if (getLink() == null) + return false; + return getLink().equals(anEJB.getName()); +} +/** + * Return true if the ejbref is for a local ejb interface. + */ +public boolean isLocal(){ + return false; +} + /** + * @generated This field/method will be replaced during code generation + * The ejb-ref-name element contains the name of an EJB reference. This is the JNDI name that the servlet code uses to get a reference to the enterprise bean. + * Example: ejb//Payroll + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * The ejb-ref-type element contains the expected type of the referenced enterprise bean. The ejb-ref-type element must be one of the following: + * Entity + * Session + */ + public EjbRefType getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(EjbRefType newType) { + EjbRefType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + boolean oldTypeESet = typeESet; + typeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__TYPE, oldType, type, !oldTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetType() { + EjbRefType oldType = type; + boolean oldTypeESet = typeESet; + type = TYPE_EDEFAULT; + typeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.EJB_REF__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetType() { + return typeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The home element contains the fully-qualified name of the enterprise bean's home interface. + * Example: com.aardvark.payroll.PayrollHome + */ + public String getHome() { + return home; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setHome(String newHome) { + String oldHome = home; + home = newHome; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__HOME, oldHome, home)); + } + + /** + * @generated This field/method will be replaced during code generation + * The remote element contains the fully-qualified name of the enterprise bean's remote interface. + */ + public String getRemote() { + return remote; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRemote(String newRemote) { + String oldRemote = remote; + remote = newRemote; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__REMOTE, oldRemote, remote)); + } + + /** + * @generated This field/method will be replaced during code generation + * The ejb-link element is used in the ejb-ref element to specify that an EJB reference is linked to an enterprise bean in the encompassing J2EE Application package. The value of the ejb-link element must be the ejb-name of an enterprise bean in the same J2EE Application package. + * Example: EmployeeRecord + */ + public String getLink() { + return link; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLink(String newLink) { + String oldLink = link; + link = newLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__LINK, oldLink, link)); + } + + /** + * @generated This field/method will be replaced during code generation The + * description element is used by the ejb-jar file producer to + * provide text describing the parent element. The description + * element should include any information that the ejb-jar file + * producer wants to provide to the consumer of the ejb-jar file + * (i.e. to the Deployer). Typically, the tools used by the + * ejb-jar file consumer will display the description when + * processing the parent element. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + d.setValue(newDescription); + } + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EJB_REF__DESCRIPTION, oldDescription, description)); + } + + public String getDescription() { + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + description = d.getValue(); + } + return description; + } + + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.EJB_REF__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.EJB_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_REF__NAME: + return getName(); + case CommonPackage.EJB_REF__TYPE: + return getType(); + case CommonPackage.EJB_REF__HOME: + return getHome(); + case CommonPackage.EJB_REF__REMOTE: + return getRemote(); + case CommonPackage.EJB_REF__LINK: + return getLink(); + case CommonPackage.EJB_REF__DESCRIPTION: + return getDescription(); + case CommonPackage.EJB_REF__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.EJB_REF__TYPE: + return isSetType(); + case CommonPackage.EJB_REF__HOME: + return HOME_EDEFAULT == null ? home != null : !HOME_EDEFAULT.equals(home); + case CommonPackage.EJB_REF__REMOTE: + return REMOTE_EDEFAULT == null ? remote != null : !REMOTE_EDEFAULT.equals(remote); + case CommonPackage.EJB_REF__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case CommonPackage.EJB_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.EJB_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.EJB_REF__TYPE: + setType((EjbRefType)newValue); + return; + case CommonPackage.EJB_REF__HOME: + setHome((String)newValue); + return; + case CommonPackage.EJB_REF__REMOTE: + setRemote((String)newValue); + return; + case CommonPackage.EJB_REF__LINK: + setLink((String)newValue); + return; + case CommonPackage.EJB_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.EJB_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.EJB_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.EJB_REF__TYPE: + unsetType(); + return; + case CommonPackage.EJB_REF__HOME: + setHome(HOME_EDEFAULT); + return; + case CommonPackage.EJB_REF__REMOTE: + setRemote(REMOTE_EDEFAULT); + return; + case CommonPackage.EJB_REF__LINK: + setLink(LINK_EDEFAULT); + return; + case CommonPackage.EJB_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.EJB_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", type: "); //$NON-NLS-1$ + if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ + result.append(", home: "); //$NON-NLS-1$ + result.append(home); + result.append(", remote: "); //$NON-NLS-1$ + result.append(remote); + result.append(", link: "); //$NON-NLS-1$ + result.append(link); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EnvEntryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EnvEntryImpl.java new file mode 100644 index 000000000..a1b04e285 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/EnvEntryImpl.java @@ -0,0 +1,371 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.EnvEntryType; + +/** + * The env-entry element contains the declaration of an application client's environment entries. The declaration consists of an optional description, the name of the environment entry, and an optional value. + */ +public class EnvEntryImpl extends EObjectImpl implements EnvEntry, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String value = VALUE_EDEFAULT; + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final EnvEntryType TYPE_EDEFAULT = EnvEntryType.STRING_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EnvEntryType type = TYPE_EDEFAULT; + /** + * This is true if the Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean typeESet = false; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public EnvEntryImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getEnvEntry(); + } + + /** + * @generated This field/method will be replaced during code generation + * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The env-entry-name element contains the name of an application client's environment entry. + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * The env-entry-value element contains the value of an application client's environment entry. The value must be a String that is valid for the constructor of the specified type that takes a single String parameter. + * Used in: env-entry + * Example: + * //datasources//MyDatabase + */ + public String getValue() { + return value; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__VALUE, oldValue, value)); + } + + /** + * @generated This field/method will be replaced during code generation + * The env-entry-type element contains the fully-qualified Java type of the environment entry value that is expected by the application client's code. The following are the legal values of env-entry-type: java.lang.Bool-ean, java.lang.String, java.lang.Integer, java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, and java.lang.Float. + * Example: java.lang.Boolean + */ + public EnvEntryType getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(EnvEntryType newType) { + EnvEntryType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + boolean oldTypeESet = typeESet; + typeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ENV_ENTRY__TYPE, oldType, type, !oldTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetType() { + EnvEntryType oldType = type; + boolean oldTypeESet = typeESet; + type = TYPE_EDEFAULT; + typeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.ENV_ENTRY__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetType() { + return typeESet; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.ENV_ENTRY__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.ENV_ENTRY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ENV_ENTRY__DESCRIPTION: + return getDescription(); + case CommonPackage.ENV_ENTRY__NAME: + return getName(); + case CommonPackage.ENV_ENTRY__VALUE: + return getValue(); + case CommonPackage.ENV_ENTRY__TYPE: + return getType(); + case CommonPackage.ENV_ENTRY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ENV_ENTRY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.ENV_ENTRY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.ENV_ENTRY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case CommonPackage.ENV_ENTRY__TYPE: + return isSetType(); + case CommonPackage.ENV_ENTRY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ENV_ENTRY__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.ENV_ENTRY__NAME: + setName((String)newValue); + return; + case CommonPackage.ENV_ENTRY__VALUE: + setValue((String)newValue); + return; + case CommonPackage.ENV_ENTRY__TYPE: + setType((EnvEntryType)newValue); + return; + case CommonPackage.ENV_ENTRY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ENV_ENTRY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.ENV_ENTRY__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.ENV_ENTRY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case CommonPackage.ENV_ENTRY__TYPE: + unsetType(); + return; + case CommonPackage.ENV_ENTRY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", name: "); //$NON-NLS-1$ + result.append(name); + result.append(", value: "); //$NON-NLS-1$ + result.append(value); + result.append(", type: "); //$NON-NLS-1$ + if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IconTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IconTypeImpl.java new file mode 100644 index 000000000..4640186d3 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IconTypeImpl.java @@ -0,0 +1,272 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.IconType; + + +/** + * + * An implementation of the model object 'Icon Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getSmallIcon Small Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getLargeIcon Large Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.IconTypeImpl#getLang Lang}
  • + *
+ *

+ * + * @generated + */ +public class IconTypeImpl extends EObjectImpl implements IconType { + /** + * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected static final String SMALL_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected String smallIcon = SMALL_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected static final String LARGE_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected String largeIcon = LARGE_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected static final String LANG_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLang() Lang}' attribute. + * + * + * @see #getLang() + * @generated + * @ordered + */ + protected String lang = LANG_EDEFAULT; + + /** + * + * + * @generated + */ + protected IconTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getIconType(); + } + + /** + * + * + * @generated + */ + public String getSmallIcon() { + return smallIcon; + } + + /** + * + * + * @generated + */ + public void setSmallIcon(String newSmallIcon) { + String oldSmallIcon = smallIcon; + smallIcon = newSmallIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__SMALL_ICON, oldSmallIcon, smallIcon)); + } + + /** + * + * + * @generated + */ + public String getLargeIcon() { + return largeIcon; + } + + /** + * + * + * @generated + */ + public void setLargeIcon(String newLargeIcon) { + String oldLargeIcon = largeIcon; + largeIcon = newLargeIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__LARGE_ICON, oldLargeIcon, largeIcon)); + } + + /** + * + * + * @generated + */ + public String getLang() { + return lang; + } + + /** + * + * + * @generated + */ + public void setLang(String newLang) { + String oldLang = lang; + lang = newLang; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ICON_TYPE__LANG, oldLang, lang)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ICON_TYPE__SMALL_ICON: + return getSmallIcon(); + case CommonPackage.ICON_TYPE__LARGE_ICON: + return getLargeIcon(); + case CommonPackage.ICON_TYPE__LANG: + return getLang(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ICON_TYPE__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case CommonPackage.ICON_TYPE__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case CommonPackage.ICON_TYPE__LANG: + setLang((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ICON_TYPE__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case CommonPackage.ICON_TYPE__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case CommonPackage.ICON_TYPE__LANG: + setLang(LANG_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.ICON_TYPE__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case CommonPackage.ICON_TYPE__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case CommonPackage.ICON_TYPE__LANG: + return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (smallIcon: "); //$NON-NLS-1$ + result.append(smallIcon); + result.append(", largeIcon: "); //$NON-NLS-1$ + result.append(largeIcon); + result.append(", lang: "); //$NON-NLS-1$ + result.append(lang); + result.append(')'); + return result.toString(); + } + +} //IconTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IdentityImpl.java new file mode 100644 index 000000000..3a2515b39 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/IdentityImpl.java @@ -0,0 +1,248 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.Identity; + + +/** + * Specifies the run-as identity to be used for the execution of the methods of an enterprise bean. It contains an optional description, and the name of a security role. + + */ +public class IdentityImpl extends EObjectImpl implements Identity, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getRoleName() Role Name}' attribute. + * + * + * @see #getRoleName() + * @generated + * @ordered + */ + protected static final String ROLE_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String roleName = ROLE_NAME_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public IdentityImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getIdentity(); + } + + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing the run as identity. + * + * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.IDENTITY__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The role-name element contains the name of a security role. + * + * The name must conform to the lexical rules for an NMTOKEN. + */ + public String getRoleName() { + return roleName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRoleName(String newRoleName) { + String oldRoleName = roleName; + roleName = newRoleName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.IDENTITY__ROLE_NAME, oldRoleName, roleName)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.IDENTITY__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.IDENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.IDENTITY__DESCRIPTION: + return getDescription(); + case CommonPackage.IDENTITY__ROLE_NAME: + return getRoleName(); + case CommonPackage.IDENTITY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.IDENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.IDENTITY__ROLE_NAME: + return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); + case CommonPackage.IDENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.IDENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.IDENTITY__ROLE_NAME: + setRoleName((String)newValue); + return; + case CommonPackage.IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.IDENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.IDENTITY__ROLE_NAME: + setRoleName(ROLE_NAME_EDEFAULT); + return; + case CommonPackage.IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", roleName: "); //$NON-NLS-1$ + result.append(roleName); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResouceFactorySaxRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResouceFactorySaxRegistry.java new file mode 100644 index 000000000..26bcaa65d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResouceFactorySaxRegistry.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 11, 2004 + * + * To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package org.eclipse.jst.j2ee.internal.common.impl; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationResourceFactory; +import org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientResourceFactory; +import org.eclipse.jst.j2ee.internal.ejb.impl.EJBJarResourceFactory; +import org.eclipse.jst.j2ee.internal.jca.impl.ConnectorResourceFactory; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppResourceFactory; +import org.eclipse.jst.j2ee.webservice.WebServiceConstants; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.WebServicesClientResourceFactory; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddResourceFactory; +import org.eclipse.wst.common.internal.emf.resource.EMF2SAXRendererFactory; + +/** + * @author jsholl + * + * To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code + * and Comments + */ +public class J2EEResouceFactorySaxRegistry extends J2EEResourceFactoryRegistry { + public static J2EEResourceFactoryRegistry INSTANCE = new J2EEResouceFactorySaxRegistry(); + + public J2EEResouceFactorySaxRegistry() { + super(); + initRegistration(); + } + private void initRegistration() { + EMF2SAXRendererFactory.INSTANCE.setValidating(false); + registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + registerLastFileSegment(WebServiceConstants.WEBSERVICE_DD_SHORT_NAME, new WsddResourceFactory(EMF2SAXRendererFactory.INSTANCE)); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryDomRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryDomRegistry.java new file mode 100644 index 000000000..8841849a2 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryDomRegistry.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on May 20, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationResourceFactory; +import org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientResourceFactory; +import org.eclipse.jst.j2ee.internal.ejb.impl.EJBJarResourceFactory; +import org.eclipse.jst.j2ee.internal.jca.impl.ConnectorResourceFactory; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppResourceFactory; +import org.eclipse.jst.j2ee.webservice.WebServiceConstants; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.WebServicesClientResourceFactory; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddResourceFactory; +import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactory; +import org.eclipse.wst.common.internal.emf.resource.EMF2SAXRendererFactory; + + + +/** + * @author mdelder + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +public class J2EEResourceFactoryDomRegistry + extends J2EEResourceFactoryRegistry { + + /** + * + */ + public J2EEResourceFactoryDomRegistry() { + super(); + initRegistration(); + } + + private void initRegistration() { + EMF2SAXRendererFactory.INSTANCE.setValidating(false); + registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.APP_CLIENT_DD_SHORT_NAME, new ApplicationClientResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.APPLICATION_DD_SHORT_NAME, new ApplicationResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + registerLastFileSegment(WebServiceConstants.WEBSERVICE_DD_SHORT_NAME, new WsddResourceFactory(EMF2DOMRendererFactory.INSTANCE)); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryRegistry.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryRegistry.java new file mode 100644 index 000000000..24ad1e8ff --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/J2EEResourceFactoryRegistry.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry; + + +public class J2EEResourceFactoryRegistry extends FileNameResourceFactoryRegistry { + + public static J2EEResourceFactoryRegistry INSTANCE = new J2EEResourceFactoryRegistry(); + + public J2EEResourceFactoryRegistry() { + super(); + } + + public Resource.Factory delegatedGetFactory(URI uri) { + if (J2EEResourceFactoryRegistry.INSTANCE == this) + return super.delegatedGetFactory(uri); + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(uri); + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/JNDIEnvRefsGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/JNDIEnvRefsGroupImpl.java new file mode 100644 index 000000000..100a3a3cd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/JNDIEnvRefsGroupImpl.java @@ -0,0 +1,454 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; + + +/** + * + * An implementation of the model object 'JNDI Env Refs Group'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEnvironmentProperties Environment Properties}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getResourceRefs Resource Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEjbRefs Ejb Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getResourceEnvRefs Resource Env Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getEjbLocalRefs Ejb Local Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getMessageDestinationRefs Message Destination Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl#getServiceRefs Service Refs}
  • + *
+ *

+ * + * @generated + */ +public abstract class JNDIEnvRefsGroupImpl extends CompatibilityDescriptionGroupImpl implements JNDIEnvRefsGroup { + /** + * The cached value of the '{@link #getEnvironmentProperties() Environment Properties}' containment reference list. + * + * + * @see #getEnvironmentProperties() + * @generated + * @ordered + */ + protected EList environmentProperties = null; + + /** + * The cached value of the '{@link #getResourceRefs() Resource Refs}' containment reference list. + * + * + * @see #getResourceRefs() + * @generated + * @ordered + */ + protected EList resourceRefs = null; + + /** + * The cached value of the '{@link #getEjbRefs() Ejb Refs}' containment reference list. + * + * + * @see #getEjbRefs() + * @generated + * @ordered + */ + protected EList ejbRefs = null; + + /** + * The cached value of the '{@link #getResourceEnvRefs() Resource Env Refs}' containment reference list. + * + * + * @see #getResourceEnvRefs() + * @generated + * @ordered + */ + protected EList resourceEnvRefs = null; + + /** + * The cached value of the '{@link #getEjbLocalRefs() Ejb Local Refs}' containment reference list. + * + * + * @see #getEjbLocalRefs() + * @generated + * @ordered + */ + protected EList ejbLocalRefs = null; + + /** + * The cached value of the '{@link #getMessageDestinationRefs() Message Destination Refs}' containment reference list. + * + * + * @see #getMessageDestinationRefs() + * @generated + * @ordered + */ + protected EList messageDestinationRefs = null; + + /** + * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. + * + * + * @see #getServiceRefs() + * @generated + * @ordered + */ + protected EList serviceRefs = null; + + /** + * + * + * @generated + */ + protected JNDIEnvRefsGroupImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getJNDIEnvRefsGroup(); + } + + /** + * + * + * @generated + */ + public EList getEnvironmentProperties() { + if (environmentProperties == null) { + environmentProperties = new EObjectContainmentEList(EnvEntry.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES); + } + return environmentProperties; + } + + /** + * + * + * @generated + */ + public EList getResourceRefs() { + if (resourceRefs == null) { + resourceRefs = new EObjectContainmentEList(ResourceRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS); + } + return resourceRefs; + } + + /** + * + * + * @generated + */ + public EList getEjbRefs() { + if (ejbRefs == null) { + ejbRefs = new EObjectContainmentEList(EjbRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS); + } + return ejbRefs; + } + + /** + * + * + * @generated + */ + public EList getResourceEnvRefs() { + if (resourceEnvRefs == null) { + resourceEnvRefs = new EObjectContainmentEList(ResourceEnvRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS); + } + return resourceEnvRefs; + } + + /** + * + * + * @generated + */ + public EList getEjbLocalRefs() { + if (ejbLocalRefs == null) { + ejbLocalRefs = new EObjectContainmentEList(EJBLocalRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS); + } + return ejbLocalRefs; + } + + /** + * + * + * @generated + */ + public EList getMessageDestinationRefs() { + if (messageDestinationRefs == null) { + messageDestinationRefs = new EObjectContainmentEList(MessageDestinationRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS); + } + return messageDestinationRefs; + } + + /** + * + * + * @generated + */ + public EList getServiceRefs() { + if (serviceRefs == null) { + serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS); + } + return serviceRefs; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: + return getIcons(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: + return getDisplayNames(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: + return getSmallIcon(); + case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: + return getLargeIcon(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: + return getDescription(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: + return getDisplayName(); + case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: + return getResourceRefs(); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: + return getEjbRefs(); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: + return getServiceRefs(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: + getIcons().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: + getEjbRefs().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: + getServiceRefs().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.JNDI_ENV_REFS_GROUP__ICONS: + return icons != null && !icons.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case CommonPackage.JNDI_ENV_REFS_GROUP__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case CommonPackage.JNDI_ENV_REFS_GROUP__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.JNDI_ENV_REFS_GROUP__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case CommonPackage.JNDI_ENV_REFS_GROUP__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case CommonPackage.JNDI_ENV_REFS_GROUP__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //JNDIEnvRefsGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ListenerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ListenerImpl.java new file mode 100644 index 000000000..6d151471c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ListenerImpl.java @@ -0,0 +1,267 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Listener; + + +/** + * Declares a class in the application must be registered as a web application listener bean. + */ +public class ListenerImpl extends CompatibilityDescriptionGroupImpl implements Listener { + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass listenerClass = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected ListenerImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getListener(); + } + + /** + * @generated This field/method will be replaced during code generation + * The listener-class element declares a class in the application must be registered as a web application listener bean. + */ + public JavaClass getListenerClass() { + if (listenerClass != null && listenerClass.eIsProxy()) { + JavaClass oldListenerClass = listenerClass; + listenerClass = (JavaClass)eResolveProxy((InternalEObject)listenerClass); + if (listenerClass != oldListenerClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonPackage.LISTENER__LISTENER_CLASS, oldListenerClass, listenerClass)); + } + } + return listenerClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetListenerClass() { + return listenerClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setListenerClass(JavaClass newListenerClass) { + JavaClass oldListenerClass = listenerClass; + listenerClass = newListenerClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LISTENER__LISTENER_CLASS, oldListenerClass, listenerClass)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.LISTENER__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case CommonPackage.LISTENER__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case CommonPackage.LISTENER__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.LISTENER__ICONS: + return getIcons(); + case CommonPackage.LISTENER__DISPLAY_NAMES: + return getDisplayNames(); + case CommonPackage.LISTENER__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.LISTENER__SMALL_ICON: + return getSmallIcon(); + case CommonPackage.LISTENER__LARGE_ICON: + return getLargeIcon(); + case CommonPackage.LISTENER__DESCRIPTION: + return getDescription(); + case CommonPackage.LISTENER__DISPLAY_NAME: + return getDisplayName(); + case CommonPackage.LISTENER__LISTENER_CLASS: + if (resolve) return getListenerClass(); + return basicGetListenerClass(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.LISTENER__ICONS: + return icons != null && !icons.isEmpty(); + case CommonPackage.LISTENER__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case CommonPackage.LISTENER__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.LISTENER__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case CommonPackage.LISTENER__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case CommonPackage.LISTENER__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.LISTENER__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case CommonPackage.LISTENER__LISTENER_CLASS: + return listenerClass != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.LISTENER__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case CommonPackage.LISTENER__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case CommonPackage.LISTENER__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.LISTENER__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case CommonPackage.LISTENER__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case CommonPackage.LISTENER__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.LISTENER__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case CommonPackage.LISTENER__LISTENER_CLASS: + setListenerClass((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.LISTENER__ICONS: + getIcons().clear(); + return; + case CommonPackage.LISTENER__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case CommonPackage.LISTENER__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.LISTENER__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case CommonPackage.LISTENER__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case CommonPackage.LISTENER__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.LISTENER__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case CommonPackage.LISTENER__LISTENER_CLASS: + setListenerClass((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + +/** + * createClassRef - return a JavaURL reference to the named Java class + */ +public JavaClass createClassRef(String targetName) { + return JavaRefFactory.eINSTANCE.createClassRef(targetName); +} +/** + * Get the fully qualified class name for the listener. + */ +public String getListenerClassName() { + getListenerClass(); + return (listenerClass == null) ? null : listenerClass.getQualifiedName(); +} +/** + * Sets the listener class name. + */ +public void setListenerClassName(String listenerClassName) { + eSet(CommonPackage.eINSTANCE.getListener_ListenerClass(), createClassRef(listenerClassName)); +} +} //ListenerImpl + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationImpl.java new file mode 100644 index 000000000..2ef57e0e5 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationImpl.java @@ -0,0 +1,262 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.MessageDestination; + + +/** + * + * An implementation of the model object 'Message Destination'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationImpl#getName Name}
  • + *
+ *

+ * + * @generated + */ +public class MessageDestinationImpl extends CompatibilityDescriptionGroupImpl implements MessageDestination { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected MessageDestinationImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getMessageDestination(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.MESSAGE_DESTINATION__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION__ICONS: + return getIcons(); + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: + return getDisplayNames(); + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: + return getSmallIcon(); + case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: + return getLargeIcon(); + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: + return getDescription(); + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: + return getDisplayName(); + case CommonPackage.MESSAGE_DESTINATION__NAME: + return getName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION__NAME: + setName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION__ICONS: + getIcons().clear(); + return; + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION__NAME: + setName(NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION__ICONS: + return icons != null && !icons.isEmpty(); + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.MESSAGE_DESTINATION__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case CommonPackage.MESSAGE_DESTINATION__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case CommonPackage.MESSAGE_DESTINATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.MESSAGE_DESTINATION__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case CommonPackage.MESSAGE_DESTINATION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} //MessageDestinationImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationRefImpl.java new file mode 100644 index 000000000..beab489c1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/MessageDestinationRefImpl.java @@ -0,0 +1,412 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.MessageDestinationUsageType; + + +/** + * + * An implementation of the model object 'Message Destination Ref'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getName Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getType Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getUsage Usage}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getLink Link}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.MessageDestinationRefImpl#getDescriptions Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class MessageDestinationRefImpl extends EObjectImpl implements MessageDestinationRef { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getUsage() Usage}' attribute. + * + * + * @see #getUsage() + * @generated + * @ordered + */ + protected static final MessageDestinationUsageType USAGE_EDEFAULT = MessageDestinationUsageType.CONSUMES_LITERAL; + + /** + * The cached value of the '{@link #getUsage() Usage}' attribute. + * + * + * @see #getUsage() + * @generated + * @ordered + */ + protected MessageDestinationUsageType usage = USAGE_EDEFAULT; + /** + * This is true if the Auth attribute has been set. + * + * + * @ordered + */ + protected boolean useESet = false; + /** + * The default value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected static final String LINK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected String link = LINK_EDEFAULT; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + /** + * + * + * @generated + */ + protected MessageDestinationRefImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getMessageDestinationRef(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public MessageDestinationUsageType getUsage() { + return usage; + } + + /** + * + * + * @generated + */ + public void setUsage(MessageDestinationUsageType newUsage) { + MessageDestinationUsageType oldUsage = usage; + usage = newUsage == null ? USAGE_EDEFAULT : newUsage; + boolean oldUseESet = useESet; + useESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__USAGE, oldUsage, usage, !oldUseESet)); + } + /** + * + * + */ + public void unsetUsage() { + MessageDestinationUsageType oldUsage = usage; + boolean oldUsageESet = useESet; + usage = USAGE_EDEFAULT; + useESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.MESSAGE_DESTINATION_REF__USAGE, oldUsage, USAGE_EDEFAULT, oldUsageESet)); + } + /** + * + * + */ + public boolean isSetUse() { + return useESet; + } + /** + * + * + * @generated + */ + public String getLink() { + return link; + } + + /** + * + * + * @generated + */ + public void setLink(String newLink) { + String oldLink = link; + link = newLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.MESSAGE_DESTINATION_REF__LINK, oldLink, link)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION_REF__NAME: + return getName(); + case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: + return getType(); + case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: + return getUsage(); + case CommonPackage.MESSAGE_DESTINATION_REF__LINK: + return getLink(); + case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: + setType((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: + setUsage((MessageDestinationUsageType)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__LINK: + setLink((String)newValue); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: + setType(TYPE_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: + unsetUsage(); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__LINK: + setLink(LINK_EDEFAULT); + return; + case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.MESSAGE_DESTINATION_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.MESSAGE_DESTINATION_REF__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case CommonPackage.MESSAGE_DESTINATION_REF__USAGE: + return isSetUse(); + case CommonPackage.MESSAGE_DESTINATION_REF__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case CommonPackage.MESSAGE_DESTINATION_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", type: "); //$NON-NLS-1$ + result.append(type); + result.append(", usage: "); //$NON-NLS-1$ + result.append(usage); + result.append(", link: "); //$NON-NLS-1$ + result.append(link); + result.append(')'); + return result.toString(); + } + +} //MessageDestinationRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ParamValueImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ParamValueImpl.java new file mode 100644 index 000000000..52edb1b67 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ParamValueImpl.java @@ -0,0 +1,331 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.ParamValue; + + +/** + * + * An implementation of the model object 'Param Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getName Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getValue Value}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getDescription Description}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.ParamValueImpl#getDescriptions Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class ParamValueImpl extends EObjectImpl implements ParamValue { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + /** + * + * + * @generated + */ + protected ParamValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getParamValue(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.PARAM_VALUE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.PARAM_VALUE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.PARAM_VALUE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.PARAM_VALUE__NAME: + return getName(); + case CommonPackage.PARAM_VALUE__VALUE: + return getValue(); + case CommonPackage.PARAM_VALUE__DESCRIPTION: + return getDescription(); + case CommonPackage.PARAM_VALUE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.PARAM_VALUE__NAME: + setName((String)newValue); + return; + case CommonPackage.PARAM_VALUE__VALUE: + setValue((String)newValue); + return; + case CommonPackage.PARAM_VALUE__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.PARAM_VALUE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.PARAM_VALUE__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.PARAM_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + case CommonPackage.PARAM_VALUE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.PARAM_VALUE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.PARAM_VALUE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.PARAM_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case CommonPackage.PARAM_VALUE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.PARAM_VALUE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", value: "); //$NON-NLS-1$ + result.append(value); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} //ParamValueImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/QNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/QNameImpl.java new file mode 100644 index 000000000..0b1d82df2 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/QNameImpl.java @@ -0,0 +1,416 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.wst.common.emf.utilities.NamespaceAdapter; +import org.eclipse.wst.common.internal.emf.utilities.StringUtil; + + +/** + * + * An implementation of the model object 'QName'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getNamespaceURI Namespace URI}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getLocalPart Local Part}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getCombinedQName Combined QName}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.common.impl.QNameImpl#getInternalPrefixOrNsURI Internal Prefix Or Ns URI}
  • + *
+ *

+ * + * @generated + */ +public class QNameImpl extends EObjectImpl implements QName { + /** + * The default value of the '{@link #getNamespaceURI() Namespace URI}' attribute. + * + * + * @see #getNamespaceURI() + * @generated + * @ordered + */ + protected static final String NAMESPACE_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNamespaceURI() Namespace URI}' attribute. + * + * + * @see #getNamespaceURI() + * @generated + * @ordered + */ + protected String namespaceURI = NAMESPACE_URI_EDEFAULT; + + /** + * The default value of the '{@link #getLocalPart() Local Part}' attribute. + * + * + * @see #getLocalPart() + * @generated + * @ordered + */ + protected static final String LOCAL_PART_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalPart() Local Part}' attribute. + * + * + * @see #getLocalPart() + * @generated + * @ordered + */ + protected String localPart = LOCAL_PART_EDEFAULT; + + /** + * The default value of the '{@link #getCombinedQName() Combined QName}' attribute. + * + * + * @see #getCombinedQName() + * @generated + * @ordered + */ + protected static final String COMBINED_QNAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCombinedQName() Combined QName}' attribute. + * + * + * @see #getCombinedQName() + * @generated + * @ordered + */ + protected String combinedQName = COMBINED_QNAME_EDEFAULT; + + /** + * The default value of the '{@link #getInternalPrefixOrNsURI() Internal Prefix Or Ns URI}' attribute. + * + * + * @see #getInternalPrefixOrNsURI() + * @generated + * @ordered + */ + protected static final String INTERNAL_PREFIX_OR_NS_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getInternalPrefixOrNsURI() Internal Prefix Or Ns URI}' attribute. + * + * + * @see #getInternalPrefixOrNsURI() + * @generated + * @ordered + */ + protected String internalPrefixOrNsURI = INTERNAL_PREFIX_OR_NS_URI_EDEFAULT; + + /** + * + * + * @generated + */ + protected QNameImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getQName(); + } + + /** + * + * + * @generated + */ + public String getNamespaceURIGen() { + return namespaceURI; + } + + public String getNamespaceURI() { + if (namespaceURI != null) + return namespaceURI; + String resolved = NamespaceAdapter.getResolvedNamespaceURI(internalPrefixOrNsURI, this); + return resolved == null ? internalPrefixOrNsURI : resolved; + } + /** + * + * + * @generated + */ + public void setNamespaceURIGen(String newNamespaceURI) { + String oldNamespaceURI = namespaceURI; + namespaceURI = newNamespaceURI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__NAMESPACE_URI, oldNamespaceURI, namespaceURI)); + } + + public void setNamespaceURI(String newNamespaceURI) { + String prefix = getInternalPrefixOrNsURI(); + String oldNsURI = getInternalPrefixOrNsURI(); + if (!StringUtil.stringsEqual(prefix, oldNsURI)) + setValues(prefix, newNamespaceURI, getLocalPart()); + else { + setNamespaceURIGen(newNamespaceURI); + setInternalPrefixOrNsURI(newNamespaceURI); + } + + } + + /** + * + * + * @generated + */ + public String getLocalPart() { + return localPart; + } + + /** + * + * + * @generated + */ + public void setLocalPartGen(String newLocalPart) { + String oldLocalPart = localPart; + localPart = newLocalPart; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__LOCAL_PART, oldLocalPart, localPart)); + } + + public void setLocalPart(String newLocalPart) { + setLocalPartGen(newLocalPart); + updateCombine(); + } + + /** + * + * + * @generated + */ + public String getCombinedQName() { + return combinedQName; + } + + /** + * + * + * @generated + */ + public void setCombinedQNameGen(String newCombinedQName) { + String oldCombinedQName = combinedQName; + combinedQName = newCombinedQName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__COMBINED_QNAME, oldCombinedQName, combinedQName)); + } + + public void setCombinedQName(String newCombinedQName) { + setCombinedQNameGen(newCombinedQName); + updateParse(); + } + + /** + * Parses the combined name into the components + */ + private void updateParse() { + String ns = null; + String lp = null; + if (combinedQName != null || combinedQName.length() > 0) { + int index = combinedQName.lastIndexOf(':'); + + if (index < 0) { //No separator + ns = combinedQName; + } else if (index == 0) { //First char + lp = combinedQName.substring(1); + } else if (index == combinedQName.length()-1) { //Last char + ns = combinedQName.substring(0, index); + } else { //In the middle, which is what it should be + ns = combinedQName.substring(0, index); + lp = combinedQName.substring(index+1, combinedQName.length()); + } + } + setInternalPrefixOrNsURIGen(ns); + setLocalPartGen(lp); + } + + /** + * updates the combined name from the components + */ + private void updateCombine() { + String cn = null; + if (internalPrefixOrNsURI != null || localPart != null) { + String ns = internalPrefixOrNsURI == null ? "" : internalPrefixOrNsURI; //$NON-NLS-1$ + String lp = localPart == null ? "" : localPart; //$NON-NLS-1$ + cn = ns+':'+lp; + } + setCombinedQNameGen(cn); + } + + /** + * + * + * @generated + */ + public String getInternalPrefixOrNsURI() { + return internalPrefixOrNsURI; + } + + /** + * + * + * @generated + */ + public void setInternalPrefixOrNsURIGen(String newInternalPrefixOrNsURI) { + String oldInternalPrefixOrNsURI = internalPrefixOrNsURI; + internalPrefixOrNsURI = newInternalPrefixOrNsURI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI, oldInternalPrefixOrNsURI, internalPrefixOrNsURI)); + } + + public void setInternalPrefixOrNsURI(String newInternalPrefixOrNsURI) { + setInternalPrefixOrNsURIGen(newInternalPrefixOrNsURI); + updateCombine(); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.QNAME__NAMESPACE_URI: + return getNamespaceURI(); + case CommonPackage.QNAME__LOCAL_PART: + return getLocalPart(); + case CommonPackage.QNAME__COMBINED_QNAME: + return getCombinedQName(); + case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: + return getInternalPrefixOrNsURI(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.QNAME__NAMESPACE_URI: + setNamespaceURI((String)newValue); + return; + case CommonPackage.QNAME__LOCAL_PART: + setLocalPart((String)newValue); + return; + case CommonPackage.QNAME__COMBINED_QNAME: + setCombinedQName((String)newValue); + return; + case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.QNAME__NAMESPACE_URI: + setNamespaceURI(NAMESPACE_URI_EDEFAULT); + return; + case CommonPackage.QNAME__LOCAL_PART: + setLocalPart(LOCAL_PART_EDEFAULT); + return; + case CommonPackage.QNAME__COMBINED_QNAME: + setCombinedQName(COMBINED_QNAME_EDEFAULT); + return; + case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * eIsSet for namespace uri must be derived if null so namespaceURI ! = null and internalPrefixOrNsURI != null must both be check. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.QNAME__NAMESPACE_URI: + return NAMESPACE_URI_EDEFAULT == null ? (namespaceURI != null || internalPrefixOrNsURI != null) : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); + case CommonPackage.QNAME__LOCAL_PART: + return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); + case CommonPackage.QNAME__COMBINED_QNAME: + return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); + case CommonPackage.QNAME__INTERNAL_PREFIX_OR_NS_URI: + return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (namespaceURI: "); //$NON-NLS-1$ + result.append(namespaceURI); + result.append(", localPart: "); //$NON-NLS-1$ + result.append(localPart); + result.append(", combinedQName: "); //$NON-NLS-1$ + result.append(combinedQName); + result.append(", internalPrefixOrNsURI: "); //$NON-NLS-1$ + result.append(internalPrefixOrNsURI); + result.append(')'); + return result.toString(); + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.QName#setValues(java.lang.String, java.lang.String, java.lang.String) + */ + public void setValues(String prefix, String nsURI, String localPart) { + setInternalPrefixOrNsURIGen(prefix); + setLocalPartGen(localPart); + String existingURI = NamespaceAdapter.getNamespaceURIAtThisLevel(prefix, this); + boolean removed = false; + if (existingURI != null && !existingURI.equals(nsURI)) { + NamespaceAdapter.removeNamespace(prefix, this); + removed = true; + } + if (existingURI == null || removed) + NamespaceAdapter.addNamespace(prefix, nsURI, this); + updateCombine(); + } + + +} //QNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceEnvRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceEnvRefImpl.java new file mode 100644 index 000000000..14f170c25 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceEnvRefImpl.java @@ -0,0 +1,323 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; + +/** + * The resource-env-ref element contains a declaration of an enterprise bean's reference to an administered object associated with a resource in the enterprise bean's environment. It consists of an optional description, the resource environment reference name, and an indication of the resource environment reference type expected by the enterprise bean code. + * + * Examples: + * + * + * jms//StockQueue + * javax.jms.Queue + * + */ +public class ResourceEnvRefImpl extends EObjectImpl implements ResourceEnvRef, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass type = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public ResourceEnvRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getResourceEnvRef(); + } + + /** + * createClassRef - return a JavaURL reference to the named Java class + */ + public JavaClass createClassRef(String targetName) { + return JavaRefFactory.eINSTANCE.createClassRef(targetName); + } + + public String getTypeName() { + getType(); + return type == null ? null : type.getQualifiedName(); + } + + public void setTypeName(String className) { + eSet(CommonPackage.eINSTANCE.getResourceEnvRef_Type(), createClassRef(className)); + } + + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + d.setValue(newDescription); + } + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); + } + + public String getDescription() { + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + description = d.getValue(); + } + return description; + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the name of a resource environment reference; its + * value is the environment entry name used in the enterprise + * bean code. + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_ENV_REF__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the type of a resource environment reference. See the class description for an example. + */ + public JavaClass getType() { + if (type != null && type.eIsProxy()) { + JavaClass oldType = type; + type = (JavaClass)eResolveProxy((InternalEObject)type); + if (type != oldType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonPackage.RESOURCE_ENV_REF__TYPE, oldType, type)); + } + } + return type; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetType() { + return type; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setType(JavaClass newType) { + JavaClass oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_ENV_REF__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: + return getDescription(); + case CommonPackage.RESOURCE_ENV_REF__NAME: + return getName(); + case CommonPackage.RESOURCE_ENV_REF__TYPE: + if (resolve) return getType(); + return basicGetType(); + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.RESOURCE_ENV_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.RESOURCE_ENV_REF__TYPE: + return type != null; + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.RESOURCE_ENV_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.RESOURCE_ENV_REF__TYPE: + setType((JavaClass)newValue); + return; + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.RESOURCE_ENV_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.RESOURCE_ENV_REF__TYPE: + setType((JavaClass)null); + return; + case CommonPackage.RESOURCE_ENV_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceRefImpl.java new file mode 100644 index 000000000..5687506c8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/ResourceRefImpl.java @@ -0,0 +1,508 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.ResAuthTypeBase; +import org.eclipse.jst.j2ee.common.ResSharingScopeType; +import org.eclipse.jst.j2ee.common.ResourceRef; + +/** + * The resource-ref element contains a declaration of application clients's reference to an external resource. It consists of an optional description, the resource factory reference name, the indication of the resource factory type expected by the application client's code, and the type of authentication (bean or container). + * Example: + * + * EmployeeAppDB + * javax.sql.DataSource + * Container + * + */ +public class ResourceRefImpl extends EObjectImpl implements ResourceRef, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String type = TYPE_EDEFAULT; + /** + * The default value of the '{@link #getAuth() Auth}' attribute. + * + * + * @see #getAuth() + * @generated + * @ordered + */ + protected static final ResAuthTypeBase AUTH_EDEFAULT = ResAuthTypeBase.CONTAINER_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected ResAuthTypeBase auth = AUTH_EDEFAULT; + /** + * This is true if the Auth attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean authESet = false; + + /** + * The default value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected static final String LINK_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String link = LINK_EDEFAULT; + /** + * The default value of the '{@link #getResSharingScope() Res Sharing Scope}' attribute. + * + * + * @see #getResSharingScope() + * @generated + * @ordered + */ + protected static final ResSharingScopeType RES_SHARING_SCOPE_EDEFAULT = ResSharingScopeType.SHAREABLE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected ResSharingScopeType resSharingScope = RES_SHARING_SCOPE_EDEFAULT; + /** + * This is true if the Res Sharing Scope attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean resSharingScopeESet = false; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public ResourceRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getResourceRef(); + } + + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + d.setValue(newDescription); + } + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); + } + + public String getDescription() { + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + description = d.getValue(); + } + return description; + } + + /** + * @generated This field/method will be replaced during code generation + * The res-ref-name element specifies the name of the resource factory reference name. The resource factory reference name is the name of the application client's environment entry whose value contains the JNDI name of the data source. + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * The res-type element specifies the type of the data source. The type is specified by the Java interface (or class) expected to be implemented by the data source. + */ + public String getType() { + return type; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__TYPE, oldType, type)); + } + + /** + * @generated This field/method will be replaced during code generation + * The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean. In the latter case, the Container uses information that is supplied by the Deployer. The value of this element must be one of the two following: + * Application + * Container + */ + public ResAuthTypeBase getAuth() { + return auth; + } + + /** + * + * + * @generated + */ + public void setAuth(ResAuthTypeBase newAuth) { + ResAuthTypeBase oldAuth = auth; + auth = newAuth == null ? AUTH_EDEFAULT : newAuth; + boolean oldAuthESet = authESet; + authESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__AUTH, oldAuth, auth, !oldAuthESet)); + } + + /** + * + * + * @generated + */ + public void unsetAuth() { + ResAuthTypeBase oldAuth = auth; + boolean oldAuthESet = authESet; + auth = AUTH_EDEFAULT; + authESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.RESOURCE_REF__AUTH, oldAuth, AUTH_EDEFAULT, oldAuthESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetAuth() { + return authESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getLink() { + return link; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLink(String newLink) { + String oldLink = link; + link = newLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__LINK, oldLink, link)); + } + + /** + * @generated This field/method will be replaced during code generation + * The res-sharing-scope element specifies whether connections obtained + * through the given resource manager connection factory reference can be + * shared. The value of this element, if specified, must be one of the + * two following: Shareable, Unshareable + * + * The default value is Shareable. + + */ + public ResSharingScopeType getResSharingScope() { + return resSharingScope; + } + + /** + * + * + * @generated + */ + public void setResSharingScope(ResSharingScopeType newResSharingScope) { + ResSharingScopeType oldResSharingScope = resSharingScope; + resSharingScope = newResSharingScope == null ? RES_SHARING_SCOPE_EDEFAULT : newResSharingScope; + boolean oldResSharingScopeESet = resSharingScopeESet; + resSharingScopeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE, oldResSharingScope, resSharingScope, !oldResSharingScopeESet)); + } + + /** + * + * + * @generated + */ + public void unsetResSharingScope() { + ResSharingScopeType oldResSharingScope = resSharingScope; + boolean oldResSharingScopeESet = resSharingScopeESet; + resSharingScope = RES_SHARING_SCOPE_EDEFAULT; + resSharingScopeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE, oldResSharingScope, RES_SHARING_SCOPE_EDEFAULT, oldResSharingScopeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetResSharingScope() { + return resSharingScopeESet; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.RESOURCE_REF__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.RESOURCE_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_REF__DESCRIPTION: + return getDescription(); + case CommonPackage.RESOURCE_REF__NAME: + return getName(); + case CommonPackage.RESOURCE_REF__TYPE: + return getType(); + case CommonPackage.RESOURCE_REF__AUTH: + return getAuth(); + case CommonPackage.RESOURCE_REF__LINK: + return getLink(); + case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: + return getResSharingScope(); + case CommonPackage.RESOURCE_REF__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.RESOURCE_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.RESOURCE_REF__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case CommonPackage.RESOURCE_REF__AUTH: + return isSetAuth(); + case CommonPackage.RESOURCE_REF__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: + return isSetResSharingScope(); + case CommonPackage.RESOURCE_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.RESOURCE_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.RESOURCE_REF__TYPE: + setType((String)newValue); + return; + case CommonPackage.RESOURCE_REF__AUTH: + setAuth((ResAuthTypeBase)newValue); + return; + case CommonPackage.RESOURCE_REF__LINK: + setLink((String)newValue); + return; + case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: + setResSharingScope((ResSharingScopeType)newValue); + return; + case CommonPackage.RESOURCE_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RESOURCE_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.RESOURCE_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.RESOURCE_REF__TYPE: + setType(TYPE_EDEFAULT); + return; + case CommonPackage.RESOURCE_REF__AUTH: + unsetAuth(); + return; + case CommonPackage.RESOURCE_REF__LINK: + setLink(LINK_EDEFAULT); + return; + case CommonPackage.RESOURCE_REF__RES_SHARING_SCOPE: + unsetResSharingScope(); + return; + case CommonPackage.RESOURCE_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", name: "); //$NON-NLS-1$ + result.append(name); + result.append(", type: "); //$NON-NLS-1$ + result.append(type); + result.append(", auth: "); //$NON-NLS-1$ + if (authESet) result.append(auth); else result.append(""); //$NON-NLS-1$ + result.append(", link: "); //$NON-NLS-1$ + result.append(link); + result.append(", resSharingScope: "); //$NON-NLS-1$ + if (resSharingScopeESet) result.append(resSharingScope); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/RunAsSpecifiedIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/RunAsSpecifiedIdentityImpl.java new file mode 100644 index 000000000..64334991f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/RunAsSpecifiedIdentityImpl.java @@ -0,0 +1,193 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Identity; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityIdentity; + + +/** + * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It contains an optional description and a specification of the security identity to be used. + + */ +public class RunAsSpecifiedIdentityImpl extends SecurityIdentityImpl implements RunAsSpecifiedIdentity, SecurityIdentity{ + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected Identity identity = null; + public RunAsSpecifiedIdentityImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getRunAsSpecifiedIdentity(); + } + + /** + * @generated This field/method will be replaced during code generation + * Optional specifies the run-as identity to be used for the execution of the methods of an enterprise bean. It contains an optional description, and the name of a security role. + */ + public Identity getIdentity() { + return identity; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetIdentity(Identity newIdentity, NotificationChain msgs) { + Identity oldIdentity = identity; + identity = newIdentity; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, oldIdentity, newIdentity); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setIdentity(Identity newIdentity) { + if (newIdentity != identity) { + NotificationChain msgs = null; + if (identity != null) + msgs = ((InternalEObject)identity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, null, msgs); + if (newIdentity != null) + msgs = ((InternalEObject)newIdentity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, null, msgs); + msgs = basicSetIdentity(newIdentity, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY, newIdentity, newIdentity)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: + return basicSetIdentity(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: + return getDescription(); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: + return getDescriptions(); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: + return getIdentity(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: + return identity != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: + setIdentity((Identity)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY__IDENTITY: + setIdentity((Identity)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isRunAsSpecifiedIdentity() + */ + public boolean isRunAsSpecifiedIdentity() { + return true; + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityIdentityImpl.java new file mode 100644 index 000000000..44c76393f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityIdentityImpl.java @@ -0,0 +1,214 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.SecurityIdentity; + + +/** + * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It + * contains an optional description and a specification of the security identity to be used. + + */ +public class SecurityIdentityImpl extends EObjectImpl implements SecurityIdentity, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public SecurityIdentityImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getSecurityIdentity(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_IDENTITY__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: + return getDescription(); + case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_IDENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.SECURITY_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + + /** + * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isRunAsSpecifiedIdentity() + */ + public boolean isRunAsSpecifiedIdentity() { + return false; + } + + /** + * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isUseCallerIdentity() + */ + public boolean isUseCallerIdentity() { + return false; + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleImpl.java new file mode 100644 index 000000000..89c4c0e55 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleImpl.java @@ -0,0 +1,289 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WorkbenchUtil; + +/** + * A semantic grouping of operations that may be performed by a subject. + * The security-role element contains the declaration of a security role which is used in the security-constraints placed on the web application. + */ +public class SecurityRoleImpl extends EObjectImpl implements SecurityRole, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + static boolean inEclipse = WorkbenchUtil.workbenchIsRunning(); + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getRoleName() Role Name}' attribute. + * + * + * @see #getRoleName() + * @generated + * @ordered + */ + protected static final String ROLE_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String roleName = ROLE_NAME_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public SecurityRoleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getSecurityRole(); + } + +public boolean equals(Object o) { + if (inEclipse) + return super.equals(o); + + if (o instanceof SecurityRoleImpl) { + String r1 = getRoleName(); + String r2 = ((SecurityRole) o).getRoleName(); + if ((r1 != null) && (r2 != null)) { + if (r1.equals(r2)) { + return true; + } + } else if (r1 == null && r2 == null) + return super.equals(o); + } + return false; +} +public int hashCode() { + if (inEclipse || getRoleName() == null) + return super.hashCode(); + return getRoleName().hashCode(); +} +public String toString() { + String name = getRoleName() == null ? "" : getRoleName(); //$NON-NLS-1$ + return getClass().getName() + "(" + name + ")"; //$NON-NLS-1$ //$NON-NLS-2$ +} + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description)getDescriptions().get(0); + if (d != null) + description = d.getValue(); + } + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (getDescriptions() != null) { + if (getDescriptions().isEmpty()) { + Description d = new DescriptionImpl(); + d.setValue(newDescription); + getDescriptions().add(d); + } + else { + Description d = (Description)getDescriptions().get(0); + if (d != null) + d.setValue(newDescription); + } + + } + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The role-name element contains the name of a role. This element must contain a non-empty string. + + */ + public String getRoleName() { + return roleName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRoleName(String newRoleName) { + String oldRoleName = roleName; + roleName = newRoleName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__ROLE_NAME, oldRoleName, roleName)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_ROLE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE__DESCRIPTION: + return getDescription(); + case CommonPackage.SECURITY_ROLE__ROLE_NAME: + return getRoleName(); + case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE__DESCRIPTION: + return (DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description)) + || (descriptions != null && !descriptions.isEmpty()); + case CommonPackage.SECURITY_ROLE__ROLE_NAME: + return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); + case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.SECURITY_ROLE__ROLE_NAME: + setRoleName((String)newValue); + return; + case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.SECURITY_ROLE__ROLE_NAME: + setRoleName(ROLE_NAME_EDEFAULT); + return; + case CommonPackage.SECURITY_ROLE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toStringGen() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", roleName: "); //$NON-NLS-1$ + result.append(roleName); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleRefImpl.java new file mode 100644 index 000000000..c0bbf15c7 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/SecurityRoleRefImpl.java @@ -0,0 +1,288 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; + + +/** + * @generated + */ +public class SecurityRoleRefImpl extends EObjectImpl implements SecurityRoleRef{ + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected static final String LINK_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String link = LINK_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public SecurityRoleRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getSecurityRoleRef(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE_REF__NAME, oldName, name)); + } + + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + d.setValue(newDescription); + } + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE__DESCRIPTION, oldDescription, description)); + } + + public String getDescription() { + if (getDescriptions() != null && !getDescriptions().isEmpty()) { + Description d = (Description) getDescriptions().get(0); + if (d != null) + description = d.getValue(); + } + return description; + } + + /** + * @generated This field/method will be replaced during code generation + * The role-link element is used to link a security role reference to a defined security role. The role-link element must contain the name of one of the security roles defined in the security-role elements. + */ + public String getLink() { + return link; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLink(String newLink) { + String oldLink = link; + link = newLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.SECURITY_ROLE_REF__LINK, oldLink, link)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE_REF__NAME: + return getName(); + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: + return getDescription(); + case CommonPackage.SECURITY_ROLE_REF__LINK: + return getLink(); + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE_REF__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.SECURITY_ROLE_REF__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE_REF__NAME: + setName((String)newValue); + return; + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.SECURITY_ROLE_REF__LINK: + setLink((String)newValue); + return; + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.SECURITY_ROLE_REF__NAME: + setName(NAME_EDEFAULT); + return; + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.SECURITY_ROLE_REF__LINK: + setLink(LINK_EDEFAULT); + return; + case CommonPackage.SECURITY_ROLE_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(", link: "); //$NON-NLS-1$ + result.append(link); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/UseCallerIdentityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/UseCallerIdentityImpl.java new file mode 100644 index 000000000..3fe145fa9 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/UseCallerIdentityImpl.java @@ -0,0 +1,137 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.UseCallerIdentity; + + +/** + * The use-caller-identity element specifies that the caller's security identity be used as the security identity for the execution of the enterprise bean's methods. + + */ +public class UseCallerIdentityImpl extends SecurityIdentityImpl implements UseCallerIdentity, SecurityIdentity{ + + public UseCallerIdentityImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return CommonPackage.eINSTANCE.getUseCallerIdentity(); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: + return getDescription(); + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CommonPackage.USE_CALLER_IDENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @see org.eclipse.jst.j2ee.internal.common.SecurityIdentity#isUseCallerIdentity() + */ + public boolean isUseCallerIdentity() { + return true; + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceFactory.java new file mode 100644 index 000000000..e4b70f5d5 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceFactory.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; +import org.eclipse.jst.j2ee.common.XMLResource; + + +/** + * @deprecated Since 4/22/2003 + * This is replaced with concrete implementers of {@link com.ibm.etools.emf2xml.impl.TranslatorResourceFactory} + */ + +public abstract class XMLResourceFactory extends ResourceFactoryImpl { +/** + * EJBJarResourceFactory constructor comment. + */ +public XMLResourceFactory() { + //TODO: Delete this class + super(); +} + +/** + * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl#createResource(URI) + */ +public final Resource createResource(URI uri) { + XMLResource resource = primCreateResource(uri); + resource.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + resource.getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80)); + return resource; +} + +/** + * Method primCreateResource. + * @param uri + * @return XMLResource + */ +protected abstract XMLResource primCreateResource(URI uri) ; + +} + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceImpl.java new file mode 100644 index 000000000..96db6454c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/impl/XMLResourceImpl.java @@ -0,0 +1,261 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.jst.j2ee.application.Application; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl; +import org.xml.sax.EntityResolver; + + +public abstract class XMLResourceImpl extends TranslatorResourceImpl implements XMLResource,J2EEVersionResource { + /** Indicator to determine if this resource was loaded as an alt-dd (from an ear), + * default is false */ + protected boolean isAlt = false; + /** The application which declared the alt-dd for this resource; exists only if this resource is and + * alt dd */ + protected Application application; + protected boolean isNew = true; + + + private static class RootVersionAdapter extends AdapterImpl { + static final String ADAPTER_TYPE = RootVersionAdapter.class.getName(); + /* (non-Javadoc) + * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object) + */ + public boolean isAdapterForType(Object type) { + return super.isAdapterForType(type); + } + + /* (non-Javadoc) + * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification) + */ + public void notifyChanged(Notification msg) { + if (msg.getFeatureID(null) == RESOURCE__CONTENTS && + msg.getEventType() == Notification.ADD) { + ((XMLResourceImpl)msg.getNotifier()).syncVersionOfRootObject(); + ((Notifier)msg.getNotifier()).eAdapters().remove(this); + } + } + + + + + } + + /** + * @deprecated since 4/29/2003 - used for compatibility + * Subclasses should be using the Renderers and translator framework + */ + public XMLResourceImpl() { + super(); + } + + /** + * @deprecated since 4/29/2003 - used for compatibility + * Subclasses should be using the Renderers and translator framework + */ + public XMLResourceImpl(URI uri) { + super(uri); + } + + public XMLResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + public XMLResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#initializeContents() + */ + protected void initializeContents() { + super.initializeContents(); + eAdapters().add(new RootVersionAdapter()); + } + + + /** + * Is this a resource loaded as an alternate deployment descriptor? + */ + public boolean isAlt() { + return isAlt; + } + + + public void setApplication(Application newApplication) { + application = newApplication; + } + /** + * Is this a resource loaded as an alternate deployment descriptor? + */ + public void setIsAlt(boolean isAlternateDD) { + isAlt = isAlternateDD; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return J2EE_1_4_ID; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) + * This is setting the module version on the resource, where values are different that the J2EE version, this will be overridden + */ + public void setDoctypeValues(String publicId, String systemId) { + int version = J2EE_1_4_ID; + if (systemId == null) + version = J2EE_1_4_ID; + else if (systemId.equals(getJ2EE_1_3_SystemID())) + version = J2EE_1_3_ID; + else if (systemId.equals(getJ2EE_1_2_SystemID())) + version = J2EE_1_2_ID; + super.setDoctypeValues(publicId, systemId); + setJ2EEVersionID(version); + } + + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#usesDTD() + */ + public boolean usesDTD() { + return getVersionID() != J2EE_1_4_ID; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#setVersionID(int) + * @deprecated, Use setJ2EEVersionID() to set module version based on j2ee version + **/ + public void setVersionID(int id) { + setJ2EEVersionID(id); + } + protected void primSetVersionID(int id) { + super.setVersionID(id); + } + protected void primSetDoctypeValues(String aPublicId, String aSystemId) { + super.setDoctypeValues(aPublicId,aSystemId); + } + /* + * Sets the module version based on the J2EE version + */ + public abstract void setJ2EEVersionID(int id); + /* + * Sets the module version directly + * */ + public abstract void setModuleVersionID(int id); + /** + * @deprecated + * (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.XMLResource#isJ2EE1_3() + */ + public boolean isJ2EE1_3() { + return getVersionID() == J2EE_1_3_ID; + } + + /** + * @deprecated use {@link TranslatorResource#setVersionID(int)}, + * {@link TranslatorResource#setDoctypeValues(String, String)} + * Sets the system id of the XML document. + * @see J2EEVersionConstants + */ + public void setPublicId(String id) { + setDoctypeValues(id, getSystemId()); + } + + /** + * @deprecated use {@link TranslatorResource#setVersionID(int)}, + * {@link TranslatorResource#setDoctypeValues(String, String)} + * Sets the public id of the XML document. + * @see J2EEVersionConstants + */ + public void setSystemId(String id) { + setDoctypeValues(getPublicId(), id); + } + protected String getDefaultPublicId() { + switch (getVersionID()) { + case (J2EE_1_2_ID) : + return getJ2EE_1_2_PublicID(); + case (J2EE_1_3_ID) : + return getJ2EE_1_3_PublicID(); + default : + return null; + } + } + + protected String getDefaultSystemId() { + switch (getVersionID()) { + case (J2EE_1_2_ID) : + return getJ2EE_1_2_SystemID(); + case (J2EE_1_3_ID) : + return getJ2EE_1_3_SystemID(); + default : + return null; + } + } + public abstract String getJ2EE_1_2_PublicID(); + public abstract String getJ2EE_1_2_SystemID(); + public abstract String getJ2EE_1_3_PublicID(); + public abstract String getJ2EE_1_3_SystemID(); + + + public NotificationChain basicSetResourceSet(ResourceSet aResourceSet, NotificationChain notifications) { + if (aResourceSet == null && this.resourceSet != null) + preDelete(); + return super.basicSetResourceSet(aResourceSet, notifications); + } + + public Application getApplication() { + return application; + } + + /** + * @deprecated - use getJ2EEVersionID() and getModuleVersionID() + */ + public int getVersionID() { + return getJ2EEVersionID(); + } + + public EntityResolver getEntityResolver() { + return J2EEXmlDtDEntityResolver.INSTANCE; + } + /* All subclasses will derive this value based on their module version + */ + public abstract int getJ2EEVersionID(); + + + + /* This will be computed during loads of the resource + */ + public int getModuleVersionID() { + return super.getVersionID(); + } + + protected abstract void syncVersionOfRootObject(); + + protected String getModuleVersionString() { + float ver = getModuleVersionID(); + Float specVersion = new Float(ver/10); + return specVersion.toString(); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonAdapterFactory.java new file mode 100644 index 000000000..b31c5d09c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonAdapterFactory.java @@ -0,0 +1,464 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.Identity; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.common.UseCallerIdentity; + + + +public class CommonAdapterFactory extends AdapterFactoryImpl { + protected static CommonPackage modelPackage; + + public CommonAdapterFactory() { + if (modelPackage == null) { + modelPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createSecurityRoleAdapter() { + return null; + } + + public Adapter createResourceRefAdapter() { + return null; + } + + public Adapter createEjbRefAdapter() { + return null; + } + + public Adapter createEJBLocalRefAdapter() { + return null; + } + + public Adapter createEnvEntryAdapter() { + return null; + } + + public Adapter createSecurityRoleRefAdapter() { + return null; + } + + public Adapter createRunAsSpecifiedIdentityAdapter() { + return null; + } + + public Adapter createSecurityIdentityAdapter() { + return null; + } + + public Adapter createUseCallerIdentityAdapter() { + return null; + } + + public Adapter createIdentityAdapter() { + return null; + } + + public Adapter createResourceEnvRefAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected CommonSwitch modelSwitch = + new CommonSwitch() { + public Object caseEjbRef(EjbRef object) { + return createEjbRefAdapter(); + } + public Object caseEnvEntry(EnvEntry object) { + return createEnvEntryAdapter(); + } + public Object caseResourceRef(ResourceRef object) { + return createResourceRefAdapter(); + } + public Object caseSecurityRoleRef(SecurityRoleRef object) { + return createSecurityRoleRefAdapter(); + } + public Object caseSecurityRole(SecurityRole object) { + return createSecurityRoleAdapter(); + } + public Object caseResourceEnvRef(ResourceEnvRef object) { + return createResourceEnvRefAdapter(); + } + public Object caseEJBLocalRef(EJBLocalRef object) { + return createEJBLocalRefAdapter(); + } + public Object caseRunAsSpecifiedIdentity(RunAsSpecifiedIdentity object) { + return createRunAsSpecifiedIdentityAdapter(); + } + public Object caseIdentity(Identity object) { + return createIdentityAdapter(); + } + public Object caseIconType(IconType object) { + return createIconTypeAdapter(); + } + public Object caseDisplayName(DisplayName object) { + return createDisplayNameAdapter(); + } + public Object caseMessageDestinationRef(MessageDestinationRef object) { + return createMessageDestinationRefAdapter(); + } + public Object caseMessageDestination(MessageDestination object) { + return createMessageDestinationAdapter(); + } + public Object caseParamValue(ParamValue object) { + return createParamValueAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return createJNDIEnvRefsGroupAdapter(); + } + public Object caseSecurityIdentity(SecurityIdentity object) { + return createSecurityIdentityAdapter(); + } + public Object caseUseCallerIdentity(UseCallerIdentity object) { + return createUseCallerIdentityAdapter(); + } + public Object caseDescription(Description object) { + return createDescriptionAdapter(); + } + public Object caseQName(QName object) { + return createQNameAdapter(); + } + public Object caseListener(Listener object) { + return createListenerAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSecurityRoleAdapterGen() { + + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createResourceRefAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEjbRefAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEJBLocalRefAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEnvEntryAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSecurityRoleRefAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createRunAsSpecifiedIdentityAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSecurityIdentityAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createUseCallerIdentityAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Description Description}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.Description + * @generated + */ + public Adapter createDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.QName + * @generated + */ + public Adapter createQNameAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Listener Listener}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.Listener + * @generated + */ + public Adapter createListenerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createIdentityAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.IconType Icon Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.IconType + * @generated + */ + public Adapter createIconTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DisplayName Display Name}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DisplayName + * @generated + */ + public Adapter createDisplayNameAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.MessageDestinationRef Message Destination Ref}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.MessageDestinationRef + * @generated + */ + public Adapter createMessageDestinationRefAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.MessageDestination Message Destination}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.MessageDestination + * @generated + */ + public Adapter createMessageDestinationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.ParamValue Param Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.ParamValue + * @generated + */ + public Adapter createParamValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup + * @generated + */ + public Adapter createJNDIEnvRefsGroupAdapter() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createResourceEnvRefAdapterGen() { + return null; + } + +} //CommonAdapterFactory + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonSwitch.java new file mode 100644 index 000000000..726193332 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonSwitch.java @@ -0,0 +1,571 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.EnvEntry; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.Identity; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.MessageDestinationRef; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.common.ResourceEnvRef; +import org.eclipse.jst.j2ee.common.ResourceRef; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.common.UseCallerIdentity; + + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.common.CommonPackage + * @generated + */ +public class CommonSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static CommonPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CommonSwitch() { + if (modelPackage == null) { + modelPackage = CommonPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case CommonPackage.EJB_REF: { + EjbRef ejbRef = (EjbRef)theEObject; + Object result = caseEjbRef(ejbRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.ENV_ENTRY: { + EnvEntry envEntry = (EnvEntry)theEObject; + Object result = caseEnvEntry(envEntry); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.RESOURCE_REF: { + ResourceRef resourceRef = (ResourceRef)theEObject; + Object result = caseResourceRef(resourceRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.SECURITY_ROLE_REF: { + SecurityRoleRef securityRoleRef = (SecurityRoleRef)theEObject; + Object result = caseSecurityRoleRef(securityRoleRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.SECURITY_ROLE: { + SecurityRole securityRole = (SecurityRole)theEObject; + Object result = caseSecurityRole(securityRole); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.RESOURCE_ENV_REF: { + ResourceEnvRef resourceEnvRef = (ResourceEnvRef)theEObject; + Object result = caseResourceEnvRef(resourceEnvRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.EJB_LOCAL_REF: { + EJBLocalRef ejbLocalRef = (EJBLocalRef)theEObject; + Object result = caseEJBLocalRef(ejbLocalRef); + if (result == null) result = caseEjbRef(ejbLocalRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.RUN_AS_SPECIFIED_IDENTITY: { + RunAsSpecifiedIdentity runAsSpecifiedIdentity = (RunAsSpecifiedIdentity)theEObject; + Object result = caseRunAsSpecifiedIdentity(runAsSpecifiedIdentity); + if (result == null) result = caseSecurityIdentity(runAsSpecifiedIdentity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.IDENTITY: { + Identity identity = (Identity)theEObject; + Object result = caseIdentity(identity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.ICON_TYPE: { + IconType iconType = (IconType)theEObject; + Object result = caseIconType(iconType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.DISPLAY_NAME: { + DisplayName displayName = (DisplayName)theEObject; + Object result = caseDisplayName(displayName); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.MESSAGE_DESTINATION_REF: { + MessageDestinationRef messageDestinationRef = (MessageDestinationRef)theEObject; + Object result = caseMessageDestinationRef(messageDestinationRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.MESSAGE_DESTINATION: { + MessageDestination messageDestination = (MessageDestination)theEObject; + Object result = caseMessageDestination(messageDestination); + if (result == null) result = caseCompatibilityDescriptionGroup(messageDestination); + if (result == null) result = caseDescriptionGroup(messageDestination); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.PARAM_VALUE: { + ParamValue paramValue = (ParamValue)theEObject; + Object result = caseParamValue(paramValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.DESCRIPTION_GROUP: { + DescriptionGroup descriptionGroup = (DescriptionGroup)theEObject; + Object result = caseDescriptionGroup(descriptionGroup); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.SECURITY_IDENTITY: { + SecurityIdentity securityIdentity = (SecurityIdentity)theEObject; + Object result = caseSecurityIdentity(securityIdentity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.USE_CALLER_IDENTITY: { + UseCallerIdentity useCallerIdentity = (UseCallerIdentity)theEObject; + Object result = caseUseCallerIdentity(useCallerIdentity); + if (result == null) result = caseSecurityIdentity(useCallerIdentity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.DESCRIPTION: { + Description description = (Description)theEObject; + Object result = caseDescription(description); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.QNAME: { + QName qName = (QName)theEObject; + Object result = caseQName(qName); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.LISTENER: { + Listener listener = (Listener)theEObject; + Object result = caseListener(listener); + if (result == null) result = caseCompatibilityDescriptionGroup(listener); + if (result == null) result = caseDescriptionGroup(listener); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CommonPackage.COMPATIBILITY_DESCRIPTION_GROUP: { + CompatibilityDescriptionGroup compatibilityDescriptionGroup = (CompatibilityDescriptionGroup)theEObject; + Object result = caseCompatibilityDescriptionGroup(compatibilityDescriptionGroup); + if (result == null) result = caseDescriptionGroup(compatibilityDescriptionGroup); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Ejb Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Ejb Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEjbRef(EjbRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Env Entry'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Env Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEnvEntry(EnvEntry object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Resource Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Resource Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseResourceRef(ResourceRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Security Role Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Security Role Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSecurityRoleRef(SecurityRoleRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Security Role'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Security Role'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSecurityRole(SecurityRole object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Resource Env Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Resource Env Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseResourceEnvRef(ResourceEnvRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Local Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Local Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBLocalRef(EJBLocalRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Run As Specified Identity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Run As Specified Identity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRunAsSpecifiedIdentity(RunAsSpecifiedIdentity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Security Identity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Security Identity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSecurityIdentity(SecurityIdentity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Identity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Identity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseIdentity(Identity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Icon Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Icon Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseIconType(IconType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Display Name'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Display Name'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDisplayName(DisplayName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Destination Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Destination Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageDestinationRef(MessageDestinationRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Destination'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Destination'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageDestination(MessageDestination object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Param Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Param Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseParamValue(ParamValue object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Use Caller Identity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Use Caller Identity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseUseCallerIdentity(UseCallerIdentity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescription(Description object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'QName'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'QName'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQName(QName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Listener'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Listener'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseListener(Listener object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //CommonSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonUtil.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonUtil.java new file mode 100644 index 000000000..a2f33ed16 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/CommonUtil.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationFactoryImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaFactoryImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationFactoryImpl; +import org.eclipse.jst.j2ee.internal.xml.J2EEXMLResourceHandler; + + +public class CommonUtil { +public static boolean isDeploymentDescriptorRoot(EObject o) { + return isDeploymentDescriptorRoot(o, true); +} +public static boolean isDeploymentDescriptorRoot(EObject o, boolean includeEars) { + EObject meta = o.eClass(); + return (includeEars && meta == eClassApplication()) || + meta == eClassApplicationClient() || + meta == eClassEJBJar() || + meta == eClassWebApp() || + meta == eClassConnector(); +} +public static boolean isDeploymentDescriptorRoot(Object o) { + return isDeploymentDescriptorRoot(o, true); +} +public static boolean isDeploymentDescriptorRoot(Object o, boolean includeEARs) { + if (o instanceof EObject) + return isDeploymentDescriptorRoot((EObject)o, includeEARs); + return false; +} +protected static EClass eClassApplication() { + return ApplicationFactoryImpl.getPackage().getApplication(); +} +protected static EClass eClassApplicationClient() { + return ClientFactoryImpl.getPackage().getApplicationClient(); +} +protected static EClass eClassEJBJar() { + return EjbFactoryImpl.getPackage().getEJBJar(); +} +protected static EClass eClassWebApp() { + return WebapplicationFactoryImpl.getPackage().getWebApp(); +} + +protected static EClass eClassConnector() { + return JcaFactoryImpl.getPackage().getConnector(); +} +/** + * Safety check method to ensure that the version of the dd object can be computed. + */ +public static void checkDDObjectForVersion(EObject dd) { + if (dd.eIsProxy()) { + String proxyUri = ((InternalEObject)dd).eProxyURI().toString(); + String message = J2EEXMLResourceHandler.getString("J2EE_VERSION_PROXY_ERROR", new Object[]{proxyUri}); //$NON-NLS-1$ + throw new IllegalStateException(message); + } else if (dd.eResource() == null) { + String message = J2EEXMLResourceHandler.getString("J2EE_VERSION_NULL_ERROR"); //$NON-NLS-1$ + throw new IllegalStateException(message); + } +} + +} + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultable.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultable.java new file mode 100644 index 000000000..af0cc258d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultable.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +import org.eclipse.emf.common.notify.Notifier; +/** + * Interface used for objects that can be "fluffed up" on demand, but not serialized unless modified + */ +public interface Defaultable extends Notifier { +public boolean isDefault(); +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/DefaultedAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/DefaultedAdapterImpl.java new file mode 100644 index 000000000..3e72e5605 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/DefaultedAdapterImpl.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +/** + * Insert the type's description here. + * Creation date: (03/22/01 10:54:22 AM) + * @author: Administrator + */ +public abstract class DefaultedAdapterImpl extends AdapterImpl { + final static String ADAPTER_KEY = "DEFAULTED_ADAPTER"; //$NON-NLS-1$ + protected boolean fNotify = true; +/** + * DefaultedAdapter constructor comment. + */ +public DefaultedAdapterImpl() { + super(); +} +public abstract EObject defaultContainer(); +public boolean isAdapterForType(Object type) { + return ADAPTER_KEY.equals(type); +} +public static boolean isDefault(Defaultable object) { + Defaultor defaultor = (Defaultor) retrieveDefaultContainerFor(object); + return defaultor != null && defaultor.isDefault(object); +} + +/** + * Insert the method's description here. + * Creation date: (6/13/2001 8:43:41 PM) + * @return boolean + */ +public boolean isNotify() { + return fNotify; +} +public static DefaultedAdapterImpl retrieveAdapterFor(Defaultable notifier) { + return (DefaultedAdapterImpl)EcoreUtil.getExistingAdapter(notifier,ADAPTER_KEY); +} +public static EObject retrieveDefaultContainerFor(Defaultable notifier) { + DefaultedAdapterImpl adapter = retrieveAdapterFor(notifier); + return adapter == null ? null : adapter.defaultContainer(); +} +/** + * Insert the method's description here. + * Creation date: (6/13/2001 8:43:41 PM) + * @param newNotify boolean + */ +public void setNotify(boolean newNotify) { + fNotify = newNotify; +} +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultor.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultor.java new file mode 100644 index 000000000..6b4b3b5ff --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/Defaultor.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +/** + * Insert the type's description here. + * Creation date: (6/15/2001 4:58:15 PM) + * @author: Administrator + */ +public interface Defaultor { +/** + * Returns true if this objects create @aDefaultable and it is still + * currently default and not contained. + * Creation date: (6/15/2001 4:59:28 PM) + * @return boolean + * @param aDefaultable org.eclipse.jst.j2ee.internal.common.util.Defaultable + */ +boolean isDefault(Defaultable aDefaultable); +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/IDUtility.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/IDUtility.java new file mode 100644 index 000000000..ba0207015 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/IDUtility.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.wst.common.emf.utilities.IDUtil; + + +/** + * Utility class for generating and setting unique id's for ref objects contained within a resource. This is needed + * sometimes when a refobject is referenced by an object in a separate resource. This utility will force the refobject + * to notify after the id gets set, using the static feature on this class. The object must be contained in a resource + * for the utility methods to work. + */ +public class IDUtility { + +/** + * IDUtility constructor comment. + */ +public IDUtility() { + super(); +} +/** + * Generate a default id and notify. + */ +protected static String primSetDefaultID(EObject object) { + return IDUtil.getOrAssignID(object); +} + +/** + * Generate a default id and notify. + * Helper for default id generation to support cross document references to non xmi resources + * (eg, xml deployment descriptors); called from overriden accessors in selected objects; + */ +public static String setDefaultID(EObject object) { + if (object == null || object.eResource() == null) + return null; + return primSetDefaultID(object); +} + +/** + * Generate a default id and notify, for this object and for all referenced objects that are contained + * within the same resource. Helper for default id generation to support cross document references to non xmi resources + * (eg, xml deployment descriptors); useful for post copy/add + */ +public static String setDefaultID(EObject object, boolean recurseChildren) { + if (object == null || object.eResource() == null) + return null; + + String result = primSetDefaultID(object); + + if (recurseChildren) + setDefaultIDForChildren(object); + + return result; +} + +protected static void setDefaultIDForChildren(EObject object) { + + List objects = object.eContents(); + for (int i = 0; i < objects.size(); i++){ + EObject o = (EObject)objects.get(i); + primSetDefaultID(o); + } +} +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/XmlSpecifiedDataAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/XmlSpecifiedDataAdapter.java new file mode 100644 index 000000000..1fbeac9f4 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/common/util/XmlSpecifiedDataAdapter.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.common.util; + +/** + * Insert the type's description here. + * Creation date: (06/04/01 7:56:22 PM) + * @author: Administrator + */ +public class XmlSpecifiedDataAdapter extends org.eclipse.emf.common.notify.impl.AdapterImpl { + protected final static String ADAPTER_KEY = "XML_SPECIFIED_ADAPTER"; //$NON-NLS-1$ +/** + * XmlSpecifiedDataAdapter constructor comment. + */ +public XmlSpecifiedDataAdapter() { + super(); +} +public boolean isAdapterForType(Object type) { + return ADAPTER_KEY.equals(type); +} +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRelationshipRoleAttributeFilter.java new file mode 100644 index 000000000..12b0e7bc8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRelationshipRoleAttributeFilter.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * Insert the type's description here. + * Creation date: (11/28/2000 7:06:49 PM) + * @author: Administrator + */ +public abstract class AbstractRelationshipRoleAttributeFilter extends ContainerManagedEntityFilter { +/** + * AbstractRelationshipRoleAttributeFilter constructor comment. + */ +public AbstractRelationshipRoleAttributeFilter() { + super(); +} +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + List attributes = new ArrayList(); + Iterator it = getSourceRoles(cmp).iterator(); + CommonRelationshipRole role; + while (it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + attributes.addAll(role.getAttributes()); + } + return attributes; +} +/** + * Return the proper list of roles from cmpExt. + */ +protected abstract java.util.List getSourceRoles(ContainerManagedEntity cmpExt) ; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRequiredRelationshipRoleFilter.java new file mode 100644 index 000000000..c9aab735c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AbstractRequiredRelationshipRoleFilter.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * Insert the type's description here. + * Creation date: (10/15/2001 11:37:19 AM) + * @author: Administrator + */ +public abstract class AbstractRequiredRelationshipRoleFilter extends ContainerManagedEntityFilter { +/** + * AbstractRequiredRelationshipRoleFilter constructor comment. + */ +public AbstractRequiredRelationshipRoleFilter() { + super(); +} +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + List roles = new ArrayList(); + List allRoles = getRolesToFilter(cmp); + CommonRelationshipRole role; + for (int i = 0; i < allRoles.size(); i++) { + role = (CommonRelationshipRole) allRoles.get(i); + if (shouldAddFilteredResult(role)) + roles.add(role); + } + return roles; +} +protected abstract java.util.List getRolesToFilter(ContainerManagedEntity cmp) ; +/** + * Return true if the multiplicity for @aRole is required. + */ +protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) { + boolean required = aRole.isRequired(); + if (required) { + CommonRelationshipRole opposite = aRole.getOppositeAsCommonRole(); + if (opposite != null) { + if (opposite.isRequired() && !aRole.isKey()) { + if (opposite.isKey() || aRole.isMany()) + return false; + if (!opposite.isMany()) + //both are single and not key + return aRole.isForward(); + } + } + } + return required; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigImpl.java new file mode 100644 index 000000000..6277a9a53 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigImpl.java @@ -0,0 +1,191 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.EjbPackage; + + +/** + * + * An implementation of the model object 'Activation Config'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigImpl#getConfigProperties Config Properties}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigImpl#getDescriptions Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class ActivationConfigImpl extends EObjectImpl implements ActivationConfig { + /** + * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. + * + * + * @see #getConfigProperties() + * @generated + * @ordered + */ + protected EList configProperties = null; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + /** + * + * + * @generated + */ + protected ActivationConfigImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getActivationConfig(); + } + + /** + * + * + * @generated + */ + public EList getConfigProperties() { + if (configProperties == null) { + configProperties = new EObjectContainmentEList(ActivationConfigProperty.class, this, EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES); + } + return configProperties; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: + return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: + return getConfigProperties(); + case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: + getConfigProperties().clear(); + getConfigProperties().addAll((Collection)newValue); + return; + case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: + getConfigProperties().clear(); + return; + case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES: + return configProperties != null && !configProperties.isEmpty(); + case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //ActivationConfigImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigPropertyImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigPropertyImpl.java new file mode 100644 index 000000000..2b2d95050 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ActivationConfigPropertyImpl.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.EjbPackage; + + +/** + * + * An implementation of the model object 'Activation Config Property'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigPropertyImpl#getValue Value}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.ejb.impl.ActivationConfigPropertyImpl#getName Name}
  • + *
+ *

+ * + * @generated + */ +public class ActivationConfigPropertyImpl extends EObjectImpl implements ActivationConfigProperty { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ActivationConfigPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getActivationConfigProperty(); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: + return getValue(); + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: + return getName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: + setValue((String)newValue); + return; + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: + setName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: + setName(NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); //$NON-NLS-1$ + result.append(value); + result.append(", name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ActivationConfigPropertyImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AssemblyDescriptorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AssemblyDescriptorImpl.java new file mode 100644 index 000000000..86a55cd13 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/AssemblyDescriptorImpl.java @@ -0,0 +1,483 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; + + +/** + * The assembly-descriptor element contains application-assembly information. The application-assembly information consists of the following parts: the definition of security roles, the definition of method permissions, and the definition of transaction attributes for enterprise beans with container-managed transaction demarcation. All the parts are optional in the sense that they are omitted if the lists represented by them are empty. Providing an assembly-descriptor in the deployment descriptor is optional for the ejb-jar file producer. + */ +public class AssemblyDescriptorImpl extends EObjectImpl implements AssemblyDescriptor, EObject { + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList methodPermissions = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList methodTransactions = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityRoles = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected ExcludeList excludeList = null; + /** + * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. + * + * + * @see #getMessageDestinations() + * @generated + * @ordered + */ + protected EList messageDestinations = null; + + public AssemblyDescriptorImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getAssemblyDescriptor(); + } + +/** + * Return the first method permission that contains all the roles in securityRoles and + * is the same size + */ + +public MethodPermission getMethodPermission(List securityRolesList) { + List permissions = getMethodPermissions(); + MethodPermission temp = null; + for (int i = 0; i < permissions.size(); i++) { + temp = (MethodPermission) permissions.get(i); + if (temp.getRoles().containsAll(securityRolesList) && temp.getRoles().size() == securityRolesList.size()) + return temp; + } + return null; +} +public List getMethodPermissionMethodElements(EnterpriseBean anEJB) { + List allMethodElements = new ArrayList(); + List permissions = getMethodPermissions(); + MethodPermission permission; + for (int i = 0; i < permissions.size(); i++){ + permission = (MethodPermission) permissions.get(i); + allMethodElements.addAll(permission.getMethodElements(anEJB)); + } + return allMethodElements; +} + + +public List getMethodTransactionMethodElements(EnterpriseBean anEJB) { + List allMethodElements = new ArrayList(); + List transactions = getMethodTransactions(); + MethodTransaction transaction; + for (int i = 0; i < transactions.size(); i++){ + transaction = (MethodTransaction) transactions.get(i); + allMethodElements.addAll(transaction.getMethodElements(anEJB)); + } + return allMethodElements; +} + +public SecurityRole getSecurityRoleNamed(String roleName) { + java.util.List tempRoles = getSecurityRoles(); + SecurityRole role; + for (int i = 0; i < tempRoles.size(); i++) { + role = (SecurityRole) tempRoles.get(i); + if (role.getRoleName().equals(roleName)) + return role; + } + return null; +} + +/** + * @see org.eclipse.jst.j2ee.internal.ejb.AssemblyDescriptor + */ +public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { + SecurityRole role = getSecurityRoleNamed(existingRoleName); + role.setRoleName(newRoleName); +} + /** + * @generated This field/method will be replaced during code generation + */ + public EList getMethodPermissions() { + if (methodPermissions == null) { + methodPermissions = new EObjectContainmentWithInverseEList(MethodPermission.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR); + } + return methodPermissions; + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies how the container must manage transaction scopes for the enterprise + * bean's method invocations. The element consists of an optional description, a + * list of method elements, and a transaction attribute.The transaction attribute + * is to be applied to all the specified methods. + */ + public EList getMethodTransactions() { + if (methodTransactions == null) { + methodTransactions = new EObjectContainmentWithInverseEList(MethodTransaction.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR); + } + return methodTransactions; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EJBJar getEjbJar() { + if (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR) return null; + return (EJBJar)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbJar(EJBJar newEjbJar) { + if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR && newEjbJar != null)) { + if (EcoreUtil.isAncestor(this, newEjbJar)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newEjbJar != null) + msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, newEjbJar, newEjbJar)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getSecurityRoles() { + if (securityRoles == null) { + securityRoles = new EObjectContainmentEList(SecurityRole.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES); + } + return securityRoles; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public ExcludeList getExcludeList() { + return excludeList; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetExcludeList(ExcludeList newExcludeList, NotificationChain msgs) { + ExcludeList oldExcludeList = excludeList; + excludeList = newExcludeList; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, oldExcludeList, newExcludeList); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setExcludeList(ExcludeList newExcludeList) { + if (newExcludeList != excludeList) { + NotificationChain msgs = null; + if (excludeList != null) + msgs = ((InternalEObject)excludeList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs); + if (newExcludeList != null) + msgs = ((InternalEObject)newExcludeList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs); + msgs = basicSetExcludeList(newExcludeList, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, newExcludeList, newExcludeList)); + } + + /** + * + * + * @generated + */ + public EList getMessageDestinations() { + if (messageDestinations == null) { + messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS); + } + return messageDestinations; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + return ((InternalEList)getMethodPermissions()).basicAdd(otherEnd, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + return ((InternalEList)getMethodTransactions()).basicAdd(otherEnd, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + return ((InternalEList)getMethodPermissions()).basicRemove(otherEnd, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + return ((InternalEList)getMethodTransactions()).basicRemove(otherEnd, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: + return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: + return basicSetExcludeList(null, msgs); + case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: + return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + return getMethodPermissions(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + return getMethodTransactions(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + return getEjbJar(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: + return getSecurityRoles(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: + return getExcludeList(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: + return getMessageDestinations(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + return methodPermissions != null && !methodPermissions.isEmpty(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + return methodTransactions != null && !methodTransactions.isEmpty(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: + return securityRoles != null && !securityRoles.isEmpty(); + case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: + return excludeList != null; + case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: + return messageDestinations != null && !messageDestinations.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + getMethodPermissions().clear(); + getMethodPermissions().addAll((Collection)newValue); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + getMethodTransactions().clear(); + getMethodTransactions().addAll((Collection)newValue); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: + getSecurityRoles().clear(); + getSecurityRoles().addAll((Collection)newValue); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: + setExcludeList((ExcludeList)newValue); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + getMessageDestinations().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS: + getMethodPermissions().clear(); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS: + getMethodTransactions().clear(); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES: + getSecurityRoles().clear(); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST: + setExcludeList((ExcludeList)null); + return; + case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * Remove the MethodElements that are referencing @anEJB. + */ + public void removeData(EnterpriseBean anEJB) { + if (anEJB != null) { + removeMethodPermissionData(anEJB); + removeMethodTransactionData(anEJB); + } + } + /** + * Remove the MethodElements that are referencing @anEJB. + */ + protected void removeMethodPermissionData(EnterpriseBean anEJB) { + List mes = getMethodPermissionMethodElements(anEJB); + MethodElement me; + MethodPermission mp; + for (int i = 0; i < mes.size(); i++){ + me = (MethodElement) mes.get(i); + mp = (MethodPermission)me.eContainer(); + if (mp.getMethodElements().size() == 1){ + ExtendedEcoreUtil.becomeProxy(mp, mp.eResource()); + getMethodPermissions().remove(mp); + } + else{ + ExtendedEcoreUtil.becomeProxy(me, me.eResource()); + mp.getMethodElements().remove(me); + } + } + } + /** + * Remove the MethodElements that are referencing @anEJB. + */ + protected void removeMethodTransactionData(EnterpriseBean anEJB) { + List mes = getMethodTransactionMethodElements(anEJB); + MethodElement me; + MethodTransaction mt; + for (int i = 0; i < mes.size(); i++){ + me = (MethodElement) mes.get(i); + mt = (MethodTransaction)me.eContainer(); + if (mt.getMethodElements().size() == 1){ + ExtendedEcoreUtil.becomeProxy(mt, mt.eResource()); + getMethodTransactions().remove(mt); + } + else{ + ExtendedEcoreUtil.becomeProxy(me, me.eResource()); + mt.getMethodElements().remove(me); + } + } + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMPAttributeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMPAttributeImpl.java new file mode 100644 index 000000000..5d7a48b9f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMPAttributeImpl.java @@ -0,0 +1,605 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EAttributeImpl; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.Field; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; + +/** + * Describes a container-managed field. The field element includes an optional description of the field, and the name of the field. + + */ +public class CMPAttributeImpl extends EAttributeImpl implements CMPAttribute, EAttribute{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + protected transient JavaHelpers originatingType; + protected transient CMPAttribute targetAttribute; + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected boolean derived; + + public CMPAttributeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getCMPAttribute(); + } + +protected Field findExistingField() { + JavaClass javaClass = getEjbClass(); + if (javaClass != null) + return javaClass.getFieldExtended(getName()); + return null; +} +public org.eclipse.emf.ecore.EClassifier getAccessorType() { + if (getEjbClass() != null) { + Method getter = getEjbClass().getMethodExtended(getGetterName(), Collections.EMPTY_LIST); + if (getter != null) + return getter.getReturnType(); + } + return null; +} +public ContainerManagedEntity getCMPEntity() { + return (ContainerManagedEntity) eContainer(); +} +/** + * Return the EjbClass from the CMP Entity. + */ + +protected JavaClass getEjbClass() { + ContainerManagedEntity ejb = getCMPEntity(); + return ejb == null ? null : ejb.getEjbClass(); +} +/** + * Return the KeyClass from the CMP Entity. + */ + +protected JavaClass getKeyClass() { + ContainerManagedEntity ejb = getCMPEntity(); + return ejb == null ? null : ejb.getPrimaryKey(); +} +/** + * @deprecated - With EJB 2.0, assuming a Java field is no longer safe. + * Use getType() and getName() to get the most common field info. + * Or use getEjbClass() to get additional Java info. + */ + + public Field getField() { + ContainerManagedEntity ejb = getCMPEntity(); + + if(ejb == null) + return null; + + Field field = null; + switch(ejb.getVersionID()) { + case J2EEVersionConstants.EJB_1_0_ID: + case J2EEVersionConstants.EJB_1_1_ID: + field = findExistingField(); + //Set the field type based on the attribute type if necessary + if (field != null && getEType() != null && field.getEType() == null) + field.setEType(getEType()); + break; + case J2EEVersionConstants.EJB_2_0_ID: + case J2EEVersionConstants.EJB_2_1_ID: default: + field = ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory().createField(); + field.setName(getName()); + field.setEType(getAccessorType()); + break; + } + return field; +} +public String getGetterName() { + if (name != null && name.length() > 0) { + StringBuffer b = new StringBuffer("get"); //$NON-NLS-1$ + b.append(name.substring(0, 1).toUpperCase()).append(name.length() > 1 ? name.substring(1) : ""); //$NON-NLS-1$ + return b.toString(); + } + return name; +} +/** + * Return the type of this attribute in its original form (i.e., unwrapped if + * the type has been wrapped). + */ +public JavaHelpers getOriginatingType() { + return originatingType; +} +public String getSetterName() { + return "set" + getName().substring(0, 1).toUpperCase() + (getName().length() > 1 ? getName().substring(1) : ""); //$NON-NLS-1$ //$NON-NLS-2$ +} +public JavaHelpers getType() { + if (getEType() != null) + return (JavaHelpers) getEType(); + // Be sensitive to CMP 2.0 beans, get type from field or get accessor type + ContainerManagedEntity ejb = getCMPEntity(); + Resource res = eResource(); + boolean modFlag = res == null ? false : res.isModified(); + boolean deliveryFlag = eDeliver(); + try { + eSetDeliver(false); + if(ejb != null) { + switch(ejb.getVersionID()) { + case J2EEVersionConstants.EJB_1_0_ID: + case J2EEVersionConstants.EJB_1_1_ID: + setEType(getTypeFromBeanField()); + break; + case J2EEVersionConstants.EJB_2_0_ID: + case J2EEVersionConstants.EJB_2_1_ID: default: + setEType(get20Type()); + break; + } + } + } finally { + eSetDeliver(deliveryFlag); + if (res != null && res.isTrackingModification()) + res.setModified(modFlag); + } + return (JavaHelpers) getEType(); +} +protected EClassifier getTypeFromBeanField() { + EClassifier type = null; + Field field = getField(); + if (field != null) + type = field.getEType(); + if (type == null) + type = getKeyFieldTypeFromKeyClass(); + return type; +} +public EClassifier get20Type() { + EClassifier type = null; + if (getEjbClass() != null) { + String getterName = getGetterName(); + if (getterName != null && getterName.length() > 0) { + Method getter = getEjbClass().getMethodExtended(getterName, Collections.EMPTY_LIST); + if (getter != null) + type = getter.getReturnType(); + } + } + if (type == null) + type = getKeyFieldTypeFromKeyClass(); + return type; +} +/** + * @return + */ +private EClassifier getKeyFieldTypeFromKeyClass() { + if (isKey()) { + JavaClass key = getCMPEntity().getPrimaryKey(); + if (key != null && key.getQualifiedName() != null && !key.getQualifiedName().startsWith("java.lang")) { //$NON-NLS-1$ + Field field = key.getFieldExtended(getName()); + if (field != null) + return field.getEType(); + } else + return key; + } + return null; +} +public boolean isCMRField() { + return false; +} +public boolean isKey() { + return getCMPEntity() == null ? false : getCMPEntity().isKeyAttribute(this); +} + +public boolean isPrimKeyField(){ + return getCMPEntity() == null ? false : getCMPEntity().getPrimKeyField() == this; +} + +public void setOriginatingType(JavaHelpers newOriginatingType) { + originatingType = newOriginatingType; +} + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing the cmr field. + * + * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMP_ATTRIBUTE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { + if (aFeatureID >= 0) { + switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); + case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS, msgs); + default: + return eDynamicInverseAdd(otherEnd, aFeatureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, aFeatureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { + if (aFeatureID >= 0) { + switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: + return eBasicSetContainer(null, EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS, msgs); + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, aFeatureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, aFeatureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: + return eContainer.eInverseRemove(this, EcorePackage.ECLASS__ESTRUCTURAL_FEATURES, EClass.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + return getEAnnotations(); + case EjbPackage.CMP_ATTRIBUTE__NAME: + return getName(); + case EjbPackage.CMP_ATTRIBUTE__ORDERED: + return isOrdered() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__UNIQUE: + return isUnique() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: + return new Integer(getLowerBound()); + case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: + return new Integer(getUpperBound()); + case EjbPackage.CMP_ATTRIBUTE__MANY: + return isMany() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__REQUIRED: + return isRequired() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__ETYPE: + if (resolve) return getEType(); + return basicGetEType(); + case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: + return isChangeable() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__VOLATILE: + return isVolatile() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: + return isTransient() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: + return getDefaultValueLiteral(); + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE: + return getDefaultValue(); + case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: + return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__DERIVED: + return isDerived() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: + return getEContainingClass(); + case EjbPackage.CMP_ATTRIBUTE__ID: + return isID() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMP_ATTRIBUTE__EATTRIBUTE_TYPE: + if (resolve) return getEAttributeType(); + return basicGetEAttributeType(); + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: + return getDescription(); + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + return eAnnotations != null && !eAnnotations.isEmpty(); + case EjbPackage.CMP_ATTRIBUTE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.CMP_ATTRIBUTE__ORDERED: + return ordered != ORDERED_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__UNIQUE: + return unique != UNIQUE_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: + return lowerBound != LOWER_BOUND_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: + return upperBound != UPPER_BOUND_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__MANY: + return isMany() != false; + case EjbPackage.CMP_ATTRIBUTE__REQUIRED: + return isRequired() != false; + case EjbPackage.CMP_ATTRIBUTE__ETYPE: + return eType != null; + case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: + return changeable != CHANGEABLE_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__VOLATILE: + return volatile_ != VOLATILE_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: + return transient_ != TRANSIENT_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: + return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE: + return getDefaultValue() != null; + case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: + return unsettable != UNSETTABLE_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__DERIVED: + return derived != DERIVED_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__ECONTAINING_CLASS: + return getEContainingClass() != null; + case EjbPackage.CMP_ATTRIBUTE__ID: + return iD != ID_EDEFAULT; + case EjbPackage.CMP_ATTRIBUTE__EATTRIBUTE_TYPE: + return basicGetEAttributeType() != null; + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case EjbPackage.CMP_ATTRIBUTE__NAME: + setName((String)newValue); + return; + case EjbPackage.CMP_ATTRIBUTE__ORDERED: + setOrdered(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__UNIQUE: + setUnique(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: + setLowerBound(((Integer)newValue).intValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: + setUpperBound(((Integer)newValue).intValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__ETYPE: + setEType((EClassifier)newValue); + return; + case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: + setChangeable(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__VOLATILE: + setVolatile(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: + setTransient(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: + setDefaultValueLiteral((String)newValue); + return; + case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: + setUnsettable(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__DERIVED: + setDerived(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__ID: + setID(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMP_ATTRIBUTE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case EjbPackage.CMP_ATTRIBUTE__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__ORDERED: + setOrdered(ORDERED_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__UNIQUE: + setUnique(UNIQUE_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__ETYPE: + setEType((EClassifier)null); + return; + case EjbPackage.CMP_ATTRIBUTE__CHANGEABLE: + setChangeable(CHANGEABLE_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__VOLATILE: + setVolatile(VOLATILE_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__TRANSIENT: + setTransient(TRANSIENT_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__DEFAULT_VALUE_LITERAL: + setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__UNSETTABLE: + setUnsettable(UNSETTABLE_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__DERIVED: + setDerived(DERIVED_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__ID: + setID(ID_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * This field/method will be replaced during code generation. + */ + public String toString() { + return super.toString() + " :: " + getName(); //$NON-NLS-1$ + } + /** + * Returns true if a targetAttribute is being used. + * @return Returns a boolean + */ + public boolean isDerived() { + return derived; + } + public void setDerived(boolean aBoolean) { + if (aBoolean && getEType() == null) + getType(); //This ensures that the type is set. + derived = aBoolean; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public String toStringGen() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMRFieldImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMRFieldImpl.java new file mode 100644 index 000000000..e0e633999 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/CMRFieldImpl.java @@ -0,0 +1,470 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; + +/** + * Describes the bean provider's view of a relationship. It consists of an optional description, and the name and the class type of a field in the source of a role of a relationship. The CMRField::name element corresponds to the name used for the get and set accessor methods for the relationship. The CMRField::type element is used only for collection-valued CMRFields. It specifies the type of the collection that is used (a java class name). + * + + */ +public class CMRFieldImpl extends CMPAttributeImpl implements CMRField, CMPAttribute{ + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass collectionType = null; + public CMRFieldImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getCMRField(); + } + +/** + * createClassRef - return a JavaURL reference to the named Java class + */ +public JavaClass createClassRef(String targetName) { + return JavaRefFactory.eINSTANCE.createClassRef(targetName); +} +public String getCollectionTypeName() { + getCollectionType(); + return collectionType == null ? null : collectionType.getQualifiedName(); +} + +public boolean isPrimKeyField(){ + return false; +} + +public boolean isCMRField() { + return true; +} +public void setCollectionTypeName(String typeName) { + eSet(EjbPackage.eINSTANCE.getCMRField_CollectionType(), createClassRef(typeName)); +} + /** + * @generated This field/method will be replaced during code generation + */ + public EJBRelationshipRole getRole() { + if (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE) return null; + return (EJBRelationshipRole)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRole(EJBRelationshipRole newRole) { + if (newRole != eContainer || (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE && newRole != null)) { + if (EcoreUtil.isAncestor(this, newRole)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newRole != null) + msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.CMR_FIELD__ROLE, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__ROLE, newRole, newRole)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getCollectionType() { + if (collectionType != null && collectionType.eIsProxy()) { + JavaClass oldCollectionType = collectionType; + collectionType = (JavaClass)eResolveProxy((InternalEObject)collectionType); + if (collectionType != oldCollectionType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType)); + } + } + return collectionType; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetCollectionType() { + return collectionType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setCollectionType(JavaClass newCollectionType) { + JavaClass oldCollectionType = collectionType; + collectionType = newCollectionType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { + if (aFeatureID >= 0) { + switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); + case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.CMR_FIELD__ECONTAINING_CLASS, msgs); + case EjbPackage.CMR_FIELD__ROLE: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.CMR_FIELD__ROLE, msgs); + default: + return eDynamicInverseAdd(otherEnd, aFeatureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, aFeatureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int aFeatureID, Class baseClass, NotificationChain msgs) { + if (aFeatureID >= 0) { + switch (eDerivedStructuralFeatureID(aFeatureID, baseClass)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: + return eBasicSetContainer(null, EjbPackage.CMR_FIELD__ECONTAINING_CLASS, msgs); + case EjbPackage.CMR_FIELD__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.CMR_FIELD__ROLE: + return eBasicSetContainer(null, EjbPackage.CMR_FIELD__ROLE, msgs); + default: + return eDynamicInverseRemove(otherEnd, aFeatureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, aFeatureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: + return eContainer.eInverseRemove(this, EcorePackage.ECLASS__ESTRUCTURAL_FEATURES, EClass.class, msgs); + case EjbPackage.CMR_FIELD__ROLE: + return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + return getEAnnotations(); + case EjbPackage.CMR_FIELD__NAME: + return getName(); + case EjbPackage.CMR_FIELD__ORDERED: + return isOrdered() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__UNIQUE: + return isUnique() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__LOWER_BOUND: + return new Integer(getLowerBound()); + case EjbPackage.CMR_FIELD__UPPER_BOUND: + return new Integer(getUpperBound()); + case EjbPackage.CMR_FIELD__MANY: + return isMany() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__REQUIRED: + return isRequired() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__ETYPE: + if (resolve) return getEType(); + return basicGetEType(); + case EjbPackage.CMR_FIELD__CHANGEABLE: + return isChangeable() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__VOLATILE: + return isVolatile() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__TRANSIENT: + return isTransient() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: + return getDefaultValueLiteral(); + case EjbPackage.CMR_FIELD__DEFAULT_VALUE: + return getDefaultValue(); + case EjbPackage.CMR_FIELD__UNSETTABLE: + return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__DERIVED: + return isDerived() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: + return getEContainingClass(); + case EjbPackage.CMR_FIELD__ID: + return isID() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CMR_FIELD__EATTRIBUTE_TYPE: + if (resolve) return getEAttributeType(); + return basicGetEAttributeType(); + case EjbPackage.CMR_FIELD__DESCRIPTION: + return getDescription(); + case EjbPackage.CMR_FIELD__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.CMR_FIELD__ROLE: + return getRole(); + case EjbPackage.CMR_FIELD__COLLECTION_TYPE: + if (resolve) return getCollectionType(); + return basicGetCollectionType(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + return eAnnotations != null && !eAnnotations.isEmpty(); + case EjbPackage.CMR_FIELD__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.CMR_FIELD__ORDERED: + return ordered != ORDERED_EDEFAULT; + case EjbPackage.CMR_FIELD__UNIQUE: + return unique != UNIQUE_EDEFAULT; + case EjbPackage.CMR_FIELD__LOWER_BOUND: + return lowerBound != LOWER_BOUND_EDEFAULT; + case EjbPackage.CMR_FIELD__UPPER_BOUND: + return upperBound != UPPER_BOUND_EDEFAULT; + case EjbPackage.CMR_FIELD__MANY: + return isMany() != false; + case EjbPackage.CMR_FIELD__REQUIRED: + return isRequired() != false; + case EjbPackage.CMR_FIELD__ETYPE: + return eType != null; + case EjbPackage.CMR_FIELD__CHANGEABLE: + return changeable != CHANGEABLE_EDEFAULT; + case EjbPackage.CMR_FIELD__VOLATILE: + return volatile_ != VOLATILE_EDEFAULT; + case EjbPackage.CMR_FIELD__TRANSIENT: + return transient_ != TRANSIENT_EDEFAULT; + case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: + return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); + case EjbPackage.CMR_FIELD__DEFAULT_VALUE: + return getDefaultValue() != null; + case EjbPackage.CMR_FIELD__UNSETTABLE: + return unsettable != UNSETTABLE_EDEFAULT; + case EjbPackage.CMR_FIELD__DERIVED: + return derived != DERIVED_EDEFAULT; + case EjbPackage.CMR_FIELD__ECONTAINING_CLASS: + return getEContainingClass() != null; + case EjbPackage.CMR_FIELD__ID: + return iD != ID_EDEFAULT; + case EjbPackage.CMR_FIELD__EATTRIBUTE_TYPE: + return basicGetEAttributeType() != null; + case EjbPackage.CMR_FIELD__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.CMR_FIELD__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.CMR_FIELD__ROLE: + return getRole() != null; + case EjbPackage.CMR_FIELD__COLLECTION_TYPE: + return collectionType != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case EjbPackage.CMR_FIELD__NAME: + setName((String)newValue); + return; + case EjbPackage.CMR_FIELD__ORDERED: + setOrdered(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__UNIQUE: + setUnique(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__LOWER_BOUND: + setLowerBound(((Integer)newValue).intValue()); + return; + case EjbPackage.CMR_FIELD__UPPER_BOUND: + setUpperBound(((Integer)newValue).intValue()); + return; + case EjbPackage.CMR_FIELD__ETYPE: + setEType((EClassifier)newValue); + return; + case EjbPackage.CMR_FIELD__CHANGEABLE: + setChangeable(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__VOLATILE: + setVolatile(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__TRANSIENT: + setTransient(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: + setDefaultValueLiteral((String)newValue); + return; + case EjbPackage.CMR_FIELD__UNSETTABLE: + setUnsettable(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__DERIVED: + setDerived(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__ID: + setID(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CMR_FIELD__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.CMR_FIELD__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.CMR_FIELD__ROLE: + setRole((EJBRelationshipRole)newValue); + return; + case EjbPackage.CMR_FIELD__COLLECTION_TYPE: + setCollectionType((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CMR_FIELD__EANNOTATIONS: + getEAnnotations().clear(); + return; + case EjbPackage.CMR_FIELD__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__ORDERED: + setOrdered(ORDERED_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__UNIQUE: + setUnique(UNIQUE_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__ETYPE: + setEType((EClassifier)null); + return; + case EjbPackage.CMR_FIELD__CHANGEABLE: + setChangeable(CHANGEABLE_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__VOLATILE: + setVolatile(VOLATILE_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__TRANSIENT: + setTransient(TRANSIENT_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__DEFAULT_VALUE_LITERAL: + setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__UNSETTABLE: + setUnsettable(UNSETTABLE_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__DERIVED: + setDerived(DERIVED_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__ID: + setID(ID_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.CMR_FIELD__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.CMR_FIELD__ROLE: + setRole((EJBRelationshipRole)null); + return; + case EjbPackage.CMR_FIELD__COLLECTION_TYPE: + setCollectionType((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @see org.eclipse.jst.j2ee.internal.ejb.impl.CMPAttributeImpl#getCMPEntity() + */ + public ContainerManagedEntity getCMPEntity() { + EJBRelationshipRole role = getRole(); + if (role != null) + return role.getSourceEntity(); + return null; + } + + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityFilter.java new file mode 100644 index 000000000..6d9a534e6 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityFilter.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; +import org.eclipse.jst.j2ee.internal.IEJBModelExtenderManager; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; + + +/** + * Insert the type's description here. Creation date: (11/28/2000 6:28:39 PM) + * @author: Administrator + */ +public abstract class ContainerManagedEntityFilter implements EJBExtensionFilter { + + + /** + * AttributeFilter constructor comment. + */ + public ContainerManagedEntityFilter() { + super(); + } + + /** + * filter method comment. + */ + public abstract List filter(ContainerManagedEntity cmp); + + /** + * All CMPAttributeFilters only operate on ContainerManagedEntityExtension + * objects. + */ + public List filter(EnterpriseBean ejb) { + if (ejb.isEntity() && ((Entity) ejb).isContainerManagedEntity()) return filter((ContainerManagedEntity) ejb); + return new ArrayList(); + } + + protected void filterRoleAttributesByName(List allAttributes, List roleAttributes) { + if (!roleAttributes.isEmpty()) { + int allSize, roleSize; + roleSize = roleAttributes.size(); + CMPAttribute roleAtt, allAtt; + for (int i = 0; i < roleSize; i++) { + roleAtt = (CMPAttribute) roleAttributes.get(i); + allSize = allAttributes.size(); + for (int j = allSize - 1; j != -1; j--) { + allAtt = (CMPAttribute) allAttributes.get(j); + if (roleAtt == allAtt || roleAtt.getName().equals(allAtt.getName())) { + allAttributes.remove(j); + break; + } + } + } + } + } + + protected EjbModuleExtensionHelper getEjbModuleExtHelper(Object context) { + return IEJBModelExtenderManager.INSTANCE.getEJBModuleExtension(context); + } + + protected List getLocalRelationshipRoles(ContainerManagedEntity cmp) { + EjbModuleExtensionHelper modelExtender = null; + if (cmp.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID) + return cmp.getRoles(); + else if ( (modelExtender = getEjbModuleExtHelper(cmp)) != null ){ + return modelExtender.getLocalRelationshipRoles_cmp11(cmp); + } + return Collections.EMPTY_LIST; + } + + protected List getRelationshipRoles(ContainerManagedEntity cmp) { + List roles = new ArrayList(); + collectRelationshipRoles(cmp, getEjbModuleExtHelper(cmp), roles); + return Collections.unmodifiableList(roles); + } + + public void collectRelationshipRoles(ContainerManagedEntity cmp, EjbModuleExtensionHelper extensionHelper, List containerList) { + if(cmp == null) + return; + containerList.addAll(getLocalRelationshipRoles(cmp)); + if(extensionHelper != null) + collectRelationshipRoles((ContainerManagedEntity) extensionHelper.getSuperType(cmp), extensionHelper, containerList); + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityImpl.java new file mode 100644 index 000000000..2b9eea414 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ContainerManagedEntityImpl.java @@ -0,0 +1,1142 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.Field; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbFactory; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.ejb.util.CMPKeySynchronizationAdapter; + + +/** + * @generated + */ +public class ContainerManagedEntityImpl extends EntityImpl implements ContainerManagedEntity { + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * + * @ordered + */ + protected static final String VERSION_EDEFAULT = "1.x"; //$NON-NLS-1$ + + protected EClassifier fGeneratedIdType = null; + protected static final String PERS_FEATURE_CHNG_NOTIFIER = "PersistentFeatureChangeNotificationAdapter"; //$NON-NLS-1$ + protected static final String QUERY_METHOD_NAME = "QueryMethod"; //$NON-NLS-1$ + protected static final String FIND_BY_PRIM_KEY_METHOD_NAME = "findByPrimaryKey"; //$NON-NLS-1$ + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String version = VERSION_EDEFAULT; + /** + * The default value of the '{@link #getAbstractSchemaName() Abstract Schema Name}' attribute. + * + * + * @see #getAbstractSchemaName() + * @generated + * @ordered + */ + protected static final String ABSTRACT_SCHEMA_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String abstractSchemaName = ABSTRACT_SCHEMA_NAME_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList persistentAttributes = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList keyAttributes = null; + /** + * The cached value of the '{@link #getQueries() Queries}' containment reference list. + * + * + * @see #getQueries() + * @generated + * @ordered + */ + protected EList queries = null; + + /** + * The cached value of the '{@link #getCMPAttribute() CMP Attribute}' reference list. + * + * + * @see #getCMPAttribute() + * @generated + * @ordered + */ + protected EList cmpAttribute = null; + + /** + * The cached value of the '{@link #getPrimKeyField() Prim Key Field}' reference. + * + * + * @see #getPrimKeyField() + * @generated + * @ordered + */ + protected CMPAttribute primKeyField = null; + + /** + * @generated + */ + protected ContainerManagedEntityImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getContainerManagedEntity(); + } + +/** + * Create a new instance of AttributeExtn with aName and add it to the keyFeatures. + * Creation date: (8/2/2000 9:11:13 PM) + * @param aName java.lang.String + * @return CMPAttribute + */ +public CMPAttribute addKeyAttributeName(String aName) { + CMPAttribute attribute = getPersistentAttribute(aName); + if (attribute != null) { + List keys = getKeyAttributes(); + CMPAttribute key; + for (int i = 0; i < keys.size(); i++) { + key = (CMPAttribute) keys.get(i); + if (aName.equals(key.getName())) + return attribute; + } + keys.add(attribute); + } + return attribute; +} +/** + * Return a List of one of the properties using aFilter. +*/ +public List getFilteredFeatures(EJBExtensionFilter aFilter) { + return aFilter.filter(this); + } +/** + * Add a persistent attribute with the same name as the name for aField. + * Creation date: (8/3/2000 8:30:42 AM) + * @param aField org.eclipse.jem.internal.java.Field + * @return CMPAttribute + */ +public CMPAttribute addPersistentAttribute(Field aField) { + if (aField == null) + return null; + return addPersistentAttributeName(aField.getName()); +} +/** + * Create a new instance of AttributeExtn with aName and add it to the persistentFeatures. + * Creation date: (8/2/2000 9:11:13 PM) + * @param aName java.lang.String + * @return CMPAttribute + */ +public CMPAttribute addPersistentAttributeName(String aName) { + CMPAttribute attribute = getPersistentAttribute(aName); + if (attribute == null) { + attribute = createPersistentAttribute(aName); + getPersistentAttributes().add(attribute); + } + return attribute; +} +protected CMPAttribute createPersistentAttribute(String aName) { + CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute(); + attribute.setName(aName); + return attribute; +} +public List getAllAvailableQueryMethods() { + Set sigs = new HashSet(); + List javaMethods = getAvailableSelectQueryJavaMethods(); + sigs.addAll(getMethodElementSignatures(javaMethods)); + javaMethods = getAvailableLocalQueryJavaMethods(); + sigs.addAll(getMethodElementSignatures(javaMethods)); + javaMethods = getAvailableRemoteQueryJavaMethods(); + sigs.addAll(getMethodElementSignatures(javaMethods)); + List signatures = new ArrayList(sigs); + return createQueryMethods(signatures); +} +protected List createQueryMethods(List signatures) { + Collections.sort(signatures); + Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL; + return createMethodElements(QUERY_METHOD_NAME, signatures, enumerator); +} + +public List getAvailableSelectQueryMethods() { + List methods = getAvailableSelectQueryJavaMethods(); + List sigs = getMethodElementSignatures(methods); + return createQueryMethods(sigs); +} +protected List getAvailableSelectQueryJavaMethods() { + JavaClass bean = getEjbClass(); + if (bean == null) + return Collections.EMPTY_LIST; + return bean.getOnlySpecificMethods("ejbSelect", Collections.EMPTY_LIST); //$NON-NLS-1$ +} + +public List getAvailableFindQueryMethods() { + Set sigs = new HashSet(); + List javaMethods = getAvailableRemoteQueryJavaMethods(); + sigs.addAll(getMethodElementSignatures(javaMethods)); + javaMethods = getAvailableLocalQueryJavaMethods(); + sigs.addAll(getMethodElementSignatures(javaMethods)); + List signatures = new ArrayList(sigs); + return createQueryMethods(signatures); +} +protected List getAvailableLocalQueryJavaMethods() { + return getAvailableQueryJavaMethods(getLocalHomeInterface()); +} +/** +* This returns the CMP version id by using the module id and the . +* Compare with J2EEVersionConstants to determine CMP level +* This will help differentiate between 2.0,2.1,... rather than "2.x" +*/ +public int getCMPVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + /* If resource is null we will return based on CMP version....*/ + if (res == null) { + if (getVersion().equals(ContainerManagedEntity.VERSION_1_X)) + return J2EEVersionConstants.EJB_1_1_ID; + return J2EEVersionConstants.EJB_2_0_ID; + } + int cmpVersion; + switch (res.getModuleVersionID()) { + case J2EEVersionConstants.EJB_2_0_ID : + if (getVersion().equalsIgnoreCase(VERSION_2_X)) + cmpVersion = J2EEVersionConstants.EJB_2_0_ID; + else + cmpVersion = J2EEVersionConstants.EJB_1_1_ID; + break; + case J2EEVersionConstants.EJB_2_1_ID : + if (getVersion().equalsIgnoreCase(VERSION_2_X)) + cmpVersion = J2EEVersionConstants.EJB_2_1_ID; + else + cmpVersion = J2EEVersionConstants.EJB_1_1_ID; + break; + + default : + cmpVersion = res.getModuleVersionID(); + } + return cmpVersion; +} + +/* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID() + */ +public int getVersionID() { + return getCMPVersionID(); +}protected List getAvailableRemoteQueryJavaMethods() { + return getAvailableQueryJavaMethods(getHomeInterface()); +} + +protected List getAvailableQueryJavaMethods(JavaClass home) { + if (home == null) return Collections.EMPTY_LIST; + List excluded = new ArrayList(1); + excluded.add("findByPrimaryKey"); //$NON-NLS-1$ + return home.getOnlySpecificMethods("find", excluded); //$NON-NLS-1$ +} + +protected EClassifier getGeneratedIdType() { + if (fGeneratedIdType == null) { + fGeneratedIdType = JavaRefFactory.eINSTANCE.reflectType(JAVA_LANG_STRING, this); + } + return fGeneratedIdType; +} +/** + * Return the keyAttribute with aName. + * Creation date: (8/8/2000 9:25:27 PM) + * @return EStructuralFeature + * @param aName java.lang.String + */ +public CMPAttribute getKeyAttribute(String aName) { + if (aName != null) { + Iterator it = getKeyAttributes().iterator(); + CMPAttribute next; + while (it.hasNext()) { + next = (CMPAttribute) it.next(); + if (aName.equals(next.getName())) + return next; + } + } + return null; +} +/** + * Return the persistentAttribute with aName. + * Creation date: (8/8/2000 9:25:27 PM) + * @return EStructuralFeature + * @param aName java.lang.String + */ +public CMPAttribute getPersistentAttribute(String aName) { + if (aName != null) { + Iterator it = getPersistentAttributes().iterator(); + CMPAttribute next; + while (it.hasNext()) { + next = (CMPAttribute) it.next(); + if (aName.equals(next.getName())) + return next; + } + } + return null; +} + +/** + * If a primary key exists, return the persistent attribute; the primary key is defined as one and only one + * key attribute, whose type is the same as the key class + * @deprecated use getPrimKeyField() + */ +public CMPAttribute getPrimaryKeyAttribute() { + return getPrimKeyField(); +} + + +/** + * isContainerManagedEntity method comment. + */ +public boolean isContainerManagedEntity() { + return true; +} +public boolean isKeyAttribute(CMPAttribute anAttribute) { + java.util.List attributes = getKeyAttributes(); + for (int i = 0; i < attributes.size(); i++){ + if (attributes.get(i) == anAttribute) + return true; + } + return false; +} +/* + * Return whether this bean represents an instance of the "unknown primary key" case + * described in the specification. This is identified by the primary key class + * being specified as "java.lang.Object". + * In order to deploy an unknown primary key bean, we must substitute a real key, + * and add a corresponding field. + */ +public boolean isUnknownPrimaryKey() { + String keyName = getPrimaryKeyName(); + if (keyName == null) return false; + //test whether it is unknown or we have the WAS generated key for the unknown prim key + boolean genTest = keyName.equals(UNKNOWN_PRIMARY_KEY) || keyName.equals(WAS_GENERATED_STRING_KEY); + if (genTest) return true; + //Lastly, test for the findByPrimaryKey(Object) method on the home. + JavaClass home = getHomeInterface(); + if (home == null) + home = getLocalHomeInterface(); + if (home == null) return false; + List parmType = new ArrayList(1); + parmType.add(UNKNOWN_PRIMARY_KEY); + return home.getMethodExtended(FIND_BY_PRIM_KEY_METHOD_NAME, parmType) != null; +} +/** + * isVersion1_X method comment. + */ +public boolean isVersion1_X() { + return getVersion().equals(ContainerManagedEntity.VERSION_1_X); +} +/** + * isVersion2_X method comment. + */ +public boolean isVersion2_X() { + return getVersion().equals(ContainerManagedEntity.VERSION_2_X); +} +/* + * listPersistentFieldNames - return the names of our CMP fields. derived from persistentFeatures + */ +public String[] listPersistentFieldNames() { + java.util.List attributes = getPersistentAttributes(); + String[] names = new String[attributes.size()]; + for (int i = 0; i < attributes.size(); i++) { + names[i] = ((CMPAttribute) attributes.get(i)).getName(); + } + return names; +} + +/** + * Remove the persistentAttribute with the same name as the Field's name. + * Creation date: (8/3/2000 8:33:01 AM) + * @param aField org.eclipse.jem.internal.java.Field + */ +public CMPAttribute removePersistentAttribute(Field aField) { + if (aField != null) + return removePersistentAttribute(aField.getName()); + return null; +} +/** + * Remove the persistentAttribute named aName. + * Creation date: (8/2/2000 8:59:32 PM) + * @param aName java.lang.String + */ +public CMPAttribute removePersistentAttribute(String aName) { + if (aName != null) { + Iterator it = getPersistentAttributes().iterator(); + CMPAttribute next; + while (it.hasNext()) { + next = (CMPAttribute) it.next(); + if (aName.equals(next.getName())) { + getPersistentAttributes().remove(next); + return next; + } + } + } + return null; +} +/** + * @generated This field/method will be replaced during code generation + * Specifies the version of an entity bean with container-managed persistence. + * + * @invariant The cmp-version element must be one of the two following: 1.x , 2.x + * @default 2.x + * Returns "1.x" if in a 1.1 Jar (For compatibility) + */ + public String getVersion() { + return version; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + * The abstract-schema-name element specifies the name of the abstract schema type of an entity bean with cmp-version 2.x. It is used in EJB QL queries. + * + * For example, the abstract-schema-name for an entity bean whose local interface is com.acme.commerce.Order might be Order. + * + + */ + public String getAbstractSchemaName() { + return abstractSchemaName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAbstractSchemaName(String newAbstractSchemaName) { + String oldAbstractSchemaName = abstractSchemaName; + abstractSchemaName = newAbstractSchemaName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME, oldAbstractSchemaName, abstractSchemaName)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getPersistentAttributes() { + if (persistentAttributes == null) { + persistentAttributes = new EObjectContainmentEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES); + } + return persistentAttributes; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + return ((InternalEList)getQueries()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: + return basicSetSecurityIdentity(null, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: + return ((InternalEList)getPersistentAttributes()).basicRemove(otherEnd, msgs); + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + return ((InternalEList)getQueries()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: + return getIcons(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: + return getDescription(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: + return getResourceRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: + return getEjbRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: + return getServiceRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: + return getName(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: + if (resolve) return getEjbClass(); + return basicGetEjbClass(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: + if (resolve) return getHomeInterface(); + return basicGetHomeInterface(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: + if (resolve) return getRemoteInterface(); + return basicGetRemoteInterface(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + return getEjbJar(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: + return getSecurityIdentity(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: + if (resolve) return getLocalHomeInterface(); + return basicGetLocalHomeInterface(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: + if (resolve) return getLocalInterface(); + return basicGetLocalInterface(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: + return isReentrant() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: + if (resolve) return getPrimaryKey(); + return basicGetPrimaryKey(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: + return getVersion(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: + return getAbstractSchemaName(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: + return getPersistentAttributes(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: + return getKeyAttributes(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + return getQueries(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: + return getCMPAttribute(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: + if (resolve) return getPrimKeyField(); + return basicGetPrimKeyField(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: + return ejbClass != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: + return homeInterface != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: + return remoteInterface != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: + return securityIdentity != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: + return localHomeInterface != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: + return localInterface != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: + return isSetReentrant(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: + return primaryKey != null; + case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: + return ABSTRACT_SCHEMA_NAME_EDEFAULT == null ? abstractSchemaName != null : !ABSTRACT_SCHEMA_NAME_EDEFAULT.equals(abstractSchemaName); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: + return persistentAttributes != null && !persistentAttributes.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: + return keyAttributes != null && !keyAttributes.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + return queries != null && !queries.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: + return cmpAttribute != null && !cmpAttribute.isEmpty(); + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: + return primKeyField != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: + setName((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: + setEjbClass((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: + setHomeInterface((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: + setLocalInterface((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: + setReentrant(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: + setPrimaryKey((JavaClass)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: + setVersion((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: + setAbstractSchemaName((String)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: + getPersistentAttributes().clear(); + getPersistentAttributes().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: + getKeyAttributes().clear(); + getKeyAttributes().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + getQueries().clear(); + getQueries().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: + getCMPAttribute().clear(); + getCMPAttribute().addAll((Collection)newValue); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: + setPrimKeyField((CMPAttribute)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.CONTAINER_MANAGED_ENTITY__ICONS: + getIcons().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_REFS: + getEjbRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SERVICE_REFS: + getServiceRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_CLASS: + setEjbClass((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__HOME_INTERFACE: + setHomeInterface((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__LOCAL_INTERFACE: + setLocalInterface((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__REENTRANT: + unsetReentrant(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY: + setPrimaryKey((JavaClass)null); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME: + setAbstractSchemaName(ABSTRACT_SCHEMA_NAME_EDEFAULT); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES: + getPersistentAttributes().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES: + getKeyAttributes().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES: + getQueries().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE: + getCMPAttribute().clear(); + return; + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD: + setPrimKeyField((CMPAttribute)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); //$NON-NLS-1$ + result.append(version); + result.append(", abstractSchemaName: "); //$NON-NLS-1$ + result.append(abstractSchemaName); + result.append(')'); + return result.toString(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getKeyAttributesGen() { + if (keyAttributes == null) { + keyAttributes = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES); + } + return keyAttributes; + } + + public EList getKeyAttributes() { + if(keyAttributes == null) { + CMPKeySynchronizationAdapter syncAdapter = (CMPKeySynchronizationAdapter) EcoreUtil.getExistingAdapter(this, CMPKeySynchronizationAdapter.ADAPTER_TYPE); + if(syncAdapter != null) + syncAdapter.initializeKeyAttributes(); + } + return getKeyAttributesGen(); + } + + /** + * + * + * @generated + */ + public EList getQueries() { + if (queries == null) { + queries = new EObjectContainmentWithInverseEList(Query.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, EjbPackage.QUERY__ENTITY); + } + return queries; + } + + /** + * + * + * @generated + */ + public EList getCMPAttribute() { + if (cmpAttribute == null) { + cmpAttribute = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE); + } + return cmpAttribute; + } + + /** + * + * + * @generated + */ + public CMPAttribute getPrimKeyField() { + + if (primKeyField != null && primKeyField.eIsProxy()) { + CMPAttribute oldPrimKeyField = primKeyField; + primKeyField = (CMPAttribute)eResolveProxy((InternalEObject)primKeyField); + if (primKeyField != oldPrimKeyField) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField)); + } + } + return primKeyField; + } + + public void makePrimKeyFieldProxy() { + if (primKeyField == null) return; + String fieldName = primKeyField.getName(); + if (fieldName == null) fieldName = ""; //$NON-NLS-1$ + primKeyField = EjbFactory.eINSTANCE.createCMPAttribute(); + ((InternalEObject)primKeyField).eSetProxyURI(URI.createURI(fieldName)); + + } + + /** + * + * + * @generated + */ + public CMPAttribute basicGetPrimKeyField() { + return primKeyField; + } + + /** + * + * + * @generated + */ + public void setPrimKeyField(CMPAttribute newPrimKeyField) { + CMPAttribute oldPrimKeyField = primKeyField; + primKeyField = newPrimKeyField; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField)); + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getCMRFields() + */ + public List getCMRFields() { + List myRoles = getRoles(); + List cmrFields = Collections.EMPTY_LIST; + if (myRoles != null && !myRoles.isEmpty()) { + cmrFields = new ArrayList(); + Iterator i = myRoles.iterator(); + while (i.hasNext()) { + EJBRelationshipRole role = (EJBRelationshipRole) i.next(); + CMRField field = role.getCmrField(); + if (field != null) + cmrFields.add(field); + } + } + return cmrFields; + } + + public boolean isSelfReferencing(EJBRelation rel) { + if (rel.getSecondRole() == null) + return false; + return (rel.getFirstRole().getSourceEntity() == this) && + (rel.getSecondRole().getSourceEntity() == this); + } + + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRoles() + */ + public List getRoles() { + if (getEjbJar() == null) + return Collections.EMPTY_LIST; + List allRoles = getEjbJar().getEjbRelations(); + List myRoles = Collections.EMPTY_LIST; + if (allRoles != null && !allRoles.isEmpty()) { + myRoles = new ArrayList(); + Iterator i = allRoles.iterator(); + while (i.hasNext()) { + EJBRelation rel = (EJBRelation) i.next(); + EJBRelationshipRole role = rel.getFirstRole(); + if (isSelfReferencing(rel)) { + myRoles.add(rel.getFirstRole()); + myRoles.add(rel.getSecondRole()); + } + else if ((role != null) && role.getSourceEntity() == this) { + myRoles.add(role); + } else { + role = rel.getSecondRole(); + if ((role != null) && (role.getSourceEntity() == this)) + myRoles.add(role); + } + } + } + return myRoles; + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRole(java.lang.String) + */ + public CommonRelationshipRole getRole(String roleName) { + for (int i=0; i singleRoleNameSize)) //don't set the originating type since we are derived from another derived attribute + attribute.setOriginatingType(fieldType); + attribute.setEType(fieldType.getWrapper()); + } + if (isNew && !getRole().isKey()) + attribute.setDerived(true); + } + /** + * getFields method comment. + */ + protected void collectAttributes(ContainerManagedEntity type, String attributeName, List aList, List computedNames) { + collectKeyModelledAttributes(type, attributeName, aList, computedNames); + collectKeyRoleAttributes(type, attributeName, aList, computedNames); + } + /** + * + */ + protected void collectAttributes(CMPAttribute type, String attributeName, List aList, List computedNames) { + boolean isNewAttribute = false; + attributeName = appendName(attributeName, type.getName()); + computedNames.add(attributeName); + CMPAttribute attribute = getCMPEntity().getPersistentAttribute(attributeName); + if (attribute == null) { + attribute = createPersistentAttribute(attributeName); + isNewAttribute = true; + } + //This is necessary for code generation + ContainerManagedEntity entity = (ContainerManagedEntity) type.eContainer(); + if (entity != null) + setDerivedAttributeType(attribute, type, isNewAttribute); + if (isNewAttribute) { + if (getRole().isKey()) + getCMPEntity().getKeyAttributes().add(attribute); + aList.add(attribute); + getCMPEntity().getPersistentAttributes().add(attribute); + } else { + if (!aList.contains(attribute)) + aList.add(attribute); + } + } + protected CMPAttribute createPersistentAttribute(String aName) { + CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute(); + attribute.setName(aName); + attribute.setDescription("Generated to support relationships. Do NOT delete."); + return attribute; + } + /** + * getFields method comment. + */ + protected void collectKeyModelledAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) { + java.util.Iterator it = entity.getFilteredFeatures(ModelledKeyAttributeFilter.singleton()).iterator(); + CMPAttribute attribute; + while (it.hasNext()) { + attribute = (CMPAttribute) it.next(); + collectAttributes(attribute, attributeName, aList, computedNames); + } + } + /** + * getFields method comment. + */ + protected void collectKeyRoleAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) { + if(visitedKeyTypes.contains(entity)){ + throw new RuntimeException("Key role cycle detected"); + } + visitedKeyTypes.add(entity); + java.util.Iterator it = entity.getFilteredFeatures(KeyRelationshipRoleFilter.singleton()).iterator(); + CommonRelationshipRole aRole; + while (it.hasNext()) { + aRole = (CommonRelationshipRole) it.next(); + String attName = appendName(attributeName, aRole.getName()); + reconcileAttributes(aRole, attName, aList, computedNames); + } + } + protected ContainerManagedEntity getCMPEntity() { + return getRole().getSourceEntity(); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarImpl.java new file mode 100644 index 000000000..6a00e4651 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarImpl.java @@ -0,0 +1,817 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EJBResource; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.ejb.Relationships; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; + +/** + * The root element of the EJB deployment descriptor. It contains an optional description of the ejb-jar file; optional display name; optional small icon file name; optional large icon file + * name; mandatory structural information about all included enterprise beans; a descriptor for container managed relationships, if any; an optional application-assembly descriptor; and an optional name of an ejb-client-jar file for the ejb-jar. + */ +public class EJBJarImpl extends CompatibilityDescriptionGroupImpl implements EJBJar { + + /** + * The default value of the '{@link #getEjbClientJar() Ejb Client Jar}' attribute. + * + * + * @see #getEjbClientJar() + * @generated + * @ordered + */ + protected static final String EJB_CLIENT_JAR_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String ejbClientJar = EJB_CLIENT_JAR_EDEFAULT; + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected AssemblyDescriptor assemblyDescriptor = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList enterpriseBeans = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected Relationships relationshipList = null; + public EJBJarImpl() { + super(); +// setRefId(com.ibm.etools.archive.ArchiveConstants.EJBJAR_ID); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEJBJar(); + } + +/** + * Return true if there are any ContainerManagedEntity beans in this jar. + */ +public boolean containsContainerManagedBeans() { + Iterator it = getEnterpriseBeans().iterator(); + EnterpriseBean ejb; + while (it.hasNext()) { + ejb = (EnterpriseBean)it.next(); + if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity()) + return true; + } + return false; +} +/** + * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar + */ +public boolean containsSecurityRole(java.lang.String name) { + AssemblyDescriptor ad = getAssemblyDescriptor(); + return (ad != null) && (ad.getSecurityRoleNamed(name) != null); +} +/** + * Return List of BMP beans in this jar. + * @return java.util.List + */ +public List getBeanManagedBeans() { + List allBeans, beans; + allBeans = getEnterpriseBeans(); + int size = allBeans.size(); + beans = new ArrayList(size); + EnterpriseBean ejb; + for (int i = 0; i < size; i++) { + ejb = (EnterpriseBean) allBeans.get(i); + if (ejb.isBeanManagedEntity()) + beans.add(ejb); + } + return beans; +} +/** + * Return List of ContainerManagedEntity beans in this jar. + * @return java.util.List + */ +public List getContainerManagedBeans() { + List cmps = new ArrayList(getEnterpriseBeans().size()); + Iterator it = getEnterpriseBeans().iterator(); + EnterpriseBean ejb; + while (it.hasNext()) { + ejb = (EnterpriseBean)it.next(); + if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity()) + cmps.add(ejb); + } + return cmps; +} + +/** + * Return List of EJB 1.1 ContainerManagedEntity beans in this jar. + * @return java.util.List + */ +public List getEJB11ContainerManagedBeans() { + List cmps = new ArrayList(getEnterpriseBeans().size()); + Iterator it = getEnterpriseBeans().iterator(); + EnterpriseBean ejb; + while (it.hasNext()) { + ejb = (EnterpriseBean)it.next(); + if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() <= J2EEVersionConstants.EJB_1_1_ID) + cmps.add(ejb); + } + return cmps; +} + +/** + * Return List of EJB 2.0 ContainerManagedEntity beans in this jar. + * @return java.util.List + */ +public List getEJB20ContainerManagedBeans() { + List cmps = new ArrayList(getEnterpriseBeans().size()); + Iterator it = getEnterpriseBeans().iterator(); + EnterpriseBean ejb; + while (it.hasNext()) { + ejb = (EnterpriseBean)it.next(); + if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID) + cmps.add(ejb); + } + return cmps; +} + /* + * @see EJBJar#getMessageDrivenBeans() + */ + public List getMessageDrivenBeans() { + List ejbs = getEnterpriseBeans(); + int size = ejbs.size(); + List mdbs = new ArrayList(size); + EnterpriseBean ejb; + for (int i = 0; i < size; i++) { + ejb = (EnterpriseBean)ejbs.get(i); + if (ejb.isMessageDriven()) + mdbs.add(ejb); + } + return mdbs; + } +/** + * @return The list of EjbRelations references + * A list of ejb-relation elements, which specify the container managed relationships. + */ +public List getEjbRelations() { + return getRelationshipList() == null ? null : getRelationshipList().getEjbRelations(); +} +/** + * Return an enterprise bean referenced by the EjbRef, if one exists. The ejb-link value + * of the ref must equate to a named enterprise bean contained in the jar; otherwise return + * null + */ +public EnterpriseBean getEnterpiseBeanFromRef(EjbRef ref) { + String link = ref.getLink(); + if (link == null) { + return null; + } + return getEnterpriseBeanNamed(link); +} +public EnterpriseBean getEnterpriseBeanNamed(String ejbName) { + if (ejbName == null) + return null; + EList beans = getEnterpriseBeans(); + EnterpriseBean bean; + for (int i = 0; i < beans.size(); i++) { + bean = (EnterpriseBean) beans.get(i); + if (ejbName.equals(bean.getName())) + return bean; + } + return null; +} +/** + * Return ALL EnterpriseBean(s) that are referencing @aJavaClass as a + * home, remote, bean class, or key class. + */ +public java.util.List getEnterpriseBeansWithReference(JavaClass aJavaClass) { + List beans = getEnterpriseBeans(); + List result = new ArrayList(); + EnterpriseBean bean = null; + for (int i = 0; i < beans.size(); i++){ + bean = (EnterpriseBean) beans.get(i); + if (bean.hasJavaReference(aJavaClass)) + result.add(bean); + } + return result; +} +/** + * Return the *FIRST* EnterpriseBean that is referencing @aJavaClass as its + * home, remote, bean class, or key class. + */ +public EnterpriseBean getEnterpriseBeanWithReference(JavaClass aJavaClass) { + List beans = getEnterpriseBeans(); + EnterpriseBean bean = null; + for (int i = 0; i < beans.size(); i++){ + bean = (EnterpriseBean) beans.get(i); + if (bean.hasJavaReference(aJavaClass)) + return bean; + } + return null; +} +/** + * Return List of Session beans in this jar. + * @return java.util.List + */ +public List getSessionBeans() { + List allBeans, beans; + allBeans = getEnterpriseBeans(); + int size = allBeans.size(); + beans = new ArrayList(size); + EnterpriseBean ejb; + for (int i = 0; i < size; i++) { + ejb = (EnterpriseBean) allBeans.get(i); + if (ejb.isSession()) + beans.add(ejb); + } + return beans; +} +/** + * Return boolean indicating if this EJB JAR was populated from an EJB 1.1 descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion1_1Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + EJBResource ejbRes = (EJBResource) eResource(); + return ejbRes.isEJB1_1(); +} +/** + * Return boolean indicating if this EJB JAR was populated from an EJB 2.0 descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion2_0Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + EJBResource ejbRes = (EJBResource) eResource(); + return ejbRes.isEJB2_0(); +} +/** + * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar + */ +public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { + AssemblyDescriptor ad = getAssemblyDescriptor(); + if (ad != null) + ad.renameSecurityRole(existingRoleName, newRoleName); + List ejbs = getEnterpriseBeans(); + for (int i = 0; i < ejbs.size(); i++) { + EnterpriseBean ejb = (EnterpriseBean) ejbs.get(i); + ejb.reSyncSecurityRoleRef(existingRoleName, newRoleName); + } +} + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * @generated This field/method will be replaced during code generation + * The optional ejb-client-jar element specifies a JAR file that contains the class files necessary for a client program to access the enterprise beans in the ejb-jar file. The Deployer should make the ejb-client JAR file accessible to the client's class-loader. Example:employee_service_client.jar + + */ + public String getEjbClientJar() { + return ejbClientJar; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbClientJar(String newEjbClientJar) { + String oldEjbClientJar = ejbClientJar; + ejbClientJar = newEjbClientJar; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__EJB_CLIENT_JAR, oldEjbClientJar, ejbClientJar)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ + public int getVersionID() throws IllegalStateException { + J2EEVersionResource ejbRes = (J2EEVersionResource) eResource(); + if (ejbRes == null) { + // fix defect 3276, when resource is unloaded + if (version == null) + throw new IllegalStateException(); + if (version.equals("2.1")) //$NON-NLS-1$ + return J2EEVersionConstants.EJB_2_1_ID; + if (version.equals("2.0")) //$NON-NLS-1$ + return J2EEVersionConstants.EJB_2_0_ID; + if (version.equals("1.1")) //$NON-NLS-1$ + return J2EEVersionConstants.EJB_1_1_ID; + if (version.equals("1.0")) //$NON-NLS-1$ + return J2EEVersionConstants.EJB_1_0_ID; + } + return ejbRes.getModuleVersionID(); + } + /** + *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level + */ + public int getJ2EEVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException("XMLResource is null"); + return res.getJ2EEVersionID(); + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public AssemblyDescriptor getAssemblyDescriptor() { + return assemblyDescriptor; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor, NotificationChain msgs) { + AssemblyDescriptor oldAssemblyDescriptor = assemblyDescriptor; + assemblyDescriptor = newAssemblyDescriptor; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, oldAssemblyDescriptor, newAssemblyDescriptor); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { + if (newAssemblyDescriptor != assemblyDescriptor) { + NotificationChain msgs = null; + if (assemblyDescriptor != null) + msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs); + if (newAssemblyDescriptor != null) + msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs); + msgs = basicSetAssemblyDescriptor(newAssemblyDescriptor, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); + } + + /** + * @generated This field/method will be replaced during code generation + * The enterprise-beans element contains the declarations of one or more + * enterprise beans. + */ + public EList getEnterpriseBeans() { + if (enterpriseBeans == null) { + enterpriseBeans = new EObjectContainmentWithInverseEList(EnterpriseBean.class, this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EjbPackage.ENTERPRISE_BEAN__EJB_JAR); + } + return enterpriseBeans; + } + + /** + * @generated This field/method will be replaced during code generation + * The relationships collection describes the relationships in which container managed persistence entity beans and dependent objects participate. The relationships element contains an optional description; a list of ejb-entity-ref elements (references to entity beans that participate in container managed relationships but whose abstract persistence schemas are not included in the ejb-jar file); + * and a list of ejb-relation elements, which specify the container managed relationships. + */ + public Relationships getRelationshipList() { + return relationshipList; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRelationshipList(Relationships newRelationshipList, NotificationChain msgs) { + Relationships oldRelationshipList = relationshipList; + relationshipList = newRelationshipList; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, oldRelationshipList, newRelationshipList); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRelationshipList(Relationships newRelationshipList) { + if (newRelationshipList != relationshipList) { + NotificationChain msgs = null; + if (relationshipList != null) + msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs); + if (newRelationshipList != null) + msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs); + msgs = basicSetRelationshipList(newRelationshipList, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + if (assemblyDescriptor != null) + msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, null, msgs); + return basicSetAssemblyDescriptor((AssemblyDescriptor)otherEnd, msgs); + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + return ((InternalEList)getEnterpriseBeans()).basicAdd(otherEnd, msgs); + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + if (relationshipList != null) + msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__RELATIONSHIP_LIST, null, msgs); + return basicSetRelationshipList((Relationships)otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_JAR__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.EJB_JAR__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.EJB_JAR__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + return basicSetAssemblyDescriptor(null, msgs); + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + return ((InternalEList)getEnterpriseBeans()).basicRemove(otherEnd, msgs); + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + return basicSetRelationshipList(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_JAR__ICONS: + return getIcons(); + case EjbPackage.EJB_JAR__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.EJB_JAR__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.EJB_JAR__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.EJB_JAR__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.EJB_JAR__DESCRIPTION: + return getDescription(); + case EjbPackage.EJB_JAR__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: + return getEjbClientJar(); + case EjbPackage.EJB_JAR__VERSION: + return getVersion(); + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + return getAssemblyDescriptor(); + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + return getEnterpriseBeans(); + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + return getRelationshipList(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_JAR__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.EJB_JAR__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.EJB_JAR__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.EJB_JAR__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.EJB_JAR__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.EJB_JAR__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.EJB_JAR__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: + return EJB_CLIENT_JAR_EDEFAULT == null ? ejbClientJar != null : !EJB_CLIENT_JAR_EDEFAULT.equals(ejbClientJar); + case EjbPackage.EJB_JAR__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + return assemblyDescriptor != null; + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + return enterpriseBeans != null && !enterpriseBeans.isEmpty(); + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + return relationshipList != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_JAR__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.EJB_JAR__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.EJB_JAR__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.EJB_JAR__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.EJB_JAR__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.EJB_JAR__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.EJB_JAR__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: + setEjbClientJar((String)newValue); + return; + case EjbPackage.EJB_JAR__VERSION: + setVersion((String)newValue); + return; + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)newValue); + return; + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + getEnterpriseBeans().clear(); + getEnterpriseBeans().addAll((Collection)newValue); + return; + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + setRelationshipList((Relationships)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_JAR__ICONS: + getIcons().clear(); + return; + case EjbPackage.EJB_JAR__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.EJB_JAR__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.EJB_JAR__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.EJB_JAR__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.EJB_JAR__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.EJB_JAR__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.EJB_JAR__EJB_CLIENT_JAR: + setEjbClientJar(EJB_CLIENT_JAR_EDEFAULT); + return; + case EjbPackage.EJB_JAR__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)null); + return; + case EjbPackage.EJB_JAR__ENTERPRISE_BEANS: + getEnterpriseBeans().clear(); + return; + case EjbPackage.EJB_JAR__RELATIONSHIP_LIST: + setRelationshipList((Relationships)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ejbClientJar: "); //$NON-NLS-1$ + result.append(ejbClientJar); + result.append(", version: "); //$NON-NLS-1$ + result.append(version); + result.append(')'); + return result.toString(); + } + + public EJBRelationshipRole getRelationshipRole(String aRoleName, ContainerManagedEntity sourceCMP) { + if (aRoleName == null || sourceCMP == null) return null; + EJBRelationshipRole role = null; + if (getRelationshipList() != null) { + List relations = getRelationshipList().getEjbRelations(); + int size = relations.size(); + EJBRelation rel = null; + for (int i = 0; i < size; i++) { + rel = (EJBRelation) relations.get(i); + role = rel.getRelationshipRole(aRoleName); + if (role != null && role.getSourceEntity() == sourceCMP) + return role; + } + } + return null; + } + + public EJBRelation getEJBRelation(String aRelationName) { + Relationships relList = getRelationshipList(); + if (relList != null) { + List rels = relList.getEjbRelations(); + int size = rels.size(); + EJBRelation rel = null; + for (int i = 0; i < size; i++) { + rel = (EJBRelation) rels.get(i); + if (rel == null) continue; + if (aRelationName.equals(rel.getName())) + return rel; + } + } + return null; + } + /** + * @see EJBJar#getEJBRelationsForSource(ContainerManagedEntity) + */ + public List getEJBRelationsForSource(ContainerManagedEntity cmp) { + Relationships relList = getRelationshipList(); + List result = null; + if (relList != null) { + List rels = relList.getEjbRelations(); + int size = rels.size(); + EJBRelation rel = null; + for (int i = 0; i < size; i++) { + rel = (EJBRelation) rels.get(i); + if (rel == null) continue; + List roles = rel.getRelationshipRoles(); + EJBRelationshipRole role; + for (int j = 0; j < roles.size(); j++) { + role = (EJBRelationshipRole) roles.get(j); + if (role.getSourceEntity() == cmp) { + if (result == null) + result = new ArrayList(); + result.add(rel); + break; + } + } + } + } + if (result == null) + result = Collections.EMPTY_LIST; + return result; + } + + public List getEJBRelationshipRolesForType(ContainerManagedEntity cmp) { + Relationships relList = getRelationshipList(); + List result = null; + if (relList != null) { + List rels = relList.getEjbRelations(); + int size = rels.size(); + EJBRelation rel = null; + for (int i = 0; i < size; i++) { + rel = (EJBRelation) rels.get(i); + if (rel == null) continue; + List roles = rel.getRelationshipRoles(); + EJBRelationshipRole role; + for (int j = 0; j < roles.size(); j++) { + role = (EJBRelationshipRole) roles.get(j); + if (cmp.equals(((CommonRelationshipRole) role).getTypeEntity())) { + if (result == null) + result = new ArrayList(); + result.add(role); + break; + } + } + } + } + if (result == null) + result = Collections.EMPTY_LIST; + return result; + } + + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarResourceFactory.java new file mode 100644 index 000000000..0abba0d8c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBJarResourceFactory.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 27, 2003 + * + */ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +/** + * @author schacher + */ +public class EJBJarResourceFactory extends TranslatorResourceFactory { + + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_1_1, "ejb-jar_1_1.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_2_0, "ejb-jar_2_0.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJB_JAR_SCHEMA_LOC_2_1, "ejb-jar_2_1.xsd"); //$NON-NLS-1$ + } + + /** + * @param aRendererFactory + */ + public EJBJarResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) + */ + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new EJBResourceImpl(uri, aRenderer); + } + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(aRendererFactory)); + } + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.EJBJAR_DD_URI_OBJ); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBMethodCategoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBMethodCategoryImpl.java new file mode 100644 index 000000000..d964fcfe2 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBMethodCategoryImpl.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; +import org.eclipse.jst.j2ee.ejb.EjbPackage; + +/** + * The valid EJB method category names are: EJBHOMEMETHOD, EJBCREATEMETHOD, EJBFINDERMETHOD, EJBREMOTEMETHOD. + */ +public class EJBMethodCategoryImpl extends EObjectImpl implements EJBMethodCategory, EObject { + + public EJBMethodCategoryImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEJBMethodCategory(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationImpl.java new file mode 100644 index 000000000..7e53c4913 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationImpl.java @@ -0,0 +1,449 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.CommonRelationship; +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.Relationships; + + +/** + * The ejb-relation element describes a relationship between two entity beans with container managed persistence. An ejb-relation element contains a description; an optional ejb-relation-name element; and exactly two relationship role declarations, defined by the ejb-relationship-roles. The name of the relationship, if specified, is unique within the ejb-jar file. + * + * @invariant The name of the relationship, if specified, is unique within the ejb-jar file. + * @invariant self.relationshipRoles.size == 2 + * @invariant self.relationshipRoles[0].name != self.relationshipRoles[1].name + * + * @migration EJB1.1 Moved from ejbext::EjbRelationshipRole contained under ejbext::EJBJarExtension + * @migration EJB1.1 added optional attribute, description:String + * @migration EJB1.1 added optional attribute, name:String (May have been inherited from EObject previously) + */ +public class EJBRelationImpl extends EObjectImpl implements EJBRelation, EObject, CommonRelationship{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList relationshipRoles = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public EJBRelationImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEJBRelation(); + } + +public boolean containsRelationshipRole(EJBRelationshipRole aRole) { + return getRelationshipRoles().contains(aRole); +} +/** + * Return the roles. + */ +public EList getCommonRoles() { + return getRelationshipRoles(); +} +/** + * Return the first role. + */ +public CommonRelationshipRole getFirstCommonRole() { + return getFirstRole(); +} +/** + * Return the first role. + */ +public EJBRelationshipRole getFirstRole() { + List list = getRelationshipRoles(); + if (list.size() == 0) + return null; + return (EJBRelationshipRole) list.get(0); +} +/** + * Return the other role. + */ +public EJBRelationshipRole getOppositeRole(EJBRelationshipRole aRole) { + if (aRole != null) { + if (aRole == getFirstRole()) + return getSecondRole(); + if (aRole == getSecondRole()) + return getFirstRole(); + } + return null; +} +/** + * Return the first role. + */ +public CommonRelationshipRole getSecondCommonRole() { + return getSecondRole(); +} +/** + * Return the second role. + */ +public EJBRelationshipRole getSecondRole() { + List list = getRelationshipRoles(); + if (list.size() < 2) + return null; + return (EJBRelationshipRole) list.get(1); +} +/** + * Set the forward role. Implemented by ensuring that the passed role is the first role + * which is the "tiebreaker" in case of unclear relationships, such as 1:1. + */ +public void setFoward(EJBRelationshipRole aRole) { + + EList roles = getRelationshipRoles(); + int currentIndex = roles.indexOf(aRole); + if (currentIndex != 0) { + if (currentIndex > -1) + roles.move(0, aRole); + else + roles.set(0, aRole); + } +} + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing the ejb relation. + * + * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The name of the relationship. If specified, must be unique within the ejb-jar file. + * @invariant self.name unique within Set + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public Relationships getRelationshipList() { + if (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST) return null; + return (Relationships)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRelationshipList(Relationships newRelationshipList) { + if (newRelationshipList != eContainer || (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST && newRelationshipList != null)) { + if (EcoreUtil.isAncestor(this, newRelationshipList)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newRelationshipList != null) + msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newRelationshipList, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList)); + } + + /** + * @generated This field/method will be replaced during code generation + * A collection containing exactly two relationship roles. + * + * @migration EJB1.1 Containment used to be by reference on relation--now by value. + + */ + public EList getRelationshipRoles() { + if (relationshipRoles == null) { + relationshipRoles = new EObjectContainmentWithInverseEList(EJBRelationshipRole.class, this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP); + } + return relationshipRoles; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATION__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + return ((InternalEList)getRelationshipRoles()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + return eBasicSetContainer(null, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs); + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + return ((InternalEList)getRelationshipRoles()).basicRemove(otherEnd, msgs); + case EjbPackage.EJB_RELATION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + return eContainer.eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATION__DESCRIPTION: + return getDescription(); + case EjbPackage.EJB_RELATION__NAME: + return getName(); + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + return getRelationshipList(); + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + return getRelationshipRoles(); + case EjbPackage.EJB_RELATION__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.EJB_RELATION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + return getRelationshipList() != null; + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + return relationshipRoles != null && !relationshipRoles.isEmpty(); + case EjbPackage.EJB_RELATION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATION__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.EJB_RELATION__NAME: + setName((String)newValue); + return; + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + setRelationshipList((Relationships)newValue); + return; + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + getRelationshipRoles().clear(); + getRelationshipRoles().addAll((Collection)newValue); + return; + case EjbPackage.EJB_RELATION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.EJB_RELATION__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST: + setRelationshipList((Relationships)null); + return; + case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES: + getRelationshipRoles().clear(); + return; + case EjbPackage.EJB_RELATION__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + + public EJBRelationshipRole getRelationshipRole(String aRoleName) { + if (aRoleName == null) return null; + List roles = getRelationshipRoles(); + EJBRelationshipRole role = null; + for (int i = 0; i < roles.size(); i++) { + role = (EJBRelationshipRole) roles.get(i); + if (aRoleName.equals(role.getName())) + return role; + } + return null; + } +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationshipRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationshipRoleImpl.java new file mode 100644 index 000000000..646461377 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBRelationshipRoleImpl.java @@ -0,0 +1,1012 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.lang.reflect.Constructor; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.ecore.xmi.XMIResource; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.CommonRelationship; +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy; +import org.eclipse.jst.j2ee.ejb.MultiplicityKind; +import org.eclipse.jst.j2ee.ejb.RoleSource; +import org.eclipse.wst.common.emf.utilities.IDUtil; + +import com.ibm.wtp.common.logger.proxy.Logger; +/** + * The ejb-relationship-role element describes a role within a relationship. + * There are two roles in each relationship. The ejb-relationship-role element contains an optional description; an optional name for the relationship role; a specification of the multiplicity of the role; an optional specification of cascade-delete functionality for the role; the role source; and a declaration of the cmr-field, if any, by means of which the other side of the relationship is accessed from the perspective of the role source. The multiplicity and relationship-role-source element are mandatory. The relationship-role-source element designates an entity-bean by means of an ejb-name element. For bidirectional relationships, both roles of a relationship must declare a relationship-role-source element that specifies a cmr-field in terms of which the relationship is accessed. The lack of a cmr-field element in an ejb-relationship-role specifies that the relationship is unidirectional in navigability and that entity bean that participates in the relationship is "not aware" of the relationship. + * + * @invariant multiplicity != null + * @invariant roleSource != null + * @invariant Cascade delete can only be specified in an EJBRelationshipRole element in which the roleSource element specifies a dependent object class. + * @invariant Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBRelation in which the other EJBRelationshipRole element specifies a multiplicity of One. + * + * Example: + * + * Product-LineItem + * + * product-has-lineitems + * One + * + * ProductEJB + * + * + * ... + */ +public class EJBRelationshipRoleImpl extends EObjectImpl implements EJBRelationshipRole, EObject, CommonRelationshipRole { + + + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + protected static final EList EMPTY_ELIST = new org.eclipse.emf.common.util.BasicEList(0); + + // Need to cache the computed attributes so that they maintain identity + protected EList fAttributes = null; + protected String fName = null; + protected IRoleShapeStrategy roleShapeStrategy; + private static final String ROLE_STRATEGY_CLASS_NAME = "org.eclipse.jst.j2ee.internal.ejb.impl.EJB20FlattenedRoleShapeStrategy"; //$NON-NLS-1$ + private static final String COMMON_ROLE_CLASS_NAME = "org.eclipse.jst.j2ee.ejb.CommonRelationshipRole"; //$NON-NLS-1$ + private static Class COMMON_ROLE_CLASS; + private static Class ROLE_STRATEGY_CLASS; + private static Constructor ROLE_STRATEGY_CONSTRUCTOR; + private static final String NAME_SUFFIX = "Inverse"; //$NON-NLS-1$ + + private boolean toStringGuard; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getRoleName() Role Name}' attribute. + * + * + * @see #getRoleName() + * @generated + * @ordered + */ + protected static final String ROLE_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String roleName = ROLE_NAME_EDEFAULT; + /** + * The default value of the '{@link #getMultiplicity() Multiplicity}' attribute. + * + * + * @see #getMultiplicity() + * @generated + * @ordered + */ + protected static final MultiplicityKind MULTIPLICITY_EDEFAULT = MultiplicityKind.ONE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected MultiplicityKind multiplicity = MULTIPLICITY_EDEFAULT; + /** + * This is true if the Multiplicity attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean multiplicityESet = false; + + /** + * The default value of the '{@link #isCascadeDelete() Cascade Delete}' attribute. + * + * + * @see #isCascadeDelete() + * @generated + * @ordered + */ + protected static final boolean CASCADE_DELETE_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean cascadeDelete = CASCADE_DELETE_EDEFAULT; + /** + * This is true if the Cascade Delete attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean cascadeDeleteESet = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected RoleSource source = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected CMRField cmrField = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + private boolean wasForward = false; + private boolean wasMany = false; + + private boolean isKeySet = false; + private boolean key = false; + + private transient Boolean required = null; + + public EJBRelationshipRoleImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEJBRelationshipRole(); + } + + /** + * Return the persistentAttributes from my Entity that are used + * by this role. + */ + + public EList getAttributes() { + if (fAttributes == null) { + fAttributes = new BasicEList(1); + } + if (fAttributes.isEmpty()) { + getRoleShapeStrategy().reconcileAttributes(fAttributes); + } + return fAttributes; + } + /** + * Return our parent relationship as a CommonRelationship + */ + + public CommonRelationship getCommonRelationship() { + return getRelationship(); + } + protected IRoleShapeStrategy getDefaultRoleShapeStrategy() { + try { + return (IRoleShapeStrategy) getRoleStrategyConstructor(this).newInstance(new Object[] { this }); + } catch (Throwable t) { + Logger.getLogger().logError("EJBRelationshipRoleImpl:Could not instantiate role shape strategy; this requires extensions"); //$NON-NLS-1$ + Logger.getLogger().logError(t); + return null; + } + + } + + + /** + * @return The logical name which can be used for naming this role. + * Required to be unique within a JAR. + * If a cmr-field is defined, then a name in the form %source-ejb-name%_%cmr-field-name% is computed. + * Otherwise a default ID is generated. + */ + public String getLogicalName() { + String result = null; + String qualifier = getCmrField().getName(); + if (qualifier != null) { + result = getSource().getEntityBean().getName() + "_" + qualifier; //$NON-NLS-1$ + } else { + // Apply a default ID + result = IDUtil.getOrAssignID(this); + } + return result; + } + /** + * @return The name for this role, derived from the CMR-field name + * Used to determine the name used in querying this role as well as the accessor method names which implement it. + * Note: may return the XMI ID for non-navigable roles, ie - where there is no CMR-field. + */ + public String getName() { + if (fName == null) { + if (getCmrField() != null) + fName = getCmrField().getName(); + else if (getOpposite() != null) { + EJBRelationshipRole op = getOpposite(); + if (op.getCmrField() != null) + fName = op.getCmrField().getName() + op.getSourceEntity().getName() + NAME_SUFFIX; + } else { + if (eGetId() == null) + eSetId(); + fName = eGetId(); + } + } + return fName; + } + /** + * Return the other role. + */ + public EJBRelationshipRole getOpposite() { + if (getRelationship() != null) + return getRelationship().getOppositeRole(this); + return null; + } + /** + * Return the other role. + */ + public CommonRelationshipRole getOppositeAsCommonRole() { + return getOpposite(); + } + + /** + * Insert the method's description here. + * Creation date: (11/15/2000 6:50:30 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.IRoleShapeStrategy + */ + public IRoleShapeStrategy getRoleShapeStrategy() { + if (roleShapeStrategy == null) + roleShapeStrategy = getDefaultRoleShapeStrategy(); + return roleShapeStrategy; + } + /** + * @return The Source ejb + * Compute the ContainerManagedEntity which is the source of a role that participates in a relationship. + */ + public ContainerManagedEntity getSourceEntity() { + if(null == getSource()) { + return null; + } + return getSource().getEntityBean(); + } + /** + * @return The computed value of the isForward attribute + * Specifies whether this role should be mapped to a persistent reference, such as a foreign key. + * The current implementation is: + * - if the role is many, it cannot be forward + * - if the role is single and not navigable, it cannot be forward + * - all other things being equal, the first role is considered to be forward + * - clients can manipulate this by setting an ambiguous role to be fwd (by manipulating the role order under the covers). + */ + public boolean isForward() { + if (this.isMany()) + return false; + if (getOppositeAsCommonRole() == null) + return wasForward; + if (getOppositeAsCommonRole().isMany()) + return true; + // if (!this.isNavigable()) removed to allow non-navigable role in key + // return false; + if (getRelationship() == null) + return wasForward; + return (getRelationship().getFirstRole() == this); + } + /** + * @return The computed value isKey + */ + public boolean isKey() { + if (isKeySet) + return key; + return isKeyFromAttributes(); + } + + protected boolean isKeyFromAttributes() { + List list = getAttributes(); + if (list.isEmpty()) + return false; + Iterator it = list.iterator(); + CMPAttribute attribute; + while (it.hasNext()) { + attribute = (CMPAttribute) it.next(); + if (!attribute.isKey()) + return false; + } + return true; + } + + /** + * This allows you to set the Role as being key so it will + * not traverse it attributes to determine if it is key. + */ + public void setKey(boolean aBoolean) { + key = aBoolean; + isKeySet = true; + } + + /** + * Handwritten version of isMany(): + */ + + + public boolean isMany() { + if (getOpposite() == null) + return wasMany; + return getOpposite().getMultiplicity() == MultiplicityKind.MANY_LITERAL; + } + + + + /** + * @return The computed value of the isNavigable attribute + * Specifies that accessors should be generated for this relationship role. + * Current implementation is to test whether or not a CMR field exists. + */ + public boolean isNavigable() { + return getCmrField() != null; + } + + + public void reconcileAttributes() { + if (fAttributes != null) + getRoleShapeStrategy().reconcileAttributes(fAttributes); + } + + + /** + * Set this role to be the forward role. + */ + public void setFoward() { + getRelationship().setFoward(this); + } + public void setName(java.lang.String uniqueName) { + fName = uniqueName; + } + public String toString() { + if (toStringGuard) return super.toString(); + try { + toStringGuard = true; + String oppositeType = getOpposite() != null ? getTypeEntity().getName() : "<>"; //$NON-NLS-1$ + return getName() + "(" + oppositeType + ")" + (isMany() ? " *" : " 1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } catch (Exception e) { + return e.toString(); + } finally { + toStringGuard = false; + } + } + + private static Class getCommonRoleClass(Object caller) throws ClassNotFoundException { + + if (COMMON_ROLE_CLASS == null) { + COMMON_ROLE_CLASS = loadClass(COMMON_ROLE_CLASS_NAME, caller); + } + return COMMON_ROLE_CLASS; + } + + private static Class loadClass(String name, Object caller) throws ClassNotFoundException { + ClassLoader cl = caller.getClass().getClassLoader(); + if (cl != null) + return cl.loadClass(name); + return Class.forName(name); + } + + private static Class getRoleStrategyClass(Object caller) throws ClassNotFoundException { + if (ROLE_STRATEGY_CLASS == null) + ROLE_STRATEGY_CLASS = loadClass(ROLE_STRATEGY_CLASS_NAME, caller); + return ROLE_STRATEGY_CLASS; + } + + private static Constructor getRoleStrategyConstructor(Object caller) throws ClassNotFoundException, NoSuchMethodException { + if (ROLE_STRATEGY_CONSTRUCTOR == null) { + Class[] parmTypes = new Class[] { getCommonRoleClass(caller)}; + ROLE_STRATEGY_CONSTRUCTOR = getRoleStrategyClass(caller).getConstructor(parmTypes); + } + return ROLE_STRATEGY_CONSTRUCTOR; + } + + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing + * the ejb relationship role. + * + * The description should include any information that the ejb-jar file producer + * wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). + * Typically, the tools used by the ejb-jar file consumer will display the + * description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * Defines a name for a role that is unique within an ejb-relation. Different + * relationships can use the same name for a role. + + */ + public String getRoleName() { + return roleName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRoleName(String newRoleName) { + String oldRoleName = roleName; + roleName = newRoleName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME, oldRoleName, roleName)); + } + + /** + * + * + * @generated + */ + public MultiplicityKind getMultiplicity() { + return multiplicity; + } + + /** + * + * + * @generated + */ + public void setMultiplicity(MultiplicityKind newMultiplicity) { + MultiplicityKind oldMultiplicity = multiplicity; + multiplicity = newMultiplicity == null ? MULTIPLICITY_EDEFAULT : newMultiplicity; + boolean oldMultiplicityESet = multiplicityESet; + multiplicityESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, multiplicity, !oldMultiplicityESet)); + } + + /** + * + * + * @generated + */ + public void unsetMultiplicity() { + MultiplicityKind oldMultiplicity = multiplicity; + boolean oldMultiplicityESet = multiplicityESet; + multiplicity = MULTIPLICITY_EDEFAULT; + multiplicityESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, MULTIPLICITY_EDEFAULT, oldMultiplicityESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetMultiplicity() { + return multiplicityESet; + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies that, within a particular relationship, the lifetime of one or more + * entity beans is dependent upon the lifetime of another entity bean. The + * cascade-delete element can Cascade delete can only be specified for an + * EJBRelationshipRole contained in an EJBrelation in which the other + * EJBRelationshipRole element specifies a multiplicity of One. + * + * + + */ + public boolean isCascadeDelete() { + return cascadeDelete; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setCascadeDelete(boolean newCascadeDelete) { + boolean oldCascadeDelete = cascadeDelete; + cascadeDelete = newCascadeDelete; + boolean oldCascadeDeleteESet = cascadeDeleteESet; + cascadeDeleteESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, cascadeDelete, !oldCascadeDeleteESet)); + } + + /** + * + * + * @generated + */ + public void unsetCascadeDelete() { + boolean oldCascadeDelete = cascadeDelete; + boolean oldCascadeDeleteESet = cascadeDeleteESet; + cascadeDelete = CASCADE_DELETE_EDEFAULT; + cascadeDeleteESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, CASCADE_DELETE_EDEFAULT, oldCascadeDeleteESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetCascadeDelete() { + return cascadeDeleteESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EJBRelation getRelationship() { + if (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP) return null; + return (EJBRelation)eContainer; + } + + /** + * This field/method will be replaced during code generation. + */ + public void setRelationship(EJBRelation newContainer) { + if (newContainer == null && getRelationship() != null) { + updateCachedSettings(); + EJBRelationshipRoleImpl roleOpposite = (EJBRelationshipRoleImpl) getOpposite(); + if (roleOpposite != null) + roleOpposite.updateCachedSettings(); + } else + wasForward = false; + setRelationshipGen(newContainer); + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#getTargetAttributeName(org.eclipse.jst.j2ee.internal.ejb.CMPAttribute) + */ + public String getTargetAttributeName(CMPAttribute roleAttribute) { + int roleNameSize = getName().length(); + return roleAttribute.getName().substring(roleNameSize + 1); + } + /** + * Method updateCachedSettings. + */ + protected void updateCachedSettings() { + wasForward = isForward(); + wasMany = isMany(); + } + + /** + * @generated This field/method will be replaced during code generation + * Designates the source of a role that participates in a relationship. A + * relationship-role-source element uniquely identifies an entity bean. + * @migration EJB1.1: was ibmejbext::EjbRelationshipRole::sourceEJBName, but that + * may not be sufficient, as this can now refer to dependent class names or ejb + * refs + */ + public RoleSource getSource() { + return source; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(RoleSource newSource, NotificationChain msgs) { + RoleSource oldSource = source; + source = newSource; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, oldSource, newSource); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSource(RoleSource newSource) { + if (newSource != source) { + NotificationChain msgs = null; + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, newSource, newSource)); + } + + /** + * @generated This field/method will be replaced during code generation + * A declaration of the CMRField, if any, by means of which the other side of the + * relationship is accessed from the perspective of the role source + * + * @migration EJB1.1: Used to be handled via ibmejbext::EjbRole::attributes list + */ + public CMRField getCmrField() { + return cmrField; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCmrField(CMRField newCmrField, NotificationChain msgs) { + CMRField oldCmrField = cmrField; + cmrField = newCmrField; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, oldCmrField, newCmrField); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setCmrField(CMRField newCmrField) { + if (newCmrField != cmrField) { + NotificationChain msgs = null; + if (cmrField != null) + msgs = ((InternalEObject)cmrField).eInverseRemove(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs); + if (newCmrField != null) + msgs = ((InternalEObject)newCmrField).eInverseAdd(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs); + msgs = basicSetCmrField(newCmrField, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, newCmrField, newCmrField)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + if (source != null) + msgs = ((InternalEObject)source).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, null, msgs); + return basicSetSource((RoleSource)otherEnd, msgs); + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + if (cmrField != null) + msgs = ((InternalEObject)cmrField).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, null, msgs); + return basicSetCmrField((CMRField)otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + return eBasicSetContainer(null, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + return basicSetSource(null, msgs); + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + return basicSetCmrField(null, msgs); + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: + return getDescription(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: + return getRoleName(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: + return getMultiplicity(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: + return isCascadeDelete() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + return getRelationship(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + return getSource(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + return getCmrField(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: + return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); + case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: + return isSetMultiplicity(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: + return isSetCascadeDelete(); + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + return getRelationship() != null; + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + return source != null; + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + return cmrField != null; + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: + setRoleName((String)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: + setMultiplicity((MultiplicityKind)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: + setCascadeDelete(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + setRelationship((EJBRelation)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + setSource((RoleSource)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + setCmrField((CMRField)newValue); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME: + setRoleName(ROLE_NAME_EDEFAULT); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY: + unsetMultiplicity(); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE: + unsetCascadeDelete(); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP: + setRelationship((EJBRelation)null); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE: + setSource((RoleSource)null); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD: + setCmrField((CMRField)null); + return; + case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toStringGen() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", roleName: "); //$NON-NLS-1$ + result.append(roleName); + result.append(", multiplicity: "); //$NON-NLS-1$ + if (multiplicityESet) result.append(multiplicity); else result.append(""); //$NON-NLS-1$ + result.append(", cascadeDelete: "); //$NON-NLS-1$ + if (cascadeDeleteESet) result.append(cascadeDelete); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + + /* + * @see CommonRelationshipRole#getTypeEntity() + */ + public ContainerManagedEntity getTypeEntity() { + if (getOpposite() != null) + return getOpposite().getSourceEntity(); + return null; + } + + /** + * @see CommonRelationshipRole#isRequired() + */ + public boolean isRequired() { + if (required!=null) + return required.booleanValue(); + return isKey(); + } + + /** + * Set the isRequired flag for bottom up + */ + public void setRequired(Boolean isRequired) { + required = isRequired; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRelationshipGen(EJBRelation newRelationship) { + if (newRelationship != eContainer || (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP && newRelationship != null)) { + if (EcoreUtil.isAncestor(this, newRelationship)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newRelationship != null) + msgs = ((InternalEObject)newRelationship).eInverseAdd(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newRelationship, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, newRelationship, newRelationship)); + } + + /** + * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setLower(int) + */ + public void setLower(int lowerBound) { + // Do nothing... Only upperbound is relevant here + } + + /** + * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setUpper(int) + */ + public void setUpper(int upperBound) { + switch (upperBound) { + case MultiplicityKind.ONE : + setMultiplicity(MultiplicityKind.ONE_LITERAL); + break; + default : + setMultiplicity(MultiplicityKind.MANY_LITERAL); + break; + } + } + + /** + Gets the MOF XMI ref id for this object. + */ + private String eGetId() { + XMIResource res = (XMIResource)eResource(); + if (res == null) + return null; + return res.getID(this); + } + + + /** + * Set and return The id of this element + */ + private String eSetId() { + + + IDUtil.getOrAssignID(this); + + return eGetId(); + } + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBResourceImpl.java new file mode 100644 index 000000000..9474fcd8e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EJBResourceImpl.java @@ -0,0 +1,211 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 27, 2003 + * + */ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.ejb.EJBJarTranslator; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + +/** + * @author schacher + */ +public class EJBResourceImpl extends XMLResourceImpl implements EJBResource { + + /** + * @param uri + * @param aRenderer + */ + public EJBResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + /** + * @param aRenderer + */ + public EJBResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /* + * @see EJBResource#isEJB1_1() + * @deprecated - use getModuleVersionID() and J2EEVersionConstants + */ + public boolean isEJB1_1() { + return getModuleVersionID() == EJB_1_1_ID; + } + + /* + * @see EJBResource#isEJB2_0() + * @deprecated - use getModuleVersionID() and J2EEVersionConstants + */ + public boolean isEJB2_0() { + return getModuleVersionID() == EJB_2_0_ID; + } + + + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResource#getType() + */ + public int getType() { + return XMLResource.EJB_TYPE; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() + */ + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.EJBJAR_DOCTYPE; + default : + return null; + } + + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.EJBJAR_PUBLICID_1_1; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.EJBJAR_SYSTEMID_1_1; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.EJBJAR_PUBLICID_2_0; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.EJBJAR_SYSTEMID_2_0; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return EJBJarTranslator.INSTANCE; + } + + /* Return J2EE version based on module version + */ + public int getJ2EEVersionID() { + switch (getModuleVersionID()) { + case J2EEVersionConstants.EJB_1_0_ID : + return J2EEVersionConstants.J2EE_1_2_ID; + case J2EEVersionConstants.EJB_1_1_ID : + return J2EEVersionConstants.J2EE_1_2_ID; + case J2EEVersionConstants.EJB_2_0_ID : + return J2EEVersionConstants.J2EE_1_3_ID; + case J2EEVersionConstants.EJB_2_1_ID : + return J2EEVersionConstants.J2EE_1_4_ID; + default : + return J2EEVersionConstants.J2EE_1_4_ID; + } + } + + /** + * Return the first element in the EList. + */ + public EJBJar getEJBJar() { + return (EJBJar) getRootObject(); + } + + public void setBatchMode(boolean isBatch) { + renderer.setBatchMode(isBatch); + + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (EJB_2_1_ID) : + super.setDoctypeValues(null, null); + break; + case (EJB_2_0_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (EJB_1_1_ID) : + super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + break; + case (EJB_1_0_ID) : + super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version + */ + public void setJ2EEVersionID(int id) { + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + primSetVersionID(EJB_2_1_ID); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + primSetVersionID(EJB_2_0_ID); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + primSetVersionID(EJB_1_1_ID); + } + syncVersionOfRootObject(); + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return EJB_2_1_ID; + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + EJBJar ejbJar = getEJBJar(); + if (ejbJar == null) + return; + + String version = ejbJar.getVersion(); + String newVersion = getModuleVersionString(); + if (!newVersion.equals(version)) + ejbJar.setVersion(newVersion); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbFactoryImpl.java new file mode 100644 index 000000000..94f680805 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbFactoryImpl.java @@ -0,0 +1,503 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaParameter; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.DestinationType; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbFactory; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.ejb.MultiplicityKind; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.Relationships; +import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; +import org.eclipse.jst.j2ee.ejb.RoleSource; +import org.eclipse.jst.j2ee.ejb.Session; +import org.eclipse.jst.j2ee.ejb.SessionType; +import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; +import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; +import org.eclipse.jst.j2ee.ejb.TransactionType; +import org.eclipse.jst.j2ee.internal.ejb.util.CMPKeySynchronizationAdapter; +import org.eclipse.wst.common.emf.utilities.AdapterFactoryDescriptor; +import org.eclipse.wst.common.emf.utilities.AdapterFactoryUtil; +import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; + + + +/** + * @generated + */ +public class EjbFactoryImpl extends EFactoryImpl implements EjbFactory{ + private static List CMP_ADAPTER_FACTORIES = new ArrayList(1); + private static List CMP_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); + private static List EJB_RELATION_ADAPTER_FACTORIES = new ArrayList(1); + private static List EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); + private static List RELATIONSHIPS_ADAPTER_FACTORIES = new ArrayList(1); + private static List RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1); + public static final String MM_VERSION = "1.1"; //$NON-NLS-1$ + private boolean createdAdapterFactories = false; + + public EjbFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case EjbPackage.CONTAINER_MANAGED_ENTITY: return createContainerManagedEntity(); + case EjbPackage.METHOD_PERMISSION: return createMethodPermission(); + case EjbPackage.ASSEMBLY_DESCRIPTOR: return createAssemblyDescriptor(); + case EjbPackage.METHOD_TRANSACTION: return createMethodTransaction(); + case EjbPackage.SESSION: return createSession(); + case EjbPackage.ENTITY: return createEntity(); + case EjbPackage.EJB_METHOD_CATEGORY: return createEJBMethodCategory(); + case EjbPackage.EJB_JAR: return createEJBJar(); + case EjbPackage.METHOD_ELEMENT: return createMethodElement(); + case EjbPackage.CMP_ATTRIBUTE: return createCMPAttribute(); + case EjbPackage.RELATIONSHIPS: return createRelationships(); + case EjbPackage.QUERY: return createQuery(); + case EjbPackage.EJB_RELATION: return createEJBRelation(); + case EjbPackage.EJB_RELATIONSHIP_ROLE: return createEJBRelationshipRole(); + case EjbPackage.ROLE_SOURCE: return createRoleSource(); + case EjbPackage.CMR_FIELD: return createCMRField(); + case EjbPackage.MESSAGE_DRIVEN: return createMessageDriven(); + case EjbPackage.MESSAGE_DRIVEN_DESTINATION: return createMessageDrivenDestination(); + case EjbPackage.EXCLUDE_LIST: return createExcludeList(); + case EjbPackage.QUERY_METHOD: return createQueryMethod(); + case EjbPackage.ACTIVATION_CONFIG_PROPERTY: return createActivationConfigProperty(); + case EjbPackage.ACTIVATION_CONFIG: return createActivationConfig(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE: + return TransactionAttributeType.get(initialValue); + case EjbPackage.TRANSACTION_TYPE: + return TransactionType.get(initialValue); + case EjbPackage.SESSION_TYPE: + return SessionType.get(initialValue); + case EjbPackage.METHOD_ELEMENT_KIND: + return MethodElementKind.get(initialValue); + case EjbPackage.ACKNOWLEDGE_MODE: + return AcknowledgeMode.get(initialValue); + case EjbPackage.SUBSCRIPTION_DURABILITY_KIND: + return SubscriptionDurabilityKind.get(initialValue); + case EjbPackage.RETURN_TYPE_MAPPING: + return ReturnTypeMapping.get(initialValue); + case EjbPackage.DESTINATION_TYPE: + return DestinationType.get(initialValue); + case EjbPackage.MULTIPLICITY_KIND: + return MultiplicityKind.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.TRANSACTION_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.SESSION_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.METHOD_ELEMENT_KIND: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.ACKNOWLEDGE_MODE: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.SUBSCRIPTION_DURABILITY_KIND: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.RETURN_TYPE_MAPPING: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.DESTINATION_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case EjbPackage.MULTIPLICITY_KIND: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + +public MethodElement createMethodElement(String aSignature) { + MethodElement me = createMethodElement(); + me.initializeFromSignature(aSignature); + return me; +} +/** + * Helper method to create a MethodElement from a java method. Defaults the type to "Unspecified". + */ +public MethodElement createMethodElementFrom( + Method method) { + + MethodElement element = createMethodElement(); + element.setName(method.getName()); + element.setType(MethodElementKind.UNSPECIFIED_LITERAL); + + JavaParameter[] params = + method.listParametersWithoutReturn(); + if (params.length == 0) + element.applyZeroParams(); + else { + for (int i = 0; i < params.length; i++) { + JavaHelpers helper = (JavaHelpers) params[i].getEType(); + element.addMethodParams(helper.getQualifiedName()); + } + } + return element; +} +/** + * Helper method to reflect the method and create a MethodElement. If the parameter is null, creates an element + * with a name of "*". Defaults the type to "Unspecified". + */ +public MethodElement createMethodElementFrom(java.lang.reflect.Method method) { + + String methodName = method == null ? "*" : method.getName(); //$NON-NLS-1$ + MethodElement me = createMethodElement(); + me.setName(methodName); + me.setType(MethodElementKind.UNSPECIFIED_LITERAL); + if (method != null) { + Class[] types = method.getParameterTypes(); + for (int i = 0; i < types.length; i++) { + me.addMethodParams(getTypeName(types[i])); + } + } + return me; +} +public static EjbFactory getActiveFactory() { + return (EjbFactory) getPackage().getEFactoryInstance(); +} +/* + * Utility routine to paper over array type names + * Borrowed from a package-visibility helper on java.lang.reflect.Field + */ +static String getTypeName(Class type) { + if (type.isArray()) { + try { + Class cl = type; + int dimensions = 0; + while (cl.isArray()) { + dimensions++; + cl = cl.getComponentType(); + } + StringBuffer sb = new StringBuffer(); + sb.append(cl.getName()); + for (int i = 0; i < dimensions; i++) { + sb.append("[]");//$NON-NLS-1$ + } + return sb.toString(); + } catch (Throwable e) { /*FALLTHRU*/ + } + } + return type.getName(); +} + + + /** + * @generated This field/method will be replaced during code generation. + */ + public MethodPermission createMethodPermission() { + MethodPermissionImpl methodPermission = new MethodPermissionImpl(); + return methodPermission; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public AssemblyDescriptor createAssemblyDescriptor() { + AssemblyDescriptorImpl assemblyDescriptor = new AssemblyDescriptorImpl(); + return assemblyDescriptor; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public MethodTransaction createMethodTransaction() { + MethodTransactionImpl methodTransaction = new MethodTransactionImpl(); + return methodTransaction; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Entity createEntity() { + EntityImpl entity = new EntityImpl(); + return entity; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ContainerManagedEntity createContainerManagedEntityGen() { + ContainerManagedEntityImpl containerManagedEntity = new ContainerManagedEntityImpl(); + return containerManagedEntity; + } + + public ContainerManagedEntity createContainerManagedEntity() { + ContainerManagedEntity cmp = createContainerManagedEntityGen(); + adaptNew(cmp, CMP_ADAPTER_FACTORIES); + addKeySynchronizationAdapter(cmp); + return cmp; + } + + /** + * @param cmp + */ + private void addKeySynchronizationAdapter(ContainerManagedEntity cmp) { + CMPKeySynchronizationAdapter cmpAdapter = new CMPKeySynchronizationAdapter(cmp); + Adapter loadingAdapter = ExtendedEcoreUtil.createAdapterForLoading(cmpAdapter,cmp); + cmp.eAdapters().add(loadingAdapter); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public CMPAttribute createCMPAttribute() { + CMPAttributeImpl cmpAttribute = new CMPAttributeImpl(); + return cmpAttribute; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public CMRField createCMRField() { + CMRFieldImpl cmrField = new CMRFieldImpl(); + return cmrField; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EJBRelationshipRole createEJBRelationshipRole() { + EJBRelationshipRoleImpl ejbRelationshipRole = new EJBRelationshipRoleImpl(); + return ejbRelationshipRole; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EJBRelation createEJBRelationGen() { + EJBRelationImpl ejbRelation = new EJBRelationImpl(); + return ejbRelation; + } + + public EJBRelation createEJBRelation() { + EJBRelation rel = createEJBRelationGen(); + adaptNew(rel, EJB_RELATION_ADAPTER_FACTORIES); + return rel; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Relationships createRelationshipsGen() { + RelationshipsImpl relationships = new RelationshipsImpl(); + return relationships; + } + + public Relationships createRelationships() { + Relationships rel = createRelationshipsGen(); + adaptNew(rel, RELATIONSHIPS_ADAPTER_FACTORIES); + return rel; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public EJBJar createEJBJar() { + EJBJarImpl ejbJar = new EJBJarImpl(); + return ejbJar; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public RoleSource createRoleSource() { + RoleSourceImpl roleSource = new RoleSourceImpl(); + return roleSource; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Query createQuery() { + QueryImpl query = new QueryImpl(); + return query; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public QueryMethod createQueryMethod() { + QueryMethodImpl queryMethod = new QueryMethodImpl(); + return queryMethod; + } + + /** + * + * + * @generated + */ + public ActivationConfigProperty createActivationConfigProperty() { + ActivationConfigPropertyImpl activationConfigProperty = new ActivationConfigPropertyImpl(); + return activationConfigProperty; + } + + /** + * + * + * @generated + */ + public ActivationConfig createActivationConfig() { + ActivationConfigImpl activationConfig = new ActivationConfigImpl(); + return activationConfig; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public MethodElement createMethodElement() { + MethodElementImpl methodElement = new MethodElementImpl(); + return methodElement; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ExcludeList createExcludeList() { + ExcludeListImpl excludeList = new ExcludeListImpl(); + return excludeList; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Session createSession() { + SessionImpl session = new SessionImpl(); + return session; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public MessageDriven createMessageDriven() { + MessageDrivenImpl messageDriven = new MessageDrivenImpl(); + return messageDriven; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public MessageDrivenDestination createMessageDrivenDestination() { + MessageDrivenDestinationImpl messageDrivenDestination = new MessageDrivenDestinationImpl(); + return messageDrivenDestination; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EJBMethodCategory createEJBMethodCategory() { + EJBMethodCategoryImpl ejbMethodCategory = new EJBMethodCategoryImpl(); + return ejbMethodCategory; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EjbPackage getEjbPackage() { + return (EjbPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static EjbPackage getPackage() { + return EjbPackage.eINSTANCE; + } + public static void internalRegisterCMPAdapterFactory(AdapterFactoryDescriptor config) { + CMP_ADAPTER_FACTORY_DESCRIPTORS.add(config); + + } + public static void internalRegisterEJBRelationAdapterFactory(AdapterFactoryDescriptor config) { + EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS.add(config); + } + public static void internalRegisterRelationshipsAdapterFactory(AdapterFactoryDescriptor config) { + RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS.add(config); + } + + + private void createAdapterFactories() { + createdAdapterFactories = true; + AdapterFactoryUtil.createAdapterFactories(CMP_ADAPTER_FACTORY_DESCRIPTORS, CMP_ADAPTER_FACTORIES); + AdapterFactoryUtil.createAdapterFactories(EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS, EJB_RELATION_ADAPTER_FACTORIES); + AdapterFactoryUtil.createAdapterFactories(RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS, RELATIONSHIPS_ADAPTER_FACTORIES); + } + + private void adaptNew(Notifier notifier, List factories) { + if (!createdAdapterFactories) + createAdapterFactories(); + AdapterFactoryUtil.adaptNew(notifier, factories); + } + +} + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbPackageImpl.java new file mode 100644 index 000000000..ae11f03ac --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EjbPackageImpl.java @@ -0,0 +1,1772 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.DestinationType; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbFactory; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.ejb.MultiplicityKind; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.Relationships; +import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; +import org.eclipse.jst.j2ee.ejb.RoleSource; +import org.eclipse.jst.j2ee.ejb.Session; +import org.eclipse.jst.j2ee.ejb.SessionType; +import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; +import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; +import org.eclipse.jst.j2ee.ejb.TransactionType; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class EjbPackageImpl extends EPackageImpl implements EjbPackage, EPackage { + /** + * + * + * @generated + */ + private EClass containerManagedEntityEClass = null; + + /** + * + * + * @generated + */ + private EClass methodPermissionEClass = null; + + /** + * + * + * @generated + */ + private EClass assemblyDescriptorEClass = null; + + /** + * + * + * @generated + */ + private EClass methodTransactionEClass = null; + + /** + * + * + * @generated + */ + private EClass sessionEClass = null; + + /** + * + * + * @generated + */ + private EClass entityEClass = null; + + /** + * + * + * @generated + */ + private EClass enterpriseBeanEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbMethodCategoryEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbJarEClass = null; + + /** + * + * + * @generated + */ + private EClass methodElementEClass = null; + + /** + * + * + * @generated + */ + private EClass cmpAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass relationshipsEClass = null; + + /** + * + * + * @generated + */ + private EClass queryEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbRelationEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbRelationshipRoleEClass = null; + + /** + * + * + * @generated + */ + private EClass roleSourceEClass = null; + + /** + * + * + * @generated + */ + private EClass cmrFieldEClass = null; + + /** + * + * + * @generated + */ + private EClass messageDrivenEClass = null; + + /** + * + * + * @generated + */ + private EClass messageDrivenDestinationEClass = null; + + /** + * + * + * @generated + */ + private EClass excludeListEClass = null; + + /** + * + * + * @generated + */ + private EClass queryMethodEClass = null; + + /** + * + * + * @generated + */ + private EClass activationConfigPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass activationConfigEClass = null; + + /** + * + * + * @generated + */ + private EEnum transactionAttributeTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum transactionTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum sessionTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum methodElementKindEEnum = null; + + /** + * + * + * @generated + */ + private EEnum acknowledgeModeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum subscriptionDurabilityKindEEnum = null; + + /** + * + * + * @generated + */ + private EEnum returnTypeMappingEEnum = null; + + /** + * + * + * @generated + */ + private EEnum destinationTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum multiplicityKindEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private EjbPackageImpl() { + super(eNS_URI, EjbFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static EjbPackage init() { + if (isInited) return (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); + + // Obtain or create and register package. + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new EjbPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackageImpl.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackageImpl.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackageImpl.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackageImpl.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackageImpl.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackageImpl.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackageImpl.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackageImpl.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackageImpl.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackageImpl.eINSTANCE); + + + // Step 1: create meta-model objects + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + + // Step 2: complete initialization + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + + return theEjbPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMethodPermission() { + return methodPermissionEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodPermission_Description() { + return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodPermission_Unchecked() { + return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodPermission_AssemblyDescriptor() { + return (EReference)methodPermissionEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodPermission_Roles() { + return (EReference)methodPermissionEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodPermission_MethodElements() { + return (EReference)methodPermissionEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getMethodPermission_Descriptions() { + return (EReference)methodPermissionEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getAssemblyDescriptor() { + return assemblyDescriptorEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAssemblyDescriptor_MethodPermissions() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAssemblyDescriptor_MethodTransactions() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAssemblyDescriptor_EjbJar() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAssemblyDescriptor_SecurityRoles() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAssemblyDescriptor_ExcludeList() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getAssemblyDescriptor_MessageDestinations() { + return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMethodTransaction() { + return methodTransactionEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodTransaction_TransactionAttribute() { + return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodTransaction_Description() { + return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodTransaction_AssemblyDescriptor() { + return (EReference)methodTransactionEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodTransaction_MethodElements() { + return (EReference)methodTransactionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getMethodTransaction_Descriptions() { + return (EReference)methodTransactionEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEnterpriseBean() { + return enterpriseBeanEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEnterpriseBean_Name() { + return (EAttribute)enterpriseBeanEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_SecurityRoleRefs() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_EjbClass() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_HomeInterface() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_RemoteInterface() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_EjbJar() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_SecurityIdentity() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_LocalHomeInterface() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEnterpriseBean_LocalInterface() { + return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(8); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEntity() { + return entityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEntity_Reentrant() { + return (EAttribute)entityEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEntity_PrimaryKey() { + return (EReference)entityEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getContainerManagedEntity() { + return containerManagedEntityEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getContainerManagedEntity_Version() { + return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getContainerManagedEntity_AbstractSchemaName() { + return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getContainerManagedEntity_PersistentAttributes() { + return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getContainerManagedEntity_KeyAttributes() { + return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getContainerManagedEntity_Queries() { + return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getContainerManagedEntity_CMPAttribute() { + return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getContainerManagedEntity_PrimKeyField() { + return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getCMPAttribute() { + return cmpAttributeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getCMPAttribute_Description() { + return (EAttribute)cmpAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCMPAttribute_Descriptions() { + return (EReference)cmpAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getCMRField() { + return cmrFieldEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getCMRField_Role() { + return (EReference)cmrFieldEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getCMRField_CollectionType() { + return (EReference)cmrFieldEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEJBRelationshipRole() { + return ejbRelationshipRoleEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelationshipRole_Description() { + return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelationshipRole_RoleName() { + return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelationshipRole_Multiplicity() { + return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelationshipRole_CascadeDelete() { + return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBRelationshipRole_Relationship() { + return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBRelationshipRole_Source() { + return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBRelationshipRole_CmrField() { + return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getEJBRelationshipRole_Descriptions() { + return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEJBRelation() { + return ejbRelationEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelation_Description() { + return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBRelation_Name() { + return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBRelation_RelationshipList() { + return (EReference)ejbRelationEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBRelation_RelationshipRoles() { + return (EReference)ejbRelationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getEJBRelation_Descriptions() { + return (EReference)ejbRelationEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getRelationships() { + return relationshipsEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getRelationships_Description() { + return (EAttribute)relationshipsEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getRelationships_EjbJar() { + return (EReference)relationshipsEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getRelationships_EjbRelations() { + return (EReference)relationshipsEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getRelationships_Descriptions() { + return (EReference)relationshipsEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEJBJar() { + return ejbJarEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getEJBJar_EjbClientJar() { + return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getEJBJar_Version() { + return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBJar_AssemblyDescriptor() { + return (EReference)ejbJarEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBJar_EnterpriseBeans() { + return (EReference)ejbJarEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getEJBJar_RelationshipList() { + return (EReference)ejbJarEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getRoleSource() { + return roleSourceEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getRoleSource_Description() { + return (EAttribute)roleSourceEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getRoleSource_Role() { + return (EReference)roleSourceEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getRoleSource_EntityBean() { + return (EReference)roleSourceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getRoleSource_Descriptions() { + return (EReference)roleSourceEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getQuery() { + return queryEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getQuery_Description() { + return (EAttribute)queryEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getQuery_EjbQL() { + return (EAttribute)queryEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getQuery_ReturnTypeMapping() { + return (EAttribute)queryEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getQuery_QueryMethod() { + return (EReference)queryEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getQuery_Entity() { + return (EReference)queryEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getQuery_Descriptions() { + return (EReference)queryEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getQueryMethod() { + return queryMethodEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getQueryMethod_Query() { + return (EReference)queryMethodEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getActivationConfigProperty() { + return activationConfigPropertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getActivationConfigProperty_Value() { + return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getActivationConfigProperty_Name() { + return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getActivationConfig() { + return activationConfigEClass; + } + + /** + * + * + * @generated + */ + public EReference getActivationConfig_ConfigProperties() { + return (EReference)activationConfigEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getActivationConfig_Descriptions() { + return (EReference)activationConfigEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMethodElement() { + return methodElementEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodElement_Name() { + return (EAttribute)methodElementEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodElement_Parms() { + return (EAttribute)methodElementEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodElement_Type() { + return (EAttribute)methodElementEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMethodElement_Description() { + return (EAttribute)methodElementEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMethodElement_EnterpriseBean() { + return (EReference)methodElementEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getMethodElement_Descriptions() { + return (EReference)methodElementEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getExcludeList() { + return excludeListEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getExcludeList_Description() { + return (EAttribute)excludeListEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getExcludeList_MethodElements() { + return (EReference)excludeListEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getExcludeList_Descriptions() { + return (EReference)excludeListEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSession() { + return sessionEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSession_TransactionType() { + return (EAttribute)sessionEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSession_SessionType() { + return (EAttribute)sessionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSession_ServiceEndpoint() { + return (EReference)sessionEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMessageDriven() { + return messageDrivenEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMessageDriven_TransactionType() { + return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMessageDriven_MessageSelector() { + return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMessageDriven_AcknowledgeMode() { + return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMessageDriven_Destination() { + return (EReference)messageDrivenEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getMessageDriven_ActivationConfig() { + return (EReference)messageDrivenEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getMessageDriven_MessageDestination() { + return (EReference)messageDrivenEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getMessageDriven_Link() { + return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getMessageDriven_MessagingType() { + return (EReference)messageDrivenEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMessageDrivenDestination() { + return messageDrivenDestinationEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMessageDrivenDestination_Type() { + return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMessageDrivenDestination_SubscriptionDurability() { + return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMessageDrivenDestination_Bean() { + return (EReference)messageDrivenDestinationEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getEJBMethodCategory() { + return ejbMethodCategoryEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getTransactionAttributeType() { + return transactionAttributeTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getMultiplicityKind() { + return multiplicityKindEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getReturnTypeMapping() { + return returnTypeMappingEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getMethodElementKind() { + return methodElementKindEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getTransactionType() { + return transactionTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getAcknowledgeMode() { + return acknowledgeModeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getDestinationType() { + return destinationTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getSubscriptionDurabilityKind() { + return subscriptionDurabilityKindEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getSessionType() { + return sessionTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EjbFactory getEjbFactory() { + return (EjbFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + containerManagedEntityEClass = createEClass(CONTAINER_MANAGED_ENTITY); + createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__VERSION); + createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME); + createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES); + createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES); + createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__QUERIES); + createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE); + createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD); + + methodPermissionEClass = createEClass(METHOD_PERMISSION); + createEAttribute(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTION); + createEAttribute(methodPermissionEClass, METHOD_PERMISSION__UNCHECKED); + createEReference(methodPermissionEClass, METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR); + createEReference(methodPermissionEClass, METHOD_PERMISSION__ROLES); + createEReference(methodPermissionEClass, METHOD_PERMISSION__METHOD_ELEMENTS); + createEReference(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTIONS); + + assemblyDescriptorEClass = createEClass(ASSEMBLY_DESCRIPTOR); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EJB_JAR); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__SECURITY_ROLES); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST); + createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS); + + methodTransactionEClass = createEClass(METHOD_TRANSACTION); + createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE); + createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTION); + createEReference(methodTransactionEClass, METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR); + createEReference(methodTransactionEClass, METHOD_TRANSACTION__METHOD_ELEMENTS); + createEReference(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTIONS); + + sessionEClass = createEClass(SESSION); + createEAttribute(sessionEClass, SESSION__TRANSACTION_TYPE); + createEAttribute(sessionEClass, SESSION__SESSION_TYPE); + createEReference(sessionEClass, SESSION__SERVICE_ENDPOINT); + + entityEClass = createEClass(ENTITY); + createEAttribute(entityEClass, ENTITY__REENTRANT); + createEReference(entityEClass, ENTITY__PRIMARY_KEY); + + enterpriseBeanEClass = createEClass(ENTERPRISE_BEAN); + createEAttribute(enterpriseBeanEClass, ENTERPRISE_BEAN__NAME); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_ROLE_REFS); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_CLASS); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__HOME_INTERFACE); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__REMOTE_INTERFACE); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_JAR); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_IDENTITY); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE); + createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_INTERFACE); + + ejbMethodCategoryEClass = createEClass(EJB_METHOD_CATEGORY); + + ejbJarEClass = createEClass(EJB_JAR); + createEAttribute(ejbJarEClass, EJB_JAR__EJB_CLIENT_JAR); + createEAttribute(ejbJarEClass, EJB_JAR__VERSION); + createEReference(ejbJarEClass, EJB_JAR__ASSEMBLY_DESCRIPTOR); + createEReference(ejbJarEClass, EJB_JAR__ENTERPRISE_BEANS); + createEReference(ejbJarEClass, EJB_JAR__RELATIONSHIP_LIST); + + methodElementEClass = createEClass(METHOD_ELEMENT); + createEAttribute(methodElementEClass, METHOD_ELEMENT__NAME); + createEAttribute(methodElementEClass, METHOD_ELEMENT__PARMS); + createEAttribute(methodElementEClass, METHOD_ELEMENT__TYPE); + createEAttribute(methodElementEClass, METHOD_ELEMENT__DESCRIPTION); + createEReference(methodElementEClass, METHOD_ELEMENT__ENTERPRISE_BEAN); + createEReference(methodElementEClass, METHOD_ELEMENT__DESCRIPTIONS); + + cmpAttributeEClass = createEClass(CMP_ATTRIBUTE); + createEAttribute(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTION); + createEReference(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTIONS); + + relationshipsEClass = createEClass(RELATIONSHIPS); + createEAttribute(relationshipsEClass, RELATIONSHIPS__DESCRIPTION); + createEReference(relationshipsEClass, RELATIONSHIPS__EJB_JAR); + createEReference(relationshipsEClass, RELATIONSHIPS__EJB_RELATIONS); + createEReference(relationshipsEClass, RELATIONSHIPS__DESCRIPTIONS); + + queryEClass = createEClass(QUERY); + createEAttribute(queryEClass, QUERY__DESCRIPTION); + createEAttribute(queryEClass, QUERY__EJB_QL); + createEAttribute(queryEClass, QUERY__RETURN_TYPE_MAPPING); + createEReference(queryEClass, QUERY__QUERY_METHOD); + createEReference(queryEClass, QUERY__ENTITY); + createEReference(queryEClass, QUERY__DESCRIPTIONS); + + ejbRelationEClass = createEClass(EJB_RELATION); + createEAttribute(ejbRelationEClass, EJB_RELATION__DESCRIPTION); + createEAttribute(ejbRelationEClass, EJB_RELATION__NAME); + createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_LIST); + createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_ROLES); + createEReference(ejbRelationEClass, EJB_RELATION__DESCRIPTIONS); + + ejbRelationshipRoleEClass = createEClass(EJB_RELATIONSHIP_ROLE); + createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTION); + createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__ROLE_NAME); + createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__MULTIPLICITY); + createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CASCADE_DELETE); + createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__RELATIONSHIP); + createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__SOURCE); + createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CMR_FIELD); + createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTIONS); + + roleSourceEClass = createEClass(ROLE_SOURCE); + createEAttribute(roleSourceEClass, ROLE_SOURCE__DESCRIPTION); + createEReference(roleSourceEClass, ROLE_SOURCE__ROLE); + createEReference(roleSourceEClass, ROLE_SOURCE__ENTITY_BEAN); + createEReference(roleSourceEClass, ROLE_SOURCE__DESCRIPTIONS); + + cmrFieldEClass = createEClass(CMR_FIELD); + createEReference(cmrFieldEClass, CMR_FIELD__ROLE); + createEReference(cmrFieldEClass, CMR_FIELD__COLLECTION_TYPE); + + messageDrivenEClass = createEClass(MESSAGE_DRIVEN); + createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__TRANSACTION_TYPE); + createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_SELECTOR); + createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__ACKNOWLEDGE_MODE); + createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__LINK); + createEReference(messageDrivenEClass, MESSAGE_DRIVEN__DESTINATION); + createEReference(messageDrivenEClass, MESSAGE_DRIVEN__ACTIVATION_CONFIG); + createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_DESTINATION); + createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGING_TYPE); + + messageDrivenDestinationEClass = createEClass(MESSAGE_DRIVEN_DESTINATION); + createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__TYPE); + createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY); + createEReference(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__BEAN); + + excludeListEClass = createEClass(EXCLUDE_LIST); + createEAttribute(excludeListEClass, EXCLUDE_LIST__DESCRIPTION); + createEReference(excludeListEClass, EXCLUDE_LIST__METHOD_ELEMENTS); + createEReference(excludeListEClass, EXCLUDE_LIST__DESCRIPTIONS); + + queryMethodEClass = createEClass(QUERY_METHOD); + createEReference(queryMethodEClass, QUERY_METHOD__QUERY); + + activationConfigPropertyEClass = createEClass(ACTIVATION_CONFIG_PROPERTY); + createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__VALUE); + createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__NAME); + + activationConfigEClass = createEClass(ACTIVATION_CONFIG); + createEReference(activationConfigEClass, ACTIVATION_CONFIG__CONFIG_PROPERTIES); + createEReference(activationConfigEClass, ACTIVATION_CONFIG__DESCRIPTIONS); + + // Create enums + transactionAttributeTypeEEnum = createEEnum(TRANSACTION_ATTRIBUTE_TYPE); + transactionTypeEEnum = createEEnum(TRANSACTION_TYPE); + sessionTypeEEnum = createEEnum(SESSION_TYPE); + methodElementKindEEnum = createEEnum(METHOD_ELEMENT_KIND); + acknowledgeModeEEnum = createEEnum(ACKNOWLEDGE_MODE); + subscriptionDurabilityKindEEnum = createEEnum(SUBSCRIPTION_DURABILITY_KIND); + returnTypeMappingEEnum = createEEnum(RETURN_TYPE_MAPPING); + destinationTypeEEnum = createEEnum(DESTINATION_TYPE); + multiplicityKindEEnum = createEEnum(MULTIPLICITY_KIND); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + EcorePackageImpl theEcorePackage = (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Add supertypes to classes + containerManagedEntityEClass.getESuperTypes().add(this.getEntity()); + sessionEClass.getESuperTypes().add(this.getEnterpriseBean()); + entityEClass.getESuperTypes().add(this.getEnterpriseBean()); + enterpriseBeanEClass.getESuperTypes().add(theCommonPackage.getJNDIEnvRefsGroup()); + ejbJarEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + cmpAttributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute()); + cmrFieldEClass.getESuperTypes().add(this.getCMPAttribute()); + messageDrivenEClass.getESuperTypes().add(this.getEnterpriseBean()); + queryMethodEClass.getESuperTypes().add(this.getMethodElement()); + + // Initialize classes and features; add operations and parameters + initEClass(containerManagedEntityEClass, ContainerManagedEntity.class, "ContainerManagedEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getContainerManagedEntity_Version(), ecorePackage.getEString(), "version", "2.x", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getContainerManagedEntity_AbstractSchemaName(), ecorePackage.getEString(), "abstractSchemaName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getContainerManagedEntity_PersistentAttributes(), this.getCMPAttribute(), null, "persistentAttributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getContainerManagedEntity_KeyAttributes(), this.getCMPAttribute(), null, "keyAttributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getContainerManagedEntity_Queries(), this.getQuery(), this.getQuery_Entity(), "queries", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getContainerManagedEntity_CMPAttribute(), this.getCMPAttribute(), null, "CMPAttribute", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getContainerManagedEntity_PrimKeyField(), this.getCMPAttribute(), null, "primKeyField", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(methodPermissionEClass, MethodPermission.class, "MethodPermission", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMethodPermission_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMethodPermission_Unchecked(), ecorePackage.getEBoolean(), "unchecked", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodPermission_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodPermissions(), "assemblyDescriptor", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodPermission_Roles(), theCommonPackage.getSecurityRole(), null, "roles", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodPermission_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodPermission_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(assemblyDescriptorEClass, AssemblyDescriptor.class, "AssemblyDescriptor", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_MethodPermissions(), this.getMethodPermission(), this.getMethodPermission_AssemblyDescriptor(), "methodPermissions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_MethodTransactions(), this.getMethodTransaction(), this.getMethodTransaction_AssemblyDescriptor(), "methodTransactions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_EjbJar(), this.getEJBJar(), this.getEJBJar_AssemblyDescriptor(), "ejbJar", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_ExcludeList(), this.getExcludeList(), null, "excludeList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getAssemblyDescriptor_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(methodTransactionEClass, MethodTransaction.class, "MethodTransaction", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMethodTransaction_TransactionAttribute(), this.getTransactionAttributeType(), "transactionAttribute", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMethodTransaction_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodTransaction_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodTransactions(), "assemblyDescriptor", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodTransaction_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodTransaction_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(sessionEClass, Session.class, "Session", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getSession_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getSession_SessionType(), this.getSessionType(), "sessionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getSession_ServiceEndpoint(), theJavaRefPackage.getJavaClass(), null, "serviceEndpoint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEntity_Reentrant(), ecorePackage.getEBoolean(), "reentrant", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEntity_PrimaryKey(), theJavaRefPackage.getJavaClass(), null, "primaryKey", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(enterpriseBeanEClass, EnterpriseBean.class, "EnterpriseBean", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEnterpriseBean_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_SecurityRoleRefs(), theCommonPackage.getSecurityRoleRef(), null, "securityRoleRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_EjbClass(), theJavaRefPackage.getJavaClass(), null, "ejbClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_HomeInterface(), theJavaRefPackage.getJavaClass(), null, "homeInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_RemoteInterface(), theJavaRefPackage.getJavaClass(), null, "remoteInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_EjbJar(), this.getEJBJar(), this.getEJBJar_EnterpriseBeans(), "ejbJar", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_SecurityIdentity(), theCommonPackage.getSecurityIdentity(), null, "securityIdentity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_LocalHomeInterface(), theJavaRefPackage.getJavaClass(), null, "localHomeInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEnterpriseBean_LocalInterface(), theJavaRefPackage.getJavaClass(), null, "localInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(ejbMethodCategoryEClass, EJBMethodCategory.class, "EJBMethodCategory", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + + initEClass(ejbJarEClass, EJBJar.class, "EJBJar", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEJBJar_EjbClientJar(), ecorePackage.getEString(), "ejbClientJar", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBJar_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBJar_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_EjbJar(), "assemblyDescriptor", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBJar_EnterpriseBeans(), this.getEnterpriseBean(), this.getEnterpriseBean_EjbJar(), "enterpriseBeans", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBJar_RelationshipList(), this.getRelationships(), this.getRelationships_EjbJar(), "relationshipList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(methodElementEClass, MethodElement.class, "MethodElement", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMethodElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMethodElement_Parms(), ecorePackage.getEString(), "parms", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMethodElement_Type(), this.getMethodElementKind(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMethodElement_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodElement_EnterpriseBean(), this.getEnterpriseBean(), null, "enterpriseBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMethodElement_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(cmpAttributeEClass, CMPAttribute.class, "CMPAttribute", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getCMPAttribute_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getCMPAttribute_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(relationshipsEClass, Relationships.class, "Relationships", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getRelationships_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRelationships_EjbJar(), this.getEJBJar(), this.getEJBJar_RelationshipList(), "ejbJar", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRelationships_EjbRelations(), this.getEJBRelation(), this.getEJBRelation_RelationshipList(), "ejbRelations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRelationships_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(queryEClass, Query.class, "Query", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getQuery_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getQuery_EjbQL(), ecorePackage.getEString(), "ejbQL", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getQuery_ReturnTypeMapping(), this.getReturnTypeMapping(), "returnTypeMapping", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getQuery_QueryMethod(), this.getQueryMethod(), this.getQueryMethod_Query(), "queryMethod", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getQuery_Entity(), this.getContainerManagedEntity(), this.getContainerManagedEntity_Queries(), "entity", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getQuery_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(ejbRelationEClass, EJBRelation.class, "EJBRelation", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEJBRelation_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBRelation_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelation_RelationshipList(), this.getRelationships(), this.getRelationships_EjbRelations(), "relationshipList", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelation_RelationshipRoles(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Relationship(), "relationshipRoles", null, 2, 2, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelation_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(ejbRelationshipRoleEClass, EJBRelationshipRole.class, "EJBRelationshipRole", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getEJBRelationshipRole_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBRelationshipRole_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBRelationshipRole_Multiplicity(), this.getMultiplicityKind(), "multiplicity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getEJBRelationshipRole_CascadeDelete(), ecorePackage.getEBoolean(), "cascadeDelete", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelationshipRole_Relationship(), this.getEJBRelation(), this.getEJBRelation_RelationshipRoles(), "relationship", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelationshipRole_Source(), this.getRoleSource(), this.getRoleSource_Role(), "source", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelationshipRole_CmrField(), this.getCMRField(), this.getCMRField_Role(), "cmrField", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getEJBRelationshipRole_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(roleSourceEClass, RoleSource.class, "RoleSource", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getRoleSource_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRoleSource_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Source(), "role", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRoleSource_EntityBean(), this.getContainerManagedEntity(), null, "entityBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getRoleSource_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(cmrFieldEClass, CMRField.class, "CMRField", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getCMRField_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_CmrField(), "role", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getCMRField_CollectionType(), theJavaRefPackage.getJavaClass(), null, "collectionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(messageDrivenEClass, MessageDriven.class, "MessageDriven", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMessageDriven_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDriven_MessageSelector(), ecorePackage.getEString(), "messageSelector", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDriven_AcknowledgeMode(), this.getAcknowledgeMode(), "acknowledgeMode", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDriven_Link(), ecorePackage.getEString(), "link", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDriven_Destination(), this.getMessageDrivenDestination(), this.getMessageDrivenDestination_Bean(), "destination", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDriven_ActivationConfig(), this.getActivationConfig(), null, "activationConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDriven_MessageDestination(), theJavaRefPackage.getJavaClass(), null, "messageDestination", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDriven_MessagingType(), theJavaRefPackage.getJavaClass(), null, "messagingType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(messageDrivenDestinationEClass, MessageDrivenDestination.class, "MessageDrivenDestination", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getMessageDrivenDestination_Type(), this.getDestinationType(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getMessageDrivenDestination_SubscriptionDurability(), this.getSubscriptionDurabilityKind(), "subscriptionDurability", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getMessageDrivenDestination_Bean(), this.getMessageDriven(), this.getMessageDriven_Destination(), "bean", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(excludeListEClass, ExcludeList.class, "ExcludeList", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getExcludeList_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getExcludeList_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getExcludeList_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(queryMethodEClass, QueryMethod.class, "QueryMethod", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getQueryMethod_Query(), this.getQuery(), this.getQuery_QueryMethod(), "query", null, 1, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(activationConfigPropertyEClass, ActivationConfigProperty.class, "ActivationConfigProperty", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEAttribute(getActivationConfigProperty_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getActivationConfigProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + initEClass(activationConfigEClass, ActivationConfig.class, "ActivationConfig", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ + initEReference(getActivationConfig_ConfigProperties(), this.getActivationConfigProperty(), null, "configProperties", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getActivationConfig_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(transactionAttributeTypeEEnum, TransactionAttributeType.class, "TransactionAttributeType"); //$NON-NLS-1$ + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NOT_SUPPORTED_LITERAL); + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.SUPPORTS_LITERAL); + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRED_LITERAL); + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRES_NEW_LITERAL); + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.MANDATORY_LITERAL); + addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NEVER_LITERAL); + + initEEnum(transactionTypeEEnum, TransactionType.class, "TransactionType"); //$NON-NLS-1$ + addEEnumLiteral(transactionTypeEEnum, TransactionType.BEAN_LITERAL); + addEEnumLiteral(transactionTypeEEnum, TransactionType.CONTAINER_LITERAL); + + initEEnum(sessionTypeEEnum, SessionType.class, "SessionType"); //$NON-NLS-1$ + addEEnumLiteral(sessionTypeEEnum, SessionType.STATEFUL_LITERAL); + addEEnumLiteral(sessionTypeEEnum, SessionType.STATELESS_LITERAL); + + initEEnum(methodElementKindEEnum, MethodElementKind.class, "MethodElementKind"); //$NON-NLS-1$ + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.UNSPECIFIED_LITERAL); + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.REMOTE_LITERAL); + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.HOME_LITERAL); + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_LITERAL); + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_HOME_LITERAL); + addEEnumLiteral(methodElementKindEEnum, MethodElementKind.SERVICE_ENDPOINT_LITERAL); + + initEEnum(acknowledgeModeEEnum, AcknowledgeMode.class, "AcknowledgeMode"); //$NON-NLS-1$ + addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL); + addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.DUPS_OK_ACKNOWLEDGE_LITERAL); + + initEEnum(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.class, "SubscriptionDurabilityKind"); //$NON-NLS-1$ + addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.DURABLE_LITERAL); + addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.NON_DURABLE_LITERAL); + + initEEnum(returnTypeMappingEEnum, ReturnTypeMapping.class, "ReturnTypeMapping"); //$NON-NLS-1$ + addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.LOCAL_LITERAL); + addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.REMOTE_LITERAL); + + initEEnum(destinationTypeEEnum, DestinationType.class, "DestinationType"); //$NON-NLS-1$ + addEEnumLiteral(destinationTypeEEnum, DestinationType.QUEUE_LITERAL); + addEEnumLiteral(destinationTypeEEnum, DestinationType.TOPIC_LITERAL); + + initEEnum(multiplicityKindEEnum, MultiplicityKind.class, "MultiplicityKind"); //$NON-NLS-1$ + addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_LITERAL); + addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_LITERAL); + + // Create resource + createResource(eNS_URI); + } +} //EjbPackageImpl + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EnterpriseBeanImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EnterpriseBeanImpl.java new file mode 100644 index 000000000..131133324 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EnterpriseBeanImpl.java @@ -0,0 +1,1447 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaParameter; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.common.EJBLocalRef; +import org.eclipse.jst.j2ee.common.EjbRef; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EjbFactory; +import org.eclipse.jst.j2ee.ejb.EjbMethodElementComparator; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl; +import org.eclipse.wst.common.internal.emf.utilities.Revisit; + +/** + * @generated + * EnterpriseJavaBean is a class. It can have instances, someone could write an instance document containing Departments and Employees. It also has attributes, operations, and associations. These are actually derived//filtered from its implementation classes and interfaces. For mapping and browsing purposes, though, you would like the EJB to appear as a class. + * + * In this light, even Session Beans can have associations and properties implemented by their bean. For example, it would be meaningful to describe associations from a Session to the Entities which it uses to perform its work. + */ +public abstract class EnterpriseBeanImpl extends JNDIEnvRefsGroupImpl implements EnterpriseBean { + + protected final static Method[] EMPTY_METHOD_ARRAY = new Method[0]; + protected static final String METHOD_ELEMENT_NAME = "MethodElement"; //$NON-NLS-1$ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityRoleRefs = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass ejbClass = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass homeInterface = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass remoteInterface = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected SecurityIdentity securityIdentity = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass localHomeInterface = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass localInterface = null; + protected EjbMethodElementComparator defaultMethodElementComparator; + public EnterpriseBeanImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEnterpriseBean(); + } + + /** + * createClassRef - return a JavaURL reference to the named Java class + */ + public JavaClass createClassRef(String targetName) { + return getJavaRefFactory().createClassRef(targetName); + } + + protected List createMethodElements(List signatures, Enumerator aType) { + return createMethodElements(METHOD_ELEMENT_NAME, signatures, aType); + } + + protected List createMethodElements(String meTypeName, List signatures, Enumerator aType) { + int size = signatures.size(); + List methodElements = new ArrayList(size); + String signature; + MethodElement me; + for (int i = 0; i < size; i++) { + signature = (String) signatures.get(i); + me = (MethodElement) getEjbFactory().create((EClass)getEjbPackage().getEClassifier(meTypeName)); + me.initializeFromSignature(signature); + me.setEnterpriseBean(this); + me.setType((MethodElementKind)aType); + methodElements.add(me); + } + return methodElements; + } + + public List createMethodElements(List someMethods, JavaClass anInterface) { + return createMethodElements(METHOD_ELEMENT_NAME, someMethods, anInterface); + } + + public List createMethodElements(String meTypeName, List someMethods, JavaClass anInterface) { + if (anInterface == null) + return Collections.EMPTY_LIST; + List signatures = getMethodElementSignatures(someMethods); + Collections.sort(signatures); + Enumerator enumerator = getMethodElementKindLiteral(anInterface); + return createMethodElements(meTypeName, signatures, enumerator); + } + + protected Enumerator getMethodElementKindLiteral(JavaClass anInterface) { + Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL; + if (anInterface == getHomeInterface()) + enumerator = MethodElementKind.HOME_LITERAL; + else if (anInterface == getRemoteInterface()) + enumerator = MethodElementKind.REMOTE_LITERAL; + else if (anInterface == getLocalHomeInterface()) + enumerator = MethodElementKind.LOCAL_HOME_LITERAL; + else if (anInterface == getLocalInterface()) + enumerator = MethodElementKind.LOCAL_LITERAL; + return enumerator; + } + + protected List getMethodElementSignatures(List someMethods) { + int size = someMethods.size(); + List signatures = new ArrayList(size); + Method method; + for (int i = 0; i < size; i++) { + method = (Method) someMethods.get(i); + signatures.add(method.getMethodElementSignature()); + } + return signatures; + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + * @deprecated use getAvailableUnspecifiedMethodElements(); + */ + public List getAvailableCommonMethodElements() { + return getAvailableUnspecifiedMethodElements(); + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + */ + public List getAvailableUnspecifiedMethodElements() { + List commonSigs = getAvailableUnspecifiedMethodElementSignatures(); + return createMethodElements(commonSigs, MethodElementKind.UNSPECIFIED_LITERAL); + } + protected List gatherCommonSignatures(List sigCollections) { + if (sigCollections.isEmpty()) return sigCollections; + List first = (List)sigCollections.get(0); + if (sigCollections.size() == 1) return first; + List result = new ArrayList(first.size()); + sigCollections.remove(0); + String sig = null; + boolean contains = false; + for (int i = 0; i < first.size(); i++) { + contains = false; + sig = (String) first.get(i); + List list = null; + for (int j = 0; j < sigCollections.size(); j++) { + list = (List) sigCollections.get(j); + if (list.contains(sig)) + contains = true; + } + if (contains) + result.add(sig); + } + return result; + } + /** + * Return a List of MethodElements that are set for a particular EObject + * which can be a MethodTransaction or a MethodPermission. + */ + protected List getExistingMethodElements(EObject refObject) { + if (refObject != null) { + EjbPackage pack = getEjbPackage(); + if (refObject.eClass() == pack.getMethodTransaction()) + return ((MethodTransaction)refObject).getMethodElements(this); + if (refObject.eClass() == pack.getMethodPermission()) + return ((MethodPermission)refObject).getMethodElements(this); + } + return Collections.EMPTY_LIST; + } + /** + * This method will return a List of MethodElements signatures + * that represent all the possible MethodElements that can be created + * and are common to both the Home and Remote interfaces. + * @deprecated use getAvailableUnspecifiedMethodElementSignatures(); + */ + public List getAvailableCommonMethodElementSignatures() { + return getAvailableUnspecifiedMethodElementSignatures(); + } + /** + * This method will return a List of MethodElements signatures + * that represent all the possible MethodElements that can be created + * and are common to both the Home and Remote interfaces. + */ + public List getAvailableUnspecifiedMethodElementSignatures() { + List sigCollections = new ArrayList(); + if (getHomeInterface() != null) + sigCollections.add(getHomeInterface().getMethodElementSignatures()); + if (getRemoteInterface() != null) + sigCollections.add(getRemoteInterface().getMethodElementSignatures()); + if (getLocalHomeInterface() != null) + sigCollections.add(getLocalHomeInterface().getMethodElementSignatures()); + if (getLocalInterface() != null) + sigCollections.add(getLocalInterface().getMethodElementSignatures()); + return gatherCommonSignatures(sigCollections); + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * for the Home interface. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + */ + public List getAvailableHomeMethodElements() { + return getAvailableMethodElements(getHomeInterface(), MethodElementKind.HOME_LITERAL); + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * for the Local Home interface. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + */ + public List getAvailableLocalHomeMethodElements() { + return getAvailableMethodElements(getLocalHomeInterface(), MethodElementKind.LOCAL_HOME_LITERAL); + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * for the Local interface. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + */ + public List getAvailableLocalMethodElements() { + return getAvailableMethodElements(getLocalInterface(), MethodElementKind.LOCAL_LITERAL); + } + + public List getAvailableServiceEndpointMethodElements(){ + return getAvailableMethodElements(getServiceEndpoint(), MethodElementKind.SERVICE_ENDPOINT_LITERAL); + } + + protected List getAvailableMethodElements(JavaClass anInterface, Enumerator aType) { + if (anInterface == null) + return Collections.EMPTY_LIST; + List signatures = anInterface.getMethodElementSignatures(); + return createMethodElements(signatures, aType); + } + /** + * This method will return a List of newly created MethodElements + * that represent all the possible MethodElements that can be created + * for the Remote interface. These MethodElements are not contained and will + * not be serialized and should not be added to the model. Their intention is + * solely for comparing with actual MethodElements contained in the model. + */ + public List getAvailableRemoteMethodElements() { + return getAvailableMethodElements(getRemoteInterface(), MethodElementKind.REMOTE_LITERAL); + } + + /* + * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject, Comparator); + */ + public List getExistingOrAvailableMethodElements(EObject refObject, Comparator comparator) { + List result = new ArrayList(); + result.addAll(getAvailableHomeMethodElements()); + result.addAll(getAvailableRemoteMethodElements()); + result.addAll(getAvailableLocalHomeMethodElements()); + result.addAll(getAvailableLocalMethodElements()); + result.addAll(getAvailableServiceEndpointMethodElements()); + result.addAll(getAvailableUnspecifiedMethodElements()); + unionMethodElements(result, getExistingMethodElements(refObject)); + Collections.sort(result, comparator); + return result; + } + /* + * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject); + */ + public List getExistingOrAvailableMethodElements(EObject refObject) { + return getExistingOrAvailableMethodElements(refObject, getDefaultMethodElementComparator()); + } + + protected EjbMethodElementComparator getDefaultMethodElementComparator() { + if (defaultMethodElementComparator == null) + defaultMethodElementComparator = new EjbMethodElementComparator(); + return defaultMethodElementComparator; + } + protected void unionMethodElements(List sourceMethodElements, List additionalMethodElements) { + MethodElement sourceME, additionalME; + int sourceSize, addSize; + sourceSize = sourceMethodElements.size(); + addSize = additionalMethodElements.size(); + List foundElements = new ArrayList(addSize); + boolean found = false; + for (int i = 0; i < addSize; i++){ + found = false; + additionalME = (MethodElement) additionalMethodElements.get(i); + sourceME = null; + for (int ii = 0; ii < sourceSize; ii++){ + sourceME = (MethodElement) sourceMethodElements.get(ii); + if (sourceME.isEquivalent(additionalME)) { + found = true; + break; + } + } + if (found) + foundElements.add(sourceME); + } + sourceMethodElements.removeAll(foundElements); + sourceMethodElements.addAll(additionalMethodElements); + } + public String getEjbClassName() { + getEjbClass(); + return (ejbClass == null) ? null : ejbClass.getQualifiedName(); + } + protected EjbPackage getEjbPackage() { + return EjbFactoryImpl.getPackage(); + } + protected EjbFactory getEjbFactory() { + return ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory(); + } + public EjbRef getEquivalentEjbRef(EjbRef anEjbRef) { + return getEquivalentEjbRef(anEjbRef, getEjbRefs()); + } + public EJBLocalRef getEquivalentEJBLocalRef(EJBLocalRef anEjbLocalRef) { + return (EJBLocalRef) getEquivalentEjbRef(anEjbLocalRef, getEjbLocalRefs()); + } + private EjbRef getEquivalentEjbRef(EjbRef anEjbRef, List someRefs) { + if (anEjbRef == null) + return null; + int size = someRefs.size(); + EjbRef ref; + for (int i = 0; i < size; i++) { + ref = (EjbRef) someRefs.get(i); + if (ref.isEquivalent(anEjbRef)) + return ref; + } + return null; + } + public String getHomeInterfaceName() { + getHomeInterface(); + return homeInterface == null ? null : homeInterface.getQualifiedName(); + } + /** + * See getMethods for comment + */ + public Method[] getHomeMethodsForDeployment() { + return (getHomeInterface() != null ? getMethods(getHomeInterface()) : EMPTY_METHOD_ARRAY); + } + private JavaRefFactory getJavaRefFactory() { + return ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory(); + } + public EjbRef getLinkedEJBReference(EnterpriseBean anEJB) { + return getLinkedEJBReference(anEJB, getEjbRefs()); + } + public EJBLocalRef getLinkedEJBLocalReference(EnterpriseBean anEJB) { + return (EJBLocalRef) getLinkedEJBReference(anEJB, getEjbLocalRefs()); + } + private EjbRef getLinkedEJBReference(EnterpriseBean anEJB, List someRefs) { + if (anEJB == null) + return null; + int size = someRefs.size(); + EjbRef ref; + for (int i = 0; i < size; i++) { + ref = (EjbRef) someRefs.get(i); + if (ref.isLinked(anEJB)) + return ref; + } + return null; + } + public String getLocalHomeInterfaceName() { + getLocalHomeInterface(); + return localHomeInterface == null ? null : localHomeInterface.getQualifiedName(); + } + /** + * See getMethods for comment + */ + public Method[] getLocalHomeMethodsForDeployment() { + return (getLocalHomeInterface() != null ? getMethods(getLocalHomeInterface()) : EMPTY_METHOD_ARRAY); + } + public String getLocalInterfaceName() { + getLocalInterface(); + return localInterface == null ? null : localInterface.getQualifiedName(); + } + /** + * Retrieve an ordered list of methods for the given JavaClass. + * The list should include all non-static, public methods that are + * not inherited from javax.ejb.EJBObject + * This uses the algorithm that web sphere currently uses, and could + * be subject to change + * Creation date: (8/21/00 1:41:03 PM) + * @param intf JavaClass + */ + public static Method[] getMethods(JavaClass intf) { + Method[] allMethods = intf.listMethodExtended(); + java.util.Vector resultVector = new java.util.Vector(allMethods.length); + java.util.Hashtable methodNameTable = new java.util.Hashtable(); + + //---------------------------------------------------------------- + // Iterate over the list returned by "listMethodExtended" and + // filter out methods belonging to the EJBObject interface + // and method synonyms. + // + // Method synonyms correspond to overrides. For all synonyms + // keep the method instance declared on the most specific class. + // How do you determine the most specific class? Don't know. + // For now, if the method is declared on the interface class + // it always overrides others. + //---------------------------------------------------------------- + + Method[] result = null; + + for (int i = 0; i < allMethods.length; i++) { + Method m = allMethods[i]; + + //--------------------------- + // Filter out static methods + //--------------------------- + + if (m.isStatic()) { + continue; + } + + String mKey = methodKey(m); + + String interfaceName = m.getContainingJavaClass().getJavaName(); + if (!interfaceName.equals("javax.ejb.EJBObject")) { //$NON-NLS-1$ + Method synonym = (Method) methodNameTable.get(mKey); + if (synonym == null) { + methodNameTable.put(mKey, m); + resultVector.addElement(m); + } else { + //--------------------------------------------- + // Method declared on most specific class wins + //--------------------------------------------- + JavaClass mClass = m.getContainingJavaClass(); + JavaClass sClass = synonym.getContainingJavaClass(); + if (sClass.implementsInterface(mClass)) { + resultVector.removeElement(synonym); + methodNameTable.put(mKey, m); + resultVector.addElement(m); + } + } + } + } + + result = new Method[resultVector.size()]; + resultVector.copyInto(result); + return sortMethods(result); + } + public String getRemoteInterfaceName() { + getRemoteInterface(); + return remoteInterface == null ? null : remoteInterface.getQualifiedName(); + } + /** + * See getMethods for comment + */ + public Method[] getRemoteMethodsForDeployment() { + return getMethods(getRemoteInterface()); + } + /** + * Return true if @aJavaClass as equal to the + * home, remote, bean class, or key class. + */ + public boolean hasJavaReference(JavaClass aJavaClass) { + if (aJavaClass != null) { + return aJavaClass.equals(getEjbClass())|| + aJavaClass.equals(getRemoteInterface()) || + aJavaClass.equals(getHomeInterface()) || + aJavaClass.equals(getLocalInterface()) || + aJavaClass.equals(getLocalHomeInterface()); + } + return false; + } + /** + * Return true if this ejb has BeanManagedPersistance. + */ + public boolean isBeanManagedEntity() { + return isEntity() && !isContainerManagedEntity(); + } + /** + * isContainerManagedEntity method comment. + */ + public boolean isContainerManagedEntity() { + return false; + } + //Return false by default + public boolean isEntity() { + return false; + } + //Return false by default + public boolean isMessageDriven() { + return false; + } + //Return false by default + public boolean isSession() { + return false; + } + /** + * @deprecated - Use getEjbJar().getVersionID() + * isVersion1_X method comment. + */ + public boolean isVersion1_X() { + if (getEjbJar() != null) + return getEjbJar().getVersionID() <= J2EEVersionConstants.EJB_1_1_ID; + Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined + return false; + } + /** + * @deprecated - Use getEjbJar().getVersionID() + * isVersion2_X method comment. + */ + public boolean isVersion2_X() { + if (getEjbJar() != null) { + return getEjbJar().getVersionID() >= J2EEVersionConstants.EJB_1_1_ID; + } + Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined + return false; + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID() + */ + public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getModuleVersionID(); + } + + + /* + * @see EnterpriseBean#hasLocalClient() + */ + public boolean hasLocalClient() { + return getLocalInterface() != null && getLocalHomeInterface() != null; + } + + /* + * @see EnterpriseBean#hasRemoteClient() + */ + public boolean hasRemoteClient() { + return getRemoteInterface() != null && getHomeInterface() != null; + } + + /** + * Get method name string of form: + * methodName(class name of arg1,class name of arg2,...) + * Creation date: (8/24/00 1:21:10 PM) + * @return String + * @param m Method + */ + private static String methodKey(Method m) { + StringBuffer result = new StringBuffer(m.getName()); + + result.append("("); //$NON-NLS-1$ + + java.util.List args = m.getParameters(); + JavaParameter arg; + for (int i = 0; i < args.size(); i++) { + arg = (JavaParameter) args.get(i); + result.append(((JavaHelpers) arg.getEType()).getJavaName()); + result.append(","); //$NON-NLS-1$ + } + result.append(")"); //$NON-NLS-1$ + return result.toString(); + } + public Object primRefValue(EObject feature) { + switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) { + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION : + return getDescription(); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME : + return getDisplayName(); + case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON : + return getSmallIcon(); + case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON : + return getLargeIcon(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS : + return getResourceRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS : + return getEjbClass(); + case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE : + return getHomeInterface(); + case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE : + return getRemoteInterface(); + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES : + return getEnvironmentProperties(); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS : + return getSecurityRoleRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS : + return getEjbRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS : + return getEjbLocalRefs(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS : + return getResourceEnvRefs(); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY : + return getSecurityIdentity(); + case EjbPackage.ENTERPRISE_BEAN__NAME : + return getName(); + } + return null; + } + /** + * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean + */ + public void reSyncSecurityRoleRef(java.lang.String existingRoleName, java.lang.String newRoleName) { + List roleRefs = getSecurityRoleRefs(); + for (int i = 0; i < roleRefs.size(); i++) { + SecurityRoleRef roleRef = (SecurityRoleRef) roleRefs.get(i); + if (roleRef.getLink() != null && roleRef.getLink().equals(existingRoleName)) + roleRef.setLink(newRoleName); + } + } + public void setEjbClassName(String ejbClassName) { + eSet(EjbPackage.eINSTANCE.getEnterpriseBean_EjbClass(), createClassRef(ejbClassName)); + } + public void setHomeInterfaceName(String homeInterfaceName) { + eSet(EjbPackage.eINSTANCE.getEnterpriseBean_HomeInterface(), createClassRef(homeInterfaceName)); + } + public void setLocalHomeInterfaceName(String localHomeInterfaceName) { + eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalHomeInterface(), createClassRef(localHomeInterfaceName)); + } + public void setLocalInterfaceName(String localInterfaceName) { + eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalInterface(), createClassRef(localInterfaceName)); + } + public void setRemoteInterfaceName(String remoteInterfaceName) { + eSet(EjbPackage.eINSTANCE.getEnterpriseBean_RemoteInterface(), createClassRef(remoteInterfaceName)); + } + /** + * Insert the method's description here. + * Creation date: (8/24/00 1:32:13 PM) + * @return Method[] + * @param methods Method[] + */ + private static Method[] sortMethods(Method[] methods) { + Method result[] = new Method[methods.length]; + + /** + * Insert each element of given list of methods into result + * arary in sorted order + */ + + for (int i = 0; i < methods.length; i++) { + Method currMethod = methods[i]; + String currMethodName = currMethod.getSignature(); + int insertIndex = 0; + while (insertIndex < i) { + if (currMethodName.compareTo(result[insertIndex].getSignature()) <= 0) { + break; + } + insertIndex++; + } + + for (int j = insertIndex; j <= i; j++) { + Method tmpMethod = result[j]; + result[j] = currMethod; + currMethod = tmpMethod; + } + } + return result; + } + public String toString() { + return getClass().getName() + "(" + getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ + } + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getSecurityRoleRefs() { + if (securityRoleRefs == null) { + securityRoleRefs = new EObjectContainmentEList(SecurityRoleRef.class, this, EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS); + } + return securityRoleRefs; + } + + /** + * Handwritten version of getEjbClass(): + */ + + + public JavaClass getEjbClass() { + if (ejbClass != null && ejbClass.eIsProxy()) { + JavaClass oldEjbClass = ejbClass; + JavaClass resolved = (JavaClass)EcoreUtil.resolve(ejbClass, this); + resolved(this.ejbClass, resolved); + this.ejbClass = resolved; + if (ejbClass != oldEjbClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); + } + } + return ejbClass; + } + + + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbClass(JavaClass newEjbClass) { + JavaClass oldEjbClass = ejbClass; + ejbClass = newEjbClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getHomeInterface() { + if (homeInterface != null && homeInterface.eIsProxy()) { + JavaClass oldHomeInterface = homeInterface; + homeInterface = (JavaClass)eResolveProxy((InternalEObject)homeInterface); + if (homeInterface != oldHomeInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface)); + } + } + return homeInterface; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetHomeInterface() { + return homeInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setHomeInterface(JavaClass newHomeInterface) { + JavaClass oldHomeInterface = homeInterface; + homeInterface = newHomeInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getRemoteInterface() { + if (remoteInterface != null && remoteInterface.eIsProxy()) { + JavaClass oldRemoteInterface = remoteInterface; + remoteInterface = (JavaClass)eResolveProxy((InternalEObject)remoteInterface); + if (remoteInterface != oldRemoteInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface)); + } + } + return remoteInterface; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetRemoteInterface() { + return remoteInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRemoteInterface(JavaClass newRemoteInterface) { + JavaClass oldRemoteInterface = remoteInterface; + remoteInterface = newRemoteInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EJBJar getEjbJar() { + if (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR) return null; + return (EJBJar)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbJar(EJBJar newEjbJar) { + if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR && newEjbJar != null)) { + if (EcoreUtil.isAncestor(this, newEjbJar)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newEjbJar != null) + msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, newEjbJar, newEjbJar)); + } + + /** + * @generated This field/method will be replaced during code generation + * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It + * contains an optional description and a specification of the security identity to be used. + */ + public SecurityIdentity getSecurityIdentity() { + return securityIdentity; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSecurityIdentity(SecurityIdentity newSecurityIdentity, NotificationChain msgs) { + SecurityIdentity oldSecurityIdentity = securityIdentity; + securityIdentity = newSecurityIdentity; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, oldSecurityIdentity, newSecurityIdentity); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSecurityIdentity(SecurityIdentity newSecurityIdentity) { + if (newSecurityIdentity != securityIdentity) { + NotificationChain msgs = null; + if (securityIdentity != null) + msgs = ((InternalEObject)securityIdentity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs); + if (newSecurityIdentity != null) + msgs = ((InternalEObject)newSecurityIdentity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs); + msgs = basicSetSecurityIdentity(newSecurityIdentity, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, newSecurityIdentity, newSecurityIdentity)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getLocalHomeInterface() { + if (localHomeInterface != null && localHomeInterface.eIsProxy()) { + JavaClass oldLocalHomeInterface = localHomeInterface; + localHomeInterface = (JavaClass)eResolveProxy((InternalEObject)localHomeInterface); + if (localHomeInterface != oldLocalHomeInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface)); + } + } + return localHomeInterface; + } + + public JavaClass getServiceEndpoint() { + return null; + } + /** + * + * + * @generated + */ + public JavaClass basicGetLocalHomeInterface() { + return localHomeInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLocalHomeInterface(JavaClass newLocalHomeInterface) { + JavaClass oldLocalHomeInterface = localHomeInterface; + localHomeInterface = newLocalHomeInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getLocalInterface() { + if (localInterface != null && localInterface.eIsProxy()) { + JavaClass oldLocalInterface = localInterface; + localInterface = (JavaClass)eResolveProxy((InternalEObject)localInterface); + if (localInterface != oldLocalInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface)); + } + } + return localInterface; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetLocalInterface() { + return localInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLocalInterface(JavaClass newLocalInterface) { + JavaClass oldLocalInterface = localInterface; + localInterface = newLocalInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ENTERPRISE_BEAN__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: + return basicSetSecurityIdentity(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTERPRISE_BEAN__ICONS: + return getIcons(); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: + return getDescription(); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: + return getResourceRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: + return getEjbRefs(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: + return getServiceRefs(); + case EjbPackage.ENTERPRISE_BEAN__NAME: + return getName(); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: + if (resolve) return getEjbClass(); + return basicGetEjbClass(); + case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: + if (resolve) return getHomeInterface(); + return basicGetHomeInterface(); + case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: + if (resolve) return getRemoteInterface(); + return basicGetRemoteInterface(); + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + return getEjbJar(); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: + return getSecurityIdentity(); + case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: + if (resolve) return getLocalHomeInterface(); + return basicGetLocalHomeInterface(); + case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: + if (resolve) return getLocalInterface(); + return basicGetLocalInterface(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTERPRISE_BEAN__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: + return ejbClass != null; + case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: + return homeInterface != null; + case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: + return remoteInterface != null; + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: + return securityIdentity != null; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: + return localHomeInterface != null; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: + return localInterface != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTERPRISE_BEAN__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__NAME: + setName((String)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: + setEjbClass((JavaClass)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: + setHomeInterface((JavaClass)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)newValue); + return; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: + setLocalInterface((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTERPRISE_BEAN__ICONS: + getIcons().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_REFS: + getEjbRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__SERVICE_REFS: + getServiceRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS: + setEjbClass((JavaClass)null); + return; + case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE: + setHomeInterface((JavaClass)null); + return; + case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)null); + return; + case EjbPackage.ENTERPRISE_BEAN__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)null); + return; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)null); + return; + case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE: + setLocalInterface((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toStringGen() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + + /** + * Preserve adapters when object is resolved. + */ + protected void resolved(EObject originalObject, EObject resolvedObject) { + if (originalObject != null && resolvedObject != null && originalObject != resolvedObject) { + Collection col = originalObject.eAdapters(); + if (!col.isEmpty()) { + Iterator it = col.iterator(); + Adapter a; + while (it.hasNext()) { + a = (Adapter) it.next(); + if (a == null) continue; + resolvedObject.eAdapters().add(a); + } + } + } + } + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getEjbClassGen() { + if (ejbClass != null && ejbClass.eIsProxy()) { + JavaClass oldEjbClass = ejbClass; + ejbClass = (JavaClass)eResolveProxy((InternalEObject)ejbClass); + if (ejbClass != oldEjbClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass)); + } + } + return ejbClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetEjbClass() { + return ejbClass; + } + + /* (non-Javadoc) + * @see org.eclipse.emf.ecore.EModelElement#getEAnnotation(java.lang.String) + */ + public EAnnotation getEAnnotation(String source) { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.emf.ecore.EModelElement#getEAnnotations() + */ + public EList getEAnnotations() { + // TODO Auto-generated method stub + return null; + } + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EntityImpl.java new file mode 100644 index 000000000..098b23618 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/EntityImpl.java @@ -0,0 +1,643 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; + + +/** + * The entity element declares an entity bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a unique name assigned to the enterprise bean in the deployment descriptor; the names of the entity bean's home and remote interfaces, if any; the names of the entity bean's local home and local interface, if any; the entity bean's implementation class; the entity bean's persistence management type; the entity bean's primary key class name; an indication of the entity bean's reentrancy; an optional specification of the entity bean's cmp-version; an optional specification of the entity bean's abstract schema name; an optional list of container-managed fields; an optional specification of the primary key field; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; an optional declaration of the bean's resource environment references; an optional set of query declarations for finder and select methods for an entity bean with cmp-version 2.x. + * The optional abstract-schema-name element must be specified for an entity bean with container managed persistence and cmp-version 2.x. The optional primkey-field may be present in the descriptor if the entity's persistence-type is Container. The optional cmp-version element may be present in the descriptor if the entity's persistence-type is Container. If the persistence-type is Container and the cmp-version element is not specified, its value defaults to 2.x. + * The optional home and remote elements must be specified if the entity bean cmp-version is 1.x. + * The optional local-home and local elements must be specified if the entity bean has a local home and local interface. + * The optional query elements must be present if the persistence-type is Container and the cmp-version is 2.x and query methods other than findByPrimaryKey have been defined for the entity bean. + * The other elements that are optional are "optional" in the sense that they are omitted if the lists represented by them are empty. At least one cmp-field element must be present in the descriptor if + * the entity's persistence-type is Container and the cmp-version is 1.x, and none must not be present if the entity's persistence-type is Bean. + */ +public class EntityImpl extends EnterpriseBeanImpl implements Entity, EnterpriseBean { + + /** + * The default value of the '{@link #isReentrant() Reentrant}' attribute. + * + * + * @see #isReentrant() + * @generated + * @ordered + */ + protected static final boolean REENTRANT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isReentrant() Reentrant}' attribute. + * + * + * @see #isReentrant() + * @generated + * @ordered + */ + protected boolean reentrant = REENTRANT_EDEFAULT; + + /** + * This is true if the Reentrant attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean reentrantESet = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass primaryKey = null; + public EntityImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getEntity(); + } + +public String getPrimaryKeyName() { + getPrimaryKey(); + return primaryKey == null ? null : primaryKey.getQualifiedName(); +} +/** + * Return true if @aJavaClass as equal to the + * home, remote, bean class, or key class. + */ +public boolean hasJavaReference(JavaClass aJavaClass) { + boolean result = super.hasJavaReference(aJavaClass); + if (!result && aJavaClass != null) + result = aJavaClass.equals(getPrimaryKey()); + return result; +} +//Return false by default +public boolean isContainerManagedEntity() { + return false; +} +public boolean isEntity() { + return true; +} +protected boolean primGetIsReentrant() { + return isReentrant(); +} +protected JavaClass primGetPrimaryKey() { + return getPrimaryKey(); +} + +public java.lang.Object primRefValue(EObject feature) { + switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) { + case EjbPackage.ENTITY__REENTRANT: return new Boolean(isReentrant()); + case EjbPackage.ENTITY__PRIMARY_KEY: return getPrimaryKey(); + } + return super.primRefValue(feature); +} +public void setPrimaryKeyName(String primaryKeyName) { + eSet(EjbPackage.eINSTANCE.getEntity_PrimaryKey(), createClassRef(primaryKeyName)); +} + /** + * @generated This field/method will be replaced during code generation + * The reentrant element specifies whether an entity bean is reentrant or not. + + */ + public boolean isReentrant() { + return reentrant; + } + + /** + * + * + * @generated + */ + public void setReentrant(boolean newReentrant) { + boolean oldReentrant = reentrant; + reentrant = newReentrant; + boolean oldReentrantESet = reentrantESet; + reentrantESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__REENTRANT, oldReentrant, reentrant, !oldReentrantESet)); + } + + /** + * + * + * @generated + */ + public void unsetReentrant() { + boolean oldReentrant = reentrant; + boolean oldReentrantESet = reentrantESet; + reentrant = REENTRANT_EDEFAULT; + reentrantESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.ENTITY__REENTRANT, oldReentrant, REENTRANT_EDEFAULT, oldReentrantESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetReentrant() { + return reentrantESet; + } + + /** + * Handwritten version of getPrimaryKey(): + */ + + + public JavaClass getPrimaryKey() { + if (primaryKey != null && primaryKey.eIsProxy()) { + JavaClass oldPrimaryKey = primaryKey; + JavaClass resolved = (JavaClass)EcoreUtil.resolve(primaryKey, this); + resolved(this.primaryKey, resolved); + this.primaryKey = resolved; + if (primaryKey != oldPrimaryKey) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldPrimaryKey, primaryKey)); + } + } + return primaryKey; + } + + + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setPrimaryKey(JavaClass newPrimaryKey) { + JavaClass oldPrimaryKey = primaryKey; + primaryKey = newPrimaryKey; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ENTITY__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.ENTITY__EJB_JAR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ENTITY__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.ENTITY__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.ENTITY__EJB_JAR, msgs); + case EjbPackage.ENTITY__SECURITY_IDENTITY: + return basicSetSecurityIdentity(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.ENTITY__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTITY__ICONS: + return getIcons(); + case EjbPackage.ENTITY__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.ENTITY__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.ENTITY__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.ENTITY__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.ENTITY__DESCRIPTION: + return getDescription(); + case EjbPackage.ENTITY__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case EjbPackage.ENTITY__RESOURCE_REFS: + return getResourceRefs(); + case EjbPackage.ENTITY__EJB_REFS: + return getEjbRefs(); + case EjbPackage.ENTITY__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case EjbPackage.ENTITY__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case EjbPackage.ENTITY__SERVICE_REFS: + return getServiceRefs(); + case EjbPackage.ENTITY__NAME: + return getName(); + case EjbPackage.ENTITY__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case EjbPackage.ENTITY__EJB_CLASS: + if (resolve) return getEjbClass(); + return basicGetEjbClass(); + case EjbPackage.ENTITY__HOME_INTERFACE: + if (resolve) return getHomeInterface(); + return basicGetHomeInterface(); + case EjbPackage.ENTITY__REMOTE_INTERFACE: + if (resolve) return getRemoteInterface(); + return basicGetRemoteInterface(); + case EjbPackage.ENTITY__EJB_JAR: + return getEjbJar(); + case EjbPackage.ENTITY__SECURITY_IDENTITY: + return getSecurityIdentity(); + case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: + if (resolve) return getLocalHomeInterface(); + return basicGetLocalHomeInterface(); + case EjbPackage.ENTITY__LOCAL_INTERFACE: + if (resolve) return getLocalInterface(); + return basicGetLocalInterface(); + case EjbPackage.ENTITY__REENTRANT: + return isReentrant() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.ENTITY__PRIMARY_KEY: + if (resolve) return getPrimaryKey(); + return basicGetPrimaryKey(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTITY__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.ENTITY__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.ENTITY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.ENTITY__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.ENTITY__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.ENTITY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.ENTITY__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case EjbPackage.ENTITY__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case EjbPackage.ENTITY__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case EjbPackage.ENTITY__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case EjbPackage.ENTITY__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case EjbPackage.ENTITY__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case EjbPackage.ENTITY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.ENTITY__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case EjbPackage.ENTITY__EJB_CLASS: + return ejbClass != null; + case EjbPackage.ENTITY__HOME_INTERFACE: + return homeInterface != null; + case EjbPackage.ENTITY__REMOTE_INTERFACE: + return remoteInterface != null; + case EjbPackage.ENTITY__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.ENTITY__SECURITY_IDENTITY: + return securityIdentity != null; + case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: + return localHomeInterface != null; + case EjbPackage.ENTITY__LOCAL_INTERFACE: + return localInterface != null; + case EjbPackage.ENTITY__REENTRANT: + return isSetReentrant(); + case EjbPackage.ENTITY__PRIMARY_KEY: + return primaryKey != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTITY__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.ENTITY__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.ENTITY__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.ENTITY__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__NAME: + setName((String)newValue); + return; + case EjbPackage.ENTITY__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case EjbPackage.ENTITY__EJB_CLASS: + setEjbClass((JavaClass)newValue); + return; + case EjbPackage.ENTITY__HOME_INTERFACE: + setHomeInterface((JavaClass)newValue); + return; + case EjbPackage.ENTITY__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)newValue); + return; + case EjbPackage.ENTITY__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.ENTITY__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)newValue); + return; + case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)newValue); + return; + case EjbPackage.ENTITY__LOCAL_INTERFACE: + setLocalInterface((JavaClass)newValue); + return; + case EjbPackage.ENTITY__REENTRANT: + setReentrant(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.ENTITY__PRIMARY_KEY: + setPrimaryKey((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ENTITY__ICONS: + getIcons().clear(); + return; + case EjbPackage.ENTITY__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.ENTITY__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.ENTITY__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.ENTITY__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.ENTITY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.ENTITY__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.ENTITY__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case EjbPackage.ENTITY__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case EjbPackage.ENTITY__EJB_REFS: + getEjbRefs().clear(); + return; + case EjbPackage.ENTITY__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case EjbPackage.ENTITY__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case EjbPackage.ENTITY__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case EjbPackage.ENTITY__SERVICE_REFS: + getServiceRefs().clear(); + return; + case EjbPackage.ENTITY__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.ENTITY__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case EjbPackage.ENTITY__EJB_CLASS: + setEjbClass((JavaClass)null); + return; + case EjbPackage.ENTITY__HOME_INTERFACE: + setHomeInterface((JavaClass)null); + return; + case EjbPackage.ENTITY__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)null); + return; + case EjbPackage.ENTITY__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.ENTITY__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)null); + return; + case EjbPackage.ENTITY__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)null); + return; + case EjbPackage.ENTITY__LOCAL_INTERFACE: + setLocalInterface((JavaClass)null); + return; + case EjbPackage.ENTITY__REENTRANT: + unsetReentrant(); + return; + case EjbPackage.ENTITY__PRIMARY_KEY: + setPrimaryKey((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (reentrant: "); //$NON-NLS-1$ + if (reentrantESet) result.append(reentrant); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + + /** + * @generated This field/method will be replaced during code generation + * The primkey-field element is used to specify the name of the primary key field + * for an entity with container-managed persistence. The primkey-field must be + * one of the fields declared in the cmp-field + * element, and the type of the field must be the same as the primary key type. + * The primkey-field element is not used if the primary key maps to multiple + * container-managed fields (i.e. the key is a compound key). In this case, the + * fields of the primary key class must be public, and their names must correspond + * to the field names of the entity bean class that comprise the key. + * Examples:java.lang.String + * com.wombat.empl.EmployeeID + * java.lang.Object + + */ + public JavaClass getPrimaryKeyGen() { + if (primaryKey != null && primaryKey.eIsProxy()) { + JavaClass oldPrimaryKey = primaryKey; + primaryKey = (JavaClass)eResolveProxy((InternalEObject)primaryKey); + if (primaryKey != oldPrimaryKey) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey)); + } + } + return primaryKey; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetPrimaryKey() { + return primaryKey; + } + +} + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ExcludeListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ExcludeListImpl.java new file mode 100644 index 000000000..c20845428 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ExcludeListImpl.java @@ -0,0 +1,245 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MethodElement; + + +/** + * The exclude list element defines a set of methods which the Assembler marks to be uncallable. It contains one or more methods. + * + * If the method permission relation contains methods that are in the exclude list, the Deployer must consider those methods to be uncallable. + + */ +public class ExcludeListImpl extends EObjectImpl implements ExcludeList, EObject { + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList methodElements = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public ExcludeListImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getExcludeList(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EXCLUDE_LIST__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getMethodElements() { + if (methodElements == null) { + methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS); + } + return methodElements; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EXCLUDE_LIST__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: + return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); + case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EXCLUDE_LIST__DESCRIPTION: + return getDescription(); + case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: + return getMethodElements(); + case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EXCLUDE_LIST__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: + return methodElements != null && !methodElements.isEmpty(); + case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EXCLUDE_LIST__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: + getMethodElements().clear(); + getMethodElements().addAll((Collection)newValue); + return; + case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.EXCLUDE_LIST__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS: + getMethodElements().clear(); + return; + case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + + public List getMethodElements(EnterpriseBean anEJB) { + if (anEJB == null) + return Collections.EMPTY_LIST; + List result = new ArrayList(); + List elements = getMethodElements(); + MethodElement me; + for (int i = 0; i < elements.size(); i++) { + me = (MethodElement) elements.get(i); + if (anEJB.equals(me.getEnterpriseBean())) + result.add(me); + } + return result; + } +} + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleAttributeFilter.java new file mode 100644 index 000000000..11aec60a4 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleAttributeFilter.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * This filter will return a subset of the keyAttributes (this includes inherited + * key attributes) from the ContainerManagedEntityExtension that is passed as an + * argument to the filter method. + * It will remove any key attribute that is not pointed to by an EjbRelationshipRole. + * Thus, the returned list will contain key attributes (including inherited key attributes) that only + * belong to roles. + * Creation date: (11/28/2000 7:23:22 PM) + * @author: Administrator + */ +public class KeyRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { + private static KeyRelationshipRoleAttributeFilter singleton; +/** + * Return the proper list of attributes from cmpExt. + */ +protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { + return cmp.getFilteredFeatures(KeyRelationshipRoleFilter.singleton()); +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleAttributeFilter + */ +public static KeyRelationshipRoleAttributeFilter singleton() { + if (singleton == null) + singleton = new KeyRelationshipRoleAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleFilter.java new file mode 100644 index 000000000..bd4d6b188 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/KeyRelationshipRoleFilter.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * This filter will return a subset of the relationshipRoles (this includes + * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension + * that is passed as an argument to the filter method. It will remove any + * EjbRelationshipRole that is not part of the key. Creation date: (11/28/2000 + * 7:14:57 PM) @author: Administrator + */ +public class KeyRelationshipRoleFilter extends ContainerManagedEntityFilter { + + private static KeyRelationshipRoleFilter singleton; + + /** + * filter method comment. + */ + public java.util.List filter(ContainerManagedEntity cmp) { + List keyRoles = new ArrayList(); + Iterator it = getRelationshipRoles(cmp).iterator(); + CommonRelationshipRole role; + while (it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + if (role.isKey()) keyRoles.add(role); + } + return keyRoles; + } + + /** + * Insert the method's description here. Creation date: (11/28/2000 7:15:37 + * PM) + * + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter + */ + public static KeyRelationshipRoleFilter singleton() { + if (singleton == null) singleton = new KeyRelationshipRoleFilter(); + return singleton; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalKeyAttributeFilter.java new file mode 100644 index 000000000..53d0f43a8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalKeyAttributeFilter.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; + +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * This filter will return a subset of the keyAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter method. + * It will remove any keyPersistentAttributes that are inherited by any supertypes. + * That means the returned list of CMPAttributes will be key attributes that were defined locally + * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus key attributes + * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension. + * Creation date: (11/28/2000 6:24:33 PM) + * @author: Administrator + */ +public class LocalKeyAttributeFilter extends SupertypeCMPAttributeFilter { + private static LocalKeyAttributeFilter singleton; +/** + * Return the proper list of attributes from cmpExt. + */ +protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { + return new ArrayList(cmp.getKeyAttributes()); +} +/** + * Return a boolean indicating whether anAttribute also exists in the superEntity. + * For this filter, only the name has to be the same. + */ +protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { + CMPAttribute found = superEntity.getKeyAttribute(anAttribute.getName()); + return found != null; +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalKeyAttributeFilter + */ +public static LocalKeyAttributeFilter singleton() { + if (singleton == null) + singleton = new LocalKeyAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalModelledPersistentAttributeFilter.java new file mode 100644 index 000000000..67e731195 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalModelledPersistentAttributeFilter.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +/** + * This filter will return a subset of the persistentAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter + * method. It will remove any inherited persistentAttributes and any + * persistentAttributes that are held by EjbRelationshipRole objects (including + * inherited EjbRelationshipRole attributes). That means the returned list of + * CMPAttributes will be attributes that were defined locally minus all + * inherited attributes and minus any attributes pointed to by + * EjbRelationshipRoles, thus the attributes will only be attributes that were + * defined locally by the user. Creation date: (11/28/2000 7:31:42 PM) @author: + * Administrator + */ +public class LocalModelledPersistentAttributeFilter extends SupertypeCMPAttributeFilter { + private static LocalModelledPersistentAttributeFilter singleton; + /** + * Return the proper list of attributes from cmpExt. Return local + * attributes minus those added due to Relationship Roles. + */ + protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { + java.util.List local = null, localRoleAttributes; + local = cmp.getFilteredFeatures(LocalPersistentAttributeFilter.singleton()); + localRoleAttributes = cmp.getFilteredFeatures(LocalRelationshipRoleAttributeFilter.singleton()); + if(local != null) + local.removeAll(localRoleAttributes); + return local; + } + /** + * Return a boolean indicating whether anAttribute also exists in the + * superEntity. For this filter, only the name has to be the same. + */ + protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { + CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName()); + return found != null; + } + /** + * Insert the method's description here. Creation date: (11/28/2000 5:36:00 + * PM) + * + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalModelledPersistentAttributeFilter + */ + public static LocalModelledPersistentAttributeFilter singleton() { + if (singleton == null) + singleton = new LocalModelledPersistentAttributeFilter(); + return singleton; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalOppositeRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalOppositeRelationshipRoleFilter.java new file mode 100644 index 000000000..f444bf351 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalOppositeRelationshipRoleFilter.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * This filter will return a subset of the relationshipRoles (this includes + * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension + * that is passed as an argument to the filter method. It will remove any + * EjbRelationshipRole that is inherited and it will return the opposite role. + * Creation date: (11/28/2000 7:14:57 PM) @author: Administrator + */ +public class LocalOppositeRelationshipRoleFilter extends ContainerManagedEntityFilter { + + private static LocalOppositeRelationshipRoleFilter singleton; + + /** + * Return a List with the opposite roles for the local relationship roles. + */ + public List filter(ContainerManagedEntity cmp) { + List oppositeRoles = new ArrayList(); + Iterator it = getLocalRelationshipRoles(cmp).iterator(); + CommonRelationshipRole role, opposite; + while (it != null && it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + opposite = role.getOppositeAsCommonRole(); + if (opposite != null) oppositeRoles.add(opposite); + } + return oppositeRoles; + } + + /** + * Insert the method's description here. Creation date: (11/28/2000 7:15:37 + * PM) + * + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalOppositeRelationshipRoleFilter + */ + public static LocalOppositeRelationshipRoleFilter singleton() { + if (singleton == null) singleton = new LocalOppositeRelationshipRoleFilter(); + return singleton; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalPersistentAttributeFilter.java new file mode 100644 index 000000000..8bf0340ef --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalPersistentAttributeFilter.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; + +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * This filter will return a subset of the persistentAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter method. + * It will remove any persistentAttributes that are inherited by any supertypes. + * That means the returned list of CMPAttributes will be attributes that were defined locally + * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus attributes + * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension. + * Creation date: (11/28/2000 5:35:03 PM) + * @author: Administrator + */ +public class LocalPersistentAttributeFilter extends SupertypeCMPAttributeFilter { + private static LocalPersistentAttributeFilter singleton; +/** + * Return the proper list of attributes from cmpExt. + */ +protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { + return new ArrayList(cmp.getPersistentAttributes()); +} +/** + * Return a boolean indicating whether anAttribute also exists in the superEntity. + * For this filter, only the name has to be the same. + */ +protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) { + CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName()); + return found != null; +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalPersistentAttributeFilter + */ +public static LocalPersistentAttributeFilter singleton() { + if (singleton == null) + singleton = new LocalPersistentAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleAttributeFilter.java new file mode 100644 index 000000000..a033f9fba --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleAttributeFilter.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * This filter will return a subset of the persistentAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter method. + * It will remove any attribute that is not pointed to by an EjbRelationshipRole and + * it will further remove attributes pointed to by inherited EjbRelationshipRoles. + * Thus, the returned list will contain attributes that only belong to local + * EjbRelationshipRoles (not including iherited roles). + * Creation date: (11/28/2000 6:46:08 PM) + * @author: Administrator + */ +public class LocalRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { + private static LocalRelationshipRoleAttributeFilter singleton; +/** + * Return the proper list of roles from cmpExt. + */ +protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { + return getRelationshipRoles(cmp); +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalRelationshipRoleAttributeFilter + */ +public static LocalRelationshipRoleAttributeFilter singleton() { + if (singleton == null) + singleton = new LocalRelationshipRoleAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java new file mode 100644 index 000000000..18a79835a --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/LocalRelationshipRoleKeyAttributeFilter.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * @author jlanuti + * + * To change this generated comment edit the template variable "typecomment": + * Window>Preferences>Java>Templates. + * To enable and disable the creation of type comments go to + * Window>Preferences>Java>Code Generation. + */ +public class LocalRelationshipRoleKeyAttributeFilter extends LocalRelationshipRoleAttributeFilter { + + private static LocalRelationshipRoleKeyAttributeFilter singleton; + +public static LocalRelationshipRoleAttributeFilter singleton() { + if (singleton == null) + singleton = new LocalRelationshipRoleKeyAttributeFilter(); + return singleton; +} + +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + List attributes = new ArrayList(); + Iterator it = getSourceRoles(cmp).iterator(); + CommonRelationshipRole role; + while (it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + if (role.isKey()) + attributes.addAll(role.getAttributes()); + } + return attributes; +} +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenDestinationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenDestinationImpl.java new file mode 100644 index 000000000..e15c14432 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenDestinationImpl.java @@ -0,0 +1,359 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.ejb.DestinationType; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; + +/** + * The message-driven-destination element provides advice to the Deployer as to whether a message-driven bean is intended for a Queue or a Topic. The declaration consists of: the type of the message-driven bean's intended destination and an optional declaration of whether a durable or non-durable subscription should be used if the destination-type is javax.jms.Topic. + */ +public class MessageDrivenDestinationImpl extends EObjectImpl implements MessageDrivenDestination, EObject{ + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final DestinationType TYPE_EDEFAULT = DestinationType.QUEUE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected DestinationType type = TYPE_EDEFAULT; + /** + * This is true if the Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean typeESet = false; + + /** + * The default value of the '{@link #getSubscriptionDurability() Subscription Durability}' attribute. + * + * + * @see #getSubscriptionDurability() + * @generated + * @ordered + */ + protected static final SubscriptionDurabilityKind SUBSCRIPTION_DURABILITY_EDEFAULT = SubscriptionDurabilityKind.DURABLE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected SubscriptionDurabilityKind subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT; + /** + * This is true if the Subscription Durability attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean subscriptionDurabilityESet = false; + + public MessageDrivenDestinationImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getMessageDrivenDestination(); + } + + /** + * @generated This field/method will be replaced during code generation + * The destination-type element specifies the type of the JMS destination. The type is specified by the Java interface expected to be implemented by the destination. + * + * The destination-type element must be one of the two following: javax.jms.Queue, javax.jms.Topic + */ + public DestinationType getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(DestinationType newType) { + DestinationType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + boolean oldTypeESet = typeESet; + typeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, type, !oldTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetType() { + DestinationType oldType = type; + boolean oldTypeESet = typeESet; + type = TYPE_EDEFAULT; + typeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetType() { + return typeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The subscription-durability element specifies whether a JMS topic subscription is intended to be durable or nondurable. + * + * The subscription-durability element must be one of the two following: Durable, NonDurable + + */ + public SubscriptionDurabilityKind getSubscriptionDurability() { + return subscriptionDurability; + } + + /** + * + * + * @generated + */ + public void setSubscriptionDurability(SubscriptionDurabilityKind newSubscriptionDurability) { + SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability; + subscriptionDurability = newSubscriptionDurability == null ? SUBSCRIPTION_DURABILITY_EDEFAULT : newSubscriptionDurability; + boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet; + subscriptionDurabilityESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, subscriptionDurability, !oldSubscriptionDurabilityESet)); + } + + /** + * + * + * @generated + */ + public void unsetSubscriptionDurability() { + SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability; + boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet; + subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT; + subscriptionDurabilityESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, SUBSCRIPTION_DURABILITY_EDEFAULT, oldSubscriptionDurabilityESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetSubscriptionDurability() { + return subscriptionDurabilityESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public MessageDriven getBean() { + if (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN) return null; + return (MessageDriven)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setBean(MessageDriven newBean) { + if (newBean != eContainer || (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN && newBean != null)) { + if (EcoreUtil.isAncestor(this, newBean)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newBean != null) + msgs = ((InternalEObject)newBean).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newBean, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, newBean, newBean)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + return eBasicSetContainer(null, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + return eContainer.eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: + return getType(); + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: + return getSubscriptionDurability(); + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + return getBean(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: + return isSetType(); + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: + return isSetSubscriptionDurability(); + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + return getBean() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: + setType((DestinationType)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: + setSubscriptionDurability((SubscriptionDurabilityKind)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + setBean((MessageDriven)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE: + unsetType(); + return; + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY: + unsetSubscriptionDurability(); + return; + case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN: + setBean((MessageDriven)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); //$NON-NLS-1$ + if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ + result.append(", subscriptionDurability: "); //$NON-NLS-1$ + if (subscriptionDurabilityESet) result.append(subscriptionDurability); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenImpl.java new file mode 100644 index 000000000..8f6232374 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MessageDrivenImpl.java @@ -0,0 +1,982 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.TransactionType; + + +/** + * @generated + */ +public class MessageDrivenImpl extends EnterpriseBeanImpl implements MessageDriven{ + + /** + * The default value of the '{@link #getTransactionType() Transaction Type}' attribute. + * + * + * @see #getTransactionType() + * @generated + * @ordered + */ + protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT; + /** + * This is true if the Transaction Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transactionTypeESet = false; + + /** + * The default value of the '{@link #getMessageSelector() Message Selector}' attribute. + * + * + * @see #getMessageSelector() + * @generated + * @ordered + */ + protected static final String MESSAGE_SELECTOR_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String messageSelector = MESSAGE_SELECTOR_EDEFAULT; + /** + * The default value of the '{@link #getAcknowledgeMode() Acknowledge Mode}' attribute. + * + * + * @see #getAcknowledgeMode() + * @generated + * @ordered + */ + protected static final AcknowledgeMode ACKNOWLEDGE_MODE_EDEFAULT = AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected AcknowledgeMode acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT; + /** + * This is true if the Acknowledge Mode attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean acknowledgeModeESet = false; + + /** + * The default value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected static final String LINK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLink() Link}' attribute. + * + * + * @see #getLink() + * @generated + * @ordered + */ + protected String link = LINK_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected MessageDrivenDestination destination = null; + /** + * The cached value of the '{@link #getActivationConfig() Activation Config}' containment reference. + * + * + * @see #getActivationConfig() + * @generated + * @ordered + */ + protected ActivationConfig activationConfig = null; + + /** + * The cached value of the '{@link #getMessageDestination() Message Destination}' reference. + * + * + * @see #getMessageDestination() + * @generated + * @ordered + */ + protected JavaClass messageDestination = null; + + /** + * The cached value of the '{@link #getMessagingType() Messaging Type}' reference. + * + * + * @see #getMessagingType() + * @generated + * @ordered + */ + protected JavaClass messagingType = null; + + public MessageDrivenImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getMessageDriven(); + } + +public boolean isMessageDriven() { + return true; +} + /** + * @generated This field/method will be replaced during code generation + * The transaction-type element specifies an enterprise bean's transaction management type. + * + * The transaction-type element must be one of the two following: Bean, Container + */ + public TransactionType getTransactionType() { + return transactionType; + } + + /** + * + * + * @generated + */ + public void setTransactionType(TransactionType newTransactionType) { + TransactionType oldTransactionType = transactionType; + transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType; + boolean oldTransactionTypeESet = transactionTypeESet; + transactionTypeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransactionType() { + TransactionType oldTransactionType = transactionType; + boolean oldTransactionTypeESet = transactionTypeESet; + transactionType = TRANSACTION_TYPE_EDEFAULT; + transactionTypeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransactionType() { + return transactionTypeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The message-selector element is used to specify the JMS message + * selector to be used in determining which messages a message-driven + * bean is to receive. + * + * Example value: + * JMSType = `car' AND color = `blue' AND weight > 2500 + + */ + public String getMessageSelector() { + return messageSelector; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setMessageSelector(String newMessageSelector) { + String oldMessageSelector = messageSelector; + messageSelector = newMessageSelector; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR, oldMessageSelector, messageSelector)); + } + + /** + * @generated This field/method will be replaced during code generation + * an optional declaration of the acknowledgment mode for the message-driven bean if bean-managed transaction demarcation is used (ie. self.transactionType = Bean) + * + * The acknowledge-mode specifies whether JMS AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE message acknowledgment semantics should be used for the onMessage message of a message-driven bean that uses bean managed transaction demarcation. + * + * The acknowledge-mode must be one of the two following: Auto-acknowledge, Dups-ok-acknowledge + + */ + public AcknowledgeMode getAcknowledgeMode() { + return acknowledgeMode; + } + + /** + * + * + * @generated + */ + public void setAcknowledgeMode(AcknowledgeMode newAcknowledgeMode) { + AcknowledgeMode oldAcknowledgeMode = acknowledgeMode; + acknowledgeMode = newAcknowledgeMode == null ? ACKNOWLEDGE_MODE_EDEFAULT : newAcknowledgeMode; + boolean oldAcknowledgeModeESet = acknowledgeModeESet; + acknowledgeModeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, acknowledgeMode, !oldAcknowledgeModeESet)); + } + + /** + * + * + * @generated + */ + public void unsetAcknowledgeMode() { + AcknowledgeMode oldAcknowledgeMode = acknowledgeMode; + boolean oldAcknowledgeModeESet = acknowledgeModeESet; + acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT; + acknowledgeModeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, ACKNOWLEDGE_MODE_EDEFAULT, oldAcknowledgeModeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetAcknowledgeMode() { + return acknowledgeModeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * An optional declaration of the intended destination type of the message-driven bean + */ + public MessageDrivenDestination getDestination() { + return destination; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDestination(MessageDrivenDestination newDestination, NotificationChain msgs) { + MessageDrivenDestination oldDestination = destination; + destination = newDestination; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, oldDestination, newDestination); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDestination(MessageDrivenDestination newDestination) { + if (newDestination != destination) { + NotificationChain msgs = null; + if (destination != null) + msgs = ((InternalEObject)destination).eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs); + if (newDestination != null) + msgs = ((InternalEObject)newDestination).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs); + msgs = basicSetDestination(newDestination, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, newDestination, newDestination)); + } + + /** + * + * + * @generated + */ + public ActivationConfig getActivationConfig() { + return activationConfig; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetActivationConfig(ActivationConfig newActivationConfig, NotificationChain msgs) { + ActivationConfig oldActivationConfig = activationConfig; + activationConfig = newActivationConfig; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, oldActivationConfig, newActivationConfig); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setActivationConfig(ActivationConfig newActivationConfig) { + if (newActivationConfig != activationConfig) { + NotificationChain msgs = null; + if (activationConfig != null) + msgs = ((InternalEObject)activationConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs); + if (newActivationConfig != null) + msgs = ((InternalEObject)newActivationConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs); + msgs = basicSetActivationConfig(newActivationConfig, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, newActivationConfig, newActivationConfig)); + } + + /** + * + * + * @generated + */ + public JavaClass getMessageDestination() { + if (messageDestination != null && messageDestination.eIsProxy()) { + JavaClass oldMessageDestination = messageDestination; + messageDestination = (JavaClass)eResolveProxy((InternalEObject)messageDestination); + if (messageDestination != oldMessageDestination) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination)); + } + } + return messageDestination; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetMessageDestination() { + return messageDestination; + } + + /** + * + * + * @generated + */ + public void setMessageDestination(JavaClass newMessageDestination) { + JavaClass oldMessageDestination = messageDestination; + messageDestination = newMessageDestination; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination)); + } + + /** + * + * + * @generated + */ + public String getLink() { + return link; + } + + /** + * + * + * @generated + */ + public void setLink(String newLink) { + String oldLink = link; + link = newLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__LINK, oldLink, link)); + } + + /** + * + * + * @generated + */ + public JavaClass getMessagingType() { + if (messagingType != null && messagingType.eIsProxy()) { + JavaClass oldMessagingType = messagingType; + messagingType = (JavaClass)eResolveProxy((InternalEObject)messagingType); + if (messagingType != oldMessagingType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType)); + } + } + return messagingType; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetMessagingType() { + return messagingType; + } + + /** + * + * + * @generated + */ + public void setMessagingType(JavaClass newMessagingType) { + JavaClass oldMessagingType = messagingType; + messagingType = newMessagingType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.MESSAGE_DRIVEN__EJB_JAR, msgs); + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + if (destination != null) + msgs = ((InternalEObject)destination).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__DESTINATION, null, msgs); + return basicSetDestination((MessageDrivenDestination)otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.MESSAGE_DRIVEN__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.MESSAGE_DRIVEN__EJB_JAR, msgs); + case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: + return basicSetSecurityIdentity(null, msgs); + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + return basicSetDestination(null, msgs); + case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: + return basicSetActivationConfig(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN__ICONS: + return getIcons(); + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: + return getDescription(); + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: + return getResourceRefs(); + case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: + return getEjbRefs(); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: + return getServiceRefs(); + case EjbPackage.MESSAGE_DRIVEN__NAME: + return getName(); + case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: + if (resolve) return getEjbClass(); + return basicGetEjbClass(); + case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: + if (resolve) return getHomeInterface(); + return basicGetHomeInterface(); + case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: + if (resolve) return getRemoteInterface(); + return basicGetRemoteInterface(); + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + return getEjbJar(); + case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: + return getSecurityIdentity(); + case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: + if (resolve) return getLocalHomeInterface(); + return basicGetLocalHomeInterface(); + case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: + if (resolve) return getLocalInterface(); + return basicGetLocalInterface(); + case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: + return getTransactionType(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: + return getMessageSelector(); + case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: + return getAcknowledgeMode(); + case EjbPackage.MESSAGE_DRIVEN__LINK: + return getLink(); + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + return getDestination(); + case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: + return getActivationConfig(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: + if (resolve) return getMessageDestination(); + return basicGetMessageDestination(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: + if (resolve) return getMessagingType(); + return basicGetMessagingType(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: + return ejbClass != null; + case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: + return homeInterface != null; + case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: + return remoteInterface != null; + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: + return securityIdentity != null; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: + return localHomeInterface != null; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: + return localInterface != null; + case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: + return isSetTransactionType(); + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: + return MESSAGE_SELECTOR_EDEFAULT == null ? messageSelector != null : !MESSAGE_SELECTOR_EDEFAULT.equals(messageSelector); + case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: + return isSetAcknowledgeMode(); + case EjbPackage.MESSAGE_DRIVEN__LINK: + return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link); + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + return destination != null; + case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: + return activationConfig != null; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: + return messageDestination != null; + case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: + return messagingType != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__NAME: + setName((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: + setEjbClass((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: + setHomeInterface((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: + setLocalInterface((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: + setTransactionType((TransactionType)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: + setMessageSelector((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: + setAcknowledgeMode((AcknowledgeMode)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__LINK: + setLink((String)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + setDestination((MessageDrivenDestination)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: + setActivationConfig((ActivationConfig)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: + setMessageDestination((JavaClass)newValue); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: + setMessagingType((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.MESSAGE_DRIVEN__ICONS: + getIcons().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_REFS: + getEjbRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__SERVICE_REFS: + getServiceRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_CLASS: + setEjbClass((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__HOME_INTERFACE: + setHomeInterface((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.MESSAGE_DRIVEN__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)null); + return; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__LOCAL_INTERFACE: + setLocalInterface((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE: + unsetTransactionType(); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR: + setMessageSelector(MESSAGE_SELECTOR_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE: + unsetAcknowledgeMode(); + return; + case EjbPackage.MESSAGE_DRIVEN__LINK: + setLink(LINK_EDEFAULT); + return; + case EjbPackage.MESSAGE_DRIVEN__DESTINATION: + setDestination((MessageDrivenDestination)null); + return; + case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG: + setActivationConfig((ActivationConfig)null); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION: + setMessageDestination((JavaClass)null); + return; + case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE: + setMessagingType((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (transactionType: "); //$NON-NLS-1$ + if (transactionTypeESet) result.append(transactionType); else result.append(""); //$NON-NLS-1$ + result.append(", messageSelector: "); //$NON-NLS-1$ + result.append(messageSelector); + result.append(", acknowledgeMode: "); //$NON-NLS-1$ + if (acknowledgeModeESet) result.append(acknowledgeMode); else result.append(""); //$NON-NLS-1$ + result.append(", link: "); //$NON-NLS-1$ + result.append(link); + result.append(')'); + return result.toString(); + } + + /* + * @see EnterpriseBean#getAvailableLocalHomeMethodElements() + */ + public List getAvailableLocalHomeMethodElements() { + return Collections.EMPTY_LIST; + } + + /* + * @see EnterpriseBean#getAvailableLocalMethodElements() + */ + public List getAvailableLocalMethodElements() { + return Collections.EMPTY_LIST; + } + + /* + * @see EnterpriseBean#getAvailableRemoteMethodElements() + */ + public List getAvailableRemoteMethodElements() { + return Collections.EMPTY_LIST; + } + + /* + * @see EnterpriseBeanImpl#getAvailableUnspecifiedMethodElementSignatures() + */ + public List getAvailableUnspecifiedMethodElementSignatures() { + //There is only the onMessage method + List sigs = new ArrayList(1); + sigs.add("onMessage(javax.jms.Message)"); //$NON-NLS-1$ + return sigs; + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodElementImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodElementImpl.java new file mode 100644 index 000000000..6e7b7daae --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodElementImpl.java @@ -0,0 +1,1039 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.ecore.xmi.XMIResource; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaParameter; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.Session; +import org.eclipse.jst.j2ee.internal.ejb.util.MethodElementHelper; + + +/** + * The method element is used to denote a method of an enterprise bean's + * home or remote interface, or a set of methods. The ejb-name element + * must be the name of one of the enterprise beans in declared in the + * deployment descriptor; the optional method-intf element allows to + * distinguish between a method with the same signature that is defined in + * both the home and remote interface; the method-name element specifies + * the method name; and the optional method-params elements identify a + * single method among multiple methods with an overloaded method name. + * + * There are three possible styles of the method element syntax: + * + * 1. + * EJBNAME + * * + * + * + * This style is used to refer to all the methods of the specified + * enterprise bean's home and remote interfaces. + * + * 2. + * EJBNAME + * METHOD + * > + * + * This style is used to refer to the specified method of the + * specified enterprise bean. If there are multiple methods with + * the same overloaded name, the element of this style refers to + * all the methods with the overloaded name. + * + * + * + * + * + * 3. + * EJBNAME + * METHOD + * + * PARAM-1 + * PARAM-2 + * ... + * PARAM-n + * + * + * + * This style is used to refer to a single method within a set of + * methods with an overloaded name. PARAM-1 through PARAM-n are the + * fully-qualified Java types of the method's input parameters (if + * the method has no input arguments, the method-params element + * contains no method-param elements). Arrays are specified by the + * array element's type, followed by one or more pair of square + * brackets (e.g. int[][]). + * + * + * Used in: method-permission and container-transaction + * + * Examples: + * + * Style 1: The following method element refers to all the methods of + * the EmployeeService bean's home and remote interfaces: + * + * + * EmployeeService + * * + * + * + * Style 2: The following method element refers to all the create + * methods of the EmployeeService bean's home interface: + * + * + * EmployeeService + * create + * + * + * Style 3: The following method element refers to the + * create(String firstName, String LastName) method of the + * EmployeeService bean's home interface. + * + * + * EmployeeService + * create + * + * java.lang.String + * java.lang.String + * + * + * + * + * The following example illustrates a Style 3 element with + * more complex parameter types. The method + * foobar(char s, int i, int[] iar, mypackage.MyClass mycl, + * mypackage.MyClass[][] myclaar) + * would be specified as: + * + * + * EmployeeService + * foobar + * + * char + * int + * int[] + * mypackage.MyClass + * mypackage.MyClass[][] + * + * + * + * The optional method-intf element can be used when it becomes + * necessary to differentiate between a method defined in the home + * interface and a method with the same name and signature that is + * defined in the remote interface. + * + * For example, the method element + * + * + * EmployeeService + * Remote + * create + * + * java.lang.String + * java.lang.String + * + * + * + * can be used to differentiate the create(String, String) method + * defined in the remote interface from the create(String, String) + * method defined in the home interface, which would be defined as + * + * + * EmployeeService + * Home + * create + * + * java.lang.String + * java.lang.String + * + * + + */ +public class MethodElementImpl extends EObjectImpl implements MethodElement { + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getParms() Parms}' attribute. + * + * + * @see #getParms() + * @generated + * @ordered + */ + protected static final String PARMS_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String parms = PARMS_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final MethodElementKind TYPE_EDEFAULT = MethodElementKind.UNSPECIFIED_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected MethodElementKind type = TYPE_EDEFAULT; + /** + * This is true if the Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean typeESet = false; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EnterpriseBean enterpriseBean = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public MethodElementImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getMethodElement(); + } + +public void addMethodParams(String param) { + String oldParms = getParms(); + if (oldParms == null) { + setParms(param); + } else { + setParms(oldParms.concat(" ").concat(param)); //$NON-NLS-1$ + } +} +/** + * Set the params for this method element to an empty array, as opposed + * to null. + */ +public void applyZeroParams() { + setParms(""); //$NON-NLS-1$ +} +public boolean equalSignature(MethodElement anotherMethodElement) { + boolean equal = getName().equals(anotherMethodElement.getName()); + if (equal) { + equal = parmsEqual(anotherMethodElement); + if (equal) { + if (getType() == null) + equal = anotherMethodElement.getType() == null; + else + equal = getType().equals(anotherMethodElement.getType()); + } + } + return equal; +} +public java.util.List getMethodParams() { + StringTokenizer tok = getMethodParamsTokenizer(); + java.util.List v = new ArrayList(); + java.util.List paramsList = new ArrayList(); + String current = null; + if (tok != null) { + while (current != null || tok.hasMoreTokens()) { + String peek = null; + if (current == null) + current = tok.nextToken(); + if (tok.hasMoreTokens()) { + peek = tok.nextToken(); + if (peek.startsWith("[")) { //$NON-NLS-1$ + current += peek; + peek = null; + } + } + v.add(current); + if (peek != null) + current = peek; + else + current = null; + } + + } + + /* + * This is a hack to make sure that for old XMI generated files, that ven if there was ',' separated + * params, it parses them back out right. To support 4.0.X AAT generated XMI files with runAs roles + * for methods. + */ + for (int i = 0; i < v.size(); i++) + { + tok = new StringTokenizer((String)v.get(i),","); //$NON-NLS-1$ + if (tok != null) + { + while (tok.hasMoreTokens()) + { + paramsList.add(tok.nextToken()); + } + } + } + return paramsList; +} +private StringTokenizer getMethodParamsTokenizer() { + //This method is a hack for now; the cardinality is wrong for the params + String aParms = getParms(); + if (aParms == null || aParms.length() == 0) { + return null; + } + return new StringTokenizer(getParms()); +} +/** + * Answer a list of all the methods for which this method element applies. The following rules are used: + * + * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb; + * If it is specified, then the appropriate interface is used + * + * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned + * + * 3) If the method name is specified, and no method params are specified, then all public methods for the interface + * having the same name are returned. + * + * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method + * on the interface with the appropriate signature, if it exists + */ +public Method[] getMethods() { + EnterpriseBean ejb = getEnterpriseBean(); + if(ejb == null) + return new Method[0]; + List result = null; + switch (getType().getValue()) { + case MethodElementKind.HOME : + { + result = getMethods(ejb.getHomeInterface()); + break; + } + case MethodElementKind.REMOTE : + { + result = getMethods(ejb.getRemoteInterface()); + break; + } + case MethodElementKind.LOCAL_HOME : + { + result = getMethods(ejb.getLocalHomeInterface()); + break; + } + case MethodElementKind.LOCAL : + { + result = getMethods(ejb.getLocalInterface()); + break; + } + case MethodElementKind.SERVICE_ENDPOINT : + { + if(ejb.isSession()) { + result = getMethods(((Session)ejb).getServiceEndpoint()); + break; + } + } + case MethodElementKind.UNSPECIFIED : + { + if (ejb.isMessageDriven()) + result = getMethods(ejb.getEjbClass()); + else { + result = new ArrayList(); + result.addAll(getMethods(ejb.getHomeInterface())); + result.addAll(getMethods(ejb.getRemoteInterface())); + result.addAll(getMethods(ejb.getLocalHomeInterface())); + result.addAll(getMethods(ejb.getLocalInterface())); + } + break; + } + } + return (Method[]) result.toArray(new Method[result.size()]); +} +/** + * Answer a list of all the methods for which this method element applies. The following rules are used: + * + * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb; + * If it is specified, then the appropriate interface is used + * + * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned + * + * 3) If the method name is specified, and no method params are specified, then all public methods for the interface + * having the same name are returned. + * + * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method + * on the interface with the appropriate signature, if it exists + */ +private List getMethods(JavaClass javaClass) { + if (javaClass == null) return Collections.EMPTY_LIST; + List result = null; + String methodName = getName().trim(); + if (name.equals("*")) //$NON-NLS-1$ + result = javaClass.getPublicMethodsExtended(); + else if (hasMethodParams()) { + result = new ArrayList(); + Method method = javaClass.getPublicMethodExtended(name, getMethodParams()); + if (method != null) + result.add(method); + } else + result = javaClass.getPublicMethodsExtendedNamed(methodName); + + return result; +} +/** + * Return the MethodElement that is most specific. + */ +public MethodElement getMostSpecific(MethodElement aMethodElement, JavaClass aClass) { + if (aMethodElement == null) return this; + if (aMethodElement.isDefault() && !isDefault()) + return this; + if (!aMethodElement.isDefault() && isDefault()) + return aMethodElement; + if (aMethodElement.hasMethodParams() && !hasMethodParams()) + return aMethodElement; + if (!aMethodElement.hasMethodParams() && hasMethodParams()) + return this; + if (isUnspecified() && !aMethodElement.isUnspecified()) + return aMethodElement; + return this; +} +public static MethodElement getMostSpecificMethodElement(List methodElements, Method aMethod) { + MethodElement specificME = null; + if (aMethod != null) { + Iterator it = methodElements.iterator(); + MethodElement me; + while (it.hasNext()) { + me = (MethodElement) it.next(); + if (me.represents(aMethod)) { + if (me.uniquelyIdentifies(aMethod)) + return me; + else if (specificME == null) + specificME = me; + else + specificME = specificME.getMostSpecific(me, aMethod.getJavaClass()); + } + } + } + return specificME; +} +protected String getParmsString() { + String parmString = getParms(); + if (parmString == null) + parmString = ""; //$NON-NLS-1$ + return parmString; +} +/** + * Return a String array for the possible MethodElement type names. + */ +public static String[] getPossibleTypeNames() { + EjbPackage pack = EjbFactoryImpl.getPackage(); + List literals = pack.getMethodElementKind().getELiterals(); + String[] names = new String[literals.size()]; + for (int i = 0; i < literals.size(); i++) + names[i] = literals.get(i).toString(); + return names; +} +/** + * Return the signature. + * For example: setTwoParamMethod(java.lang.String, java.lang.String) + */ +public String getSignature() { + if (isDefault()) + return getName(); + StringBuffer buf = new StringBuffer(); + buf.append(getName()); + if (hasMethodParams()){ + buf.append(RIGHT_PAREN); + StringTokenizer tok = getMethodParamsTokenizer(); + if (tok != null) { + while (tok.hasMoreTokens()) { + buf.append(tok.nextToken()); + if (tok.hasMoreTokens()) + buf.append(COMMA); + } + } + buf.append(LEFT_PAREN); + } + return buf.toString(); +} +// Returns null if the EEnum is UNSPECIFIED +// unless it is a MessageDriven bean. +public JavaClass getTypeJavaClass() { + if (isHome()) + return getEnterpriseBean().getHomeInterface(); + else if (isRemote()) + return getEnterpriseBean().getRemoteInterface(); + else if (isLocalHome()) + return getEnterpriseBean().getLocalHomeInterface(); + else if (isLocal()) + return getEnterpriseBean().getLocalInterface(); + else if (isUnspecified() && getEnterpriseBean().isMessageDriven()) + return getEnterpriseBean().getEjbClass(); + else + return null; +} + /** + * Answer whether method params apply to this method, e.g., it is specific to one + * overloaded method, even if the method is a zero parameter method. Answer false if no + * parameters apply, that is, the method element applies to all overloaded methods with this name + */ +public boolean hasMethodParams() { + return getParms() != null; +} +/** + * Parse @aSignature setting the name and the params. + * A signature example: setTwoParamMethod(java.lang.String, java.lang.String) + */ +public void initializeFromSignature(String aSignature) { + parseSignature(aSignature); +} +public boolean isDefault() { + return JavaClass.DEFAULT_METHOD_NAME.equals(getName()); +} +/** + * Return true if this MethodElement and @anotherMethodElement + * represent the same exact methods. + */ +public boolean isEquivalent(MethodElement anotherMethodElement) { + boolean equal = equalSignature(anotherMethodElement); + if (equal) + equal = getEnterpriseBean() == anotherMethodElement.getEnterpriseBean(); + return equal; +} +public boolean isHome() { + return getType().getValue() == MethodElementKind.HOME; +} +public boolean isRemote() { + return getType().getValue() == MethodElementKind.REMOTE; +} +public boolean isUnspecified() { + return getType().getValue() == MethodElementKind.UNSPECIFIED; +} +public boolean isLocalHome() { + return getType().getValue() == MethodElementKind.LOCAL_HOME; +} +public boolean isLocal() { + return getType().getValue() == MethodElementKind.LOCAL; +} +/** + * Return true if this MethodElement represents one or more + * methods. + */ +public boolean isValid() { + return getMethods().length > 0; +} +/** + * Return true only if all the parameters for @aMethod + * matches the names in the list of parameters. + */ +public boolean matchesParams(Method aMethod) { + if (aMethod == null) return false; + List params = getMethodParams(); + JavaParameter[] methodParams = aMethod.listParametersWithoutReturn(); + if (params.size() != methodParams.length) + return false; + for (int i = 0; i < methodParams.length; i++){ + String parameterType = ((JavaHelpers)methodParams[i].getEType()).getQualifiedName(); + if (!params.get(i).equals(parameterType)) + return false; + } + return true; +} +/** + * Return true if this MethodElement has the same basic signature as + * @aMethod, ignoring the return type, thrown exceptions, and declaring class of + * this instance or @aMethod. Return false, if params is null + */ +public boolean nameAndParamsEquals(Method aMethod) { + if (aMethod != null) { + if (getName().equals(aMethod.getName())) { + if (hasMethodParams()) + return matchesParams(aMethod); + return false; + } + } + return false; +} +protected boolean parmsEqual(MethodElement me) { + if (me == null) return false; + List myParms, otherParms; + myParms = getMethodParams(); + otherParms = me.getMethodParams(); + if (myParms.size() != otherParms.size()) return false; + for (int i = 0; i < myParms.size(); i++){ + if (!myParms.get(i).equals(otherParms.get(i))) + return false; + } + return true; +} +/** + * Parse @aSignature setting the name and the params. + * A signature example: setTwoParamMethod(java.lang.String, java.lang.String) + */ +protected void parseSignature(String aSignature) { + int index = aSignature.indexOf(RIGHT_PAREN); + + int endIndex = aSignature.indexOf(LEFT_PAREN); + if (endIndex < 0) + { + endIndex = aSignature.length() - 1; + } + + if (index < 0){ + setName(aSignature); + setParms(null); //There are no parameters in the sig so set to null + } + else { + String sigName = aSignature.substring(0, index); + + setName(sigName); + String sigParms = aSignature.substring(index + 1, endIndex); + + if (sigParms.length() > 0) { + char commaChar = COMMA.charAt(0); + char[] sigParmsChars = sigParms.toCharArray(); + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < sigParmsChars.length; i++) { + if (sigParmsChars[i] != commaChar) { + buf.append(sigParmsChars[i]); + } else { + addMethodParams(buf.toString()); + buf = new StringBuffer(); + } + } + addMethodParams(buf.toString()); + } else + applyZeroParams(); + } +} +public void removeMethodParams(String param) { + String myParams = getParms(); + if (myParams == null || myParams.length() == 0) { + return; + } + StringTokenizer tok = new StringTokenizer(myParams); + StringBuffer newParms = new StringBuffer(); + while (tok.hasMoreElements()) { + String token = tok.nextToken(); + if (!token.equals(param)) { + newParms.append(token); + newParms.append(" "); //$NON-NLS-1$ + } + } + setParms(newParms.toString().trim()); +} +/** + * represents method comment. + */ +public boolean represents(Method aMethod) { + if (aMethod != null) { + if (isUnspecified() || typeClassImplementsInterface(aMethod.getJavaClass())) { + if (isDefault()) + return true; + else + if (getName().equals(aMethod.getName())) { + if (hasMethodParams()) + return matchesParams(aMethod); + return true; + } + } + } + return false; +} +/** + * Sets the id to be [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName, + * or [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName_Parms, if parms exist + */ +public void setIdToReadableString() { + String aParms = getParms() == null ? "" : "_"+getParms().replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$ + String prefix = ""; //$NON-NLS-1$ + switch (MethodElementHelper.getContainedType(this)) { + case MethodElementHelper.METHOD_PERMISSION : + prefix = ((XMIResource)eContainer.eResource()).getID(eContainer); + break; + case MethodElementHelper.METHOD_TRANSACTION : + prefix = ((XMIResource)eContainer.eResource()).getID(eContainer); + break; + } + ((XMIResource)eResource()).setID(this,prefix + "_" + getEnterpriseBean().getName() + "_" + getName() + aParms); //$NON-NLS-1$ //$NON-NLS-2$ +} +protected boolean typeClassImplementsInterface(JavaClass anInterface) { + if (getTypeJavaClass() == null || anInterface == null) return false; + return getTypeJavaClass().implementsInterface(anInterface); +} +/** + * Return true if this MethodElement uniquely identifies + * @aMethod. Return false, even if the MethodElement represents + * @aMethod (i.e., @aMethod is contained in its list of methods). + */ +public boolean uniquelyIdentifies(Method aMethod) { + if (aMethod != null) { + if (getTypeJavaClass() != null && + typeClassImplementsInterface(aMethod.getJavaClass()) && + getName().equals(aMethod.getName())) { + if (hasMethodParams()) + return matchesParams(aMethod); + return aMethod.listParametersWithoutReturn().length==0; + } + } + return false; +} + /** + * @generated This field/method will be replaced during code generation + * The method-name element contains a name of an enterprise bean method, + * or the asterisk (*) character. The asterisk is used when the element + * denotes all the methods of an enterprise bean's remote and home + * interfaces. + + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getParms() { + return parms; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setParms(String newParms) { + String oldParms = parms; + parms = newParms; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__PARMS, oldParms, parms)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public MethodElementKind getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(MethodElementKind newType) { + MethodElementKind oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + boolean oldTypeESet = typeESet; + typeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, type, !oldTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetType() { + MethodElementKind oldType = type; + boolean oldTypeESet = typeESet; + type = TYPE_EDEFAULT; + typeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetType() { + return typeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EnterpriseBean getEnterpriseBean() { + if (enterpriseBean != null && enterpriseBean.eIsProxy()) { + EnterpriseBean oldEnterpriseBean = enterpriseBean; + enterpriseBean = (EnterpriseBean)eResolveProxy((InternalEObject)enterpriseBean); + if (enterpriseBean != oldEnterpriseBean) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean)); + } + } + return enterpriseBean; + } + + /** + * + * + * @generated + */ + public EnterpriseBean basicGetEnterpriseBean() { + return enterpriseBean; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEnterpriseBean(EnterpriseBean newEnterpriseBean) { + EnterpriseBean oldEnterpriseBean = enterpriseBean; + enterpriseBean = newEnterpriseBean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_ELEMENT__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_ELEMENT__NAME: + return getName(); + case EjbPackage.METHOD_ELEMENT__PARMS: + return getParms(); + case EjbPackage.METHOD_ELEMENT__TYPE: + return getType(); + case EjbPackage.METHOD_ELEMENT__DESCRIPTION: + return getDescription(); + case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: + if (resolve) return getEnterpriseBean(); + return basicGetEnterpriseBean(); + case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_ELEMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.METHOD_ELEMENT__PARMS: + return PARMS_EDEFAULT == null ? parms != null : !PARMS_EDEFAULT.equals(parms); + case EjbPackage.METHOD_ELEMENT__TYPE: + return isSetType(); + case EjbPackage.METHOD_ELEMENT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: + return enterpriseBean != null; + case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_ELEMENT__NAME: + setName((String)newValue); + return; + case EjbPackage.METHOD_ELEMENT__PARMS: + setParms((String)newValue); + return; + case EjbPackage.METHOD_ELEMENT__TYPE: + setType((MethodElementKind)newValue); + return; + case EjbPackage.METHOD_ELEMENT__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: + setEnterpriseBean((EnterpriseBean)newValue); + return; + case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.METHOD_ELEMENT__PARMS: + setParms(PARMS_EDEFAULT); + return; + case EjbPackage.METHOD_ELEMENT__TYPE: + unsetType(); + return; + case EjbPackage.METHOD_ELEMENT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN: + setEnterpriseBean((EnterpriseBean)null); + return; + case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", parms: "); //$NON-NLS-1$ + result.append(parms); + result.append(", type: "); //$NON-NLS-1$ + if (typeESet) result.append(type); else result.append(""); //$NON-NLS-1$ + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodPermissionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodPermissionImpl.java new file mode 100644 index 000000000..7cf5eb669 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodPermissionImpl.java @@ -0,0 +1,465 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodPermission; + + +/** + * The method-permission element specifies that one or more security roles are allowed to invoke one or more enterprise bean methods. The method-permission element consists of an optional description, a list of security role names, and a list of method elements. The security roles used in the method-permission element must be defined in the security-role element of the deployment descriptor, and the methods must be methods defined in the enterprise bean's remote and//or home interfaces. + */ +public class MethodPermissionImpl extends EObjectImpl implements MethodPermission, EObject { + + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #isUnchecked() Unchecked}' attribute. + * + * + * @see #isUnchecked() + * @generated + * @ordered + */ + protected static final boolean UNCHECKED_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean unchecked = UNCHECKED_EDEFAULT; + /** + * This is true if the Unchecked attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean uncheckedESet = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList roles = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList methodElements = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public MethodPermissionImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getMethodPermission(); + } + +public List getMethodElements(EnterpriseBean anEJB) { + if (anEJB == null) return Collections.EMPTY_LIST; + List result = new ArrayList(); + List elements = getMethodElements(); + MethodElement me; + for (int i = 0; i < elements.size(); i++){ + me = (MethodElement) elements.get(i); + if (anEJB.equals(me.getEnterpriseBean())) + result.add(me); + } + return result; +} +public SecurityRole getSecurityRole(String aRoleName) { + if (aRoleName == null) return null; + List myRoles = getRoles(); + int size = myRoles.size(); + SecurityRole role; + for (int i = 0; i < size; i++){ + role = (SecurityRole) myRoles.get(i); + if (aRoleName.equals(role.getRoleName())) + return role; + } + return null; +} +/** + * Return true if this permission contains @aSecurityRole + */ +public boolean hasSecurityRole(SecurityRole aSecurityRole) { + if (aSecurityRole == null) + return false; + List myRoles = getRoles(); + int size = myRoles.size(); + for (int i = 0; i < size; i++) { + if (aSecurityRole == myRoles.get(i)) + return true; + } + return false; +} +public boolean hasSecurityRole(String aRoleName) { + return getSecurityRole(aRoleName) != null; +} +/** + * Return true if this MethodPermission and @anotherMethodPermission + * have the same roles. + */ +public boolean isEquivalent(MethodPermission anotherMethodPermission) { + if (anotherMethodPermission == null) return false; + return getRoles().size() == anotherMethodPermission.getRoles().size() && + getRoles().containsAll(anotherMethodPermission.getRoles()); +} + /** + * @generated This field/method will be replaced during code generation + * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public boolean isUnchecked() { + return unchecked; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUnchecked(boolean newUnchecked) { + boolean oldUnchecked = unchecked; + unchecked = newUnchecked; + boolean oldUncheckedESet = uncheckedESet; + uncheckedESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, unchecked, !oldUncheckedESet)); + } + + /** + * + * + * @generated + */ + public void unsetUnchecked() { + boolean oldUnchecked = unchecked; + boolean oldUncheckedESet = uncheckedESet; + unchecked = UNCHECKED_EDEFAULT; + uncheckedESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, UNCHECKED_EDEFAULT, oldUncheckedESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetUnchecked() { + return uncheckedESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public AssemblyDescriptor getAssemblyDescriptor() { + if (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR) return null; + return (AssemblyDescriptor)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { + if (newAssemblyDescriptor != eContainer || (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) { + if (EcoreUtil.isAncestor(this, newAssemblyDescriptor)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newAssemblyDescriptor != null) + msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getRoles() { + if (roles == null) { + roles = new EObjectResolvingEList(SecurityRole.class, this, EjbPackage.METHOD_PERMISSION__ROLES); + } + return roles; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getMethodElements() { + if (methodElements == null) { + methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS); + } + return methodElements; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_PERMISSION__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + return eBasicSetContainer(null, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs); + case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: + return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); + case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + return eContainer.eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_PERMISSION__DESCRIPTION: + return getDescription(); + case EjbPackage.METHOD_PERMISSION__UNCHECKED: + return isUnchecked() ? Boolean.TRUE : Boolean.FALSE; + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + return getAssemblyDescriptor(); + case EjbPackage.METHOD_PERMISSION__ROLES: + return getRoles(); + case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: + return getMethodElements(); + case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_PERMISSION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.METHOD_PERMISSION__UNCHECKED: + return isSetUnchecked(); + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + return getAssemblyDescriptor() != null; + case EjbPackage.METHOD_PERMISSION__ROLES: + return roles != null && !roles.isEmpty(); + case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: + return methodElements != null && !methodElements.isEmpty(); + case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_PERMISSION__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.METHOD_PERMISSION__UNCHECKED: + setUnchecked(((Boolean)newValue).booleanValue()); + return; + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)newValue); + return; + case EjbPackage.METHOD_PERMISSION__ROLES: + getRoles().clear(); + getRoles().addAll((Collection)newValue); + return; + case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: + getMethodElements().clear(); + getMethodElements().addAll((Collection)newValue); + return; + case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_PERMISSION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.METHOD_PERMISSION__UNCHECKED: + unsetUnchecked(); + return; + case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)null); + return; + case EjbPackage.METHOD_PERMISSION__ROLES: + getRoles().clear(); + return; + case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS: + getMethodElements().clear(); + return; + case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", unchecked: "); //$NON-NLS-1$ + if (uncheckedESet) result.append(unchecked); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodTransactionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodTransactionImpl.java new file mode 100644 index 000000000..41901db26 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/MethodTransactionImpl.java @@ -0,0 +1,432 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.ejb.TransactionAttributeType; + + +/** + * Specifies how the container must manage transaction scopes for the enterprise bean's method invocations. It consists of an optional description, a list of method elements, and a transaction attribute.The transaction attribute is to be applied to all the specified methods. + */ +public class MethodTransactionImpl extends EObjectImpl implements MethodTransaction, EObject { + + /** + * The default value of the '{@link #getTransactionAttribute() Transaction Attribute}' attribute. + * + * + * @see #getTransactionAttribute() + * @generated + * @ordered + */ + protected static final TransactionAttributeType TRANSACTION_ATTRIBUTE_EDEFAULT = TransactionAttributeType.NOT_SUPPORTED_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected TransactionAttributeType transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT; + /** + * This is true if the Transaction Attribute attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transactionAttributeESet = false; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList methodElements = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public MethodTransactionImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getMethodTransaction(); + } + +/** + * Return an array of Strings for all the EEnumLiteral values + * for the transactionAttribute enumeration. + */ +public static String[] getAvailableTransactionAttributeNames() { + List l = getAvailableTransactionAttributes(); + String[] names = new String[l.size()]; + for (int i = 0; i < l.size(); i++) + names[i] = ((EEnumLiteral)l.get(i)).toString(); + return names; +} +/** + * Return a List of the all the EEnumLiteral values + * for the transactionAttribute enumeration. + * The toString() method for a EEnumLiteral will display + * the String value for the enumeration value. + */ +public static List getAvailableTransactionAttributes() { + EjbPackage pack = (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); + return pack.getTransactionAttributeType().getELiterals(); +} +public List getMethodElements(EnterpriseBean anEJB) { + List result = new ArrayList(); + List elements = getMethodElements(); + MethodElement me; + for (int i = 0; i < elements.size(); i++){ + me = (MethodElement) elements.get(i); + if (me.getEnterpriseBean() != null && me.getEnterpriseBean().equals(anEJB)) + result.add(me); + } + return result; +} +public MethodElement getMostSpecificMethodElement(Method aMethod) { + return MethodElementImpl.getMostSpecificMethodElement(getMethodElements(), aMethod); +} +public boolean isEquivalent(MethodTransaction anotherMethodTransaction) { + return getTransactionAttribute() == anotherMethodTransaction.getTransactionAttribute(); +} + /** + * @generated This field/method will be replaced during code generation + * The trans-attribute element specifies how the container must manage the transaction boundaries when delegating a method invocation to an enterprise bean's business method. + + */ + public TransactionAttributeType getTransactionAttribute() { + return transactionAttribute; + } + + /** + * + * + * @generated + */ + public void setTransactionAttribute(TransactionAttributeType newTransactionAttribute) { + TransactionAttributeType oldTransactionAttribute = transactionAttribute; + transactionAttribute = newTransactionAttribute == null ? TRANSACTION_ATTRIBUTE_EDEFAULT : newTransactionAttribute; + boolean oldTransactionAttributeESet = transactionAttributeESet; + transactionAttributeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, transactionAttribute, !oldTransactionAttributeESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransactionAttribute() { + TransactionAttributeType oldTransactionAttribute = transactionAttribute; + boolean oldTransactionAttributeESet = transactionAttributeESet; + transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT; + transactionAttributeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, TRANSACTION_ATTRIBUTE_EDEFAULT, oldTransactionAttributeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransactionAttribute() { + return transactionAttributeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public AssemblyDescriptor getAssemblyDescriptor() { + if (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR) return null; + return (AssemblyDescriptor)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) { + if (newAssemblyDescriptor != eContainer || (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) { + if (EcoreUtil.isAncestor(this, newAssemblyDescriptor)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newAssemblyDescriptor != null) + msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getMethodElements() { + if (methodElements == null) { + methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS); + } + return methodElements; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + return eBasicSetContainer(null, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs); + case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: + return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs); + case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + return eContainer.eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: + return getTransactionAttribute(); + case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: + return getDescription(); + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + return getAssemblyDescriptor(); + case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: + return getMethodElements(); + case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: + return isSetTransactionAttribute(); + case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + return getAssemblyDescriptor() != null; + case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: + return methodElements != null && !methodElements.isEmpty(); + case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: + setTransactionAttribute((TransactionAttributeType)newValue); + return; + case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)newValue); + return; + case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: + getMethodElements().clear(); + getMethodElements().addAll((Collection)newValue); + return; + case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE: + unsetTransactionAttribute(); + return; + case EjbPackage.METHOD_TRANSACTION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR: + setAssemblyDescriptor((AssemblyDescriptor)null); + return; + case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS: + getMethodElements().clear(); + return; + case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (transactionAttribute: "); //$NON-NLS-1$ + if (transactionAttributeESet) result.append(transactionAttribute); else result.append(""); //$NON-NLS-1$ + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledKeyAttributeFilter.java new file mode 100644 index 000000000..9670b4331 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledKeyAttributeFilter.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * This filter will return a subset of the keyAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter method. + * It will remove any keyAttributes that are held by EjbRelationshipRole objects (including + * inherited EjbRelationshipRole attributes). + * That means the returned list of CMPAttributes will be key attributes that were defined locally + * and all inherited key attributes minus any key attributes pointed to by EjbRelationshipRoles, thus the + * key attributes will only be key attributes that were defined by the user. + * Creation date: (11/28/2000 8:09:10 PM) + * @author: Administrator + */ +public class ModelledKeyAttributeFilter extends ContainerManagedEntityFilter { + private static ModelledKeyAttributeFilter singleton; +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + return getSourceAttributes(cmp); +} +/** + * Return the proper list of attributes from cmpExt. + * Return all attributes minus those added due to Relationship Roles. + */ +protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { + java.util.List all, localRoleKeyAttributes; + all = new java.util.ArrayList(cmp.getKeyAttributes()); + localRoleKeyAttributes = cmp.getFilteredFeatures(KeyRelationshipRoleAttributeFilter.singleton()); + filterRoleAttributesByName(all, localRoleKeyAttributes); + return all; +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledKeyAttributeFilter + */ +public static ModelledKeyAttributeFilter singleton() { + if (singleton == null) + singleton = new ModelledKeyAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledPersistentAttributeFilter.java new file mode 100644 index 000000000..5259acc09 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/ModelledPersistentAttributeFilter.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * This filter will return a subset of the persistentAttributes from the + * ContainerManagedEntityExtension that is passed as an argument to the filter method. + * It will remove any persistentAttributes that are held by EjbRelationshipRole objects (including + * inherited EjbRelationshipRole attributes). + * That means the returned list of CMPAttributes will be attributes that were defined locally + * and all inherited attributes minus any attributes pointed to by EjbRelationshipRoles, thus the + * attributes will only be attributes that were defined by the user. + * Creation date: (11/28/2000 7:31:42 PM) + * @author: Administrator + */ +public class ModelledPersistentAttributeFilter extends ContainerManagedEntityFilter { + private static ModelledPersistentAttributeFilter singleton; +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + return getSourceAttributes(cmp); +} +/** + * Return the proper list of attributes from cmpExt. + * Return all attributes minus those added due to Relationship Roles. + */ +protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) { + java.util.List all, roleAttributes; + all = new java.util.ArrayList(cmp.getPersistentAttributes()); + roleAttributes = cmp.getFilteredFeatures(RelationshipRoleAttributeFilter.singleton()); + filterRoleAttributesByName(all, roleAttributes); + return all; +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledPersistentAttributeFilter + */ +public static ModelledPersistentAttributeFilter singleton() { + if (singleton == null) + singleton = new ModelledPersistentAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/NonKeyRequiredRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/NonKeyRequiredRoleFilter.java new file mode 100644 index 000000000..0c0b3cb32 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/NonKeyRequiredRoleFilter.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on May 5, 2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * @author jlanuti + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class NonKeyRequiredRoleFilter extends ContainerManagedEntityFilter { + + private static NonKeyRequiredRoleFilter singleton; + + /** + * filter method comment. + */ + public List filter(ContainerManagedEntity cmp) { + List roles = new ArrayList(); + Iterator it = getRelationshipRoles(cmp).iterator(); + CommonRelationshipRole role; + while (it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + if (!role.isKey() && role.isRequired()) roles.add(role); + } + return roles; + } + + /** + * Insert the method's description here. Creation date: (11/28/2000 7:15:37 + * PM) + * + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter + */ + public static NonKeyRequiredRoleFilter singleton() { + if (singleton == null) singleton = new NonKeyRequiredRoleFilter(); + return singleton; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryImpl.java new file mode 100644 index 000000000..d0e4947d1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryImpl.java @@ -0,0 +1,513 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping; + + +/** + * The query element is used to specify a finder or select query. It contains an optional description of the query; the specification of the finder or select method it is used by; a specification of the return type mapping, if any, if the query is for a select method; and the EJB QL query string that defines the query. Queries that are expressible in EJB QL must use the ejb-ql element to specify the query. If a query + * is not expressible in EJB QL, the description element should be used to describe the semantics of the query and the ejb-ql element should be empty. + */ +public class QueryImpl extends EObjectImpl implements Query, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getEjbQL() Ejb QL}' attribute. + * + * + * @see #getEjbQL() + * @generated + * @ordered + */ + protected static final String EJB_QL_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String ejbQL = EJB_QL_EDEFAULT; + /** + * The default value of the '{@link #getReturnTypeMapping() Return Type Mapping}' attribute. + * + * + * @see #getReturnTypeMapping() + * @generated + * @ordered + */ + protected static final ReturnTypeMapping RETURN_TYPE_MAPPING_EDEFAULT = ReturnTypeMapping.LOCAL_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected ReturnTypeMapping returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT; + /** + * This is true if the Return Type Mapping attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean returnTypeMappingESet = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected QueryMethod queryMethod = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public QueryImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getQuery(); + } + +public boolean isLocalResultMapping() { + // override bug in the model which made Remote the default + return getReturnTypeMapping().getValue() == ReturnTypeMapping.LOCAL; +} +public boolean isRemoteResultMapping() { + return getReturnTypeMapping().getValue() == ReturnTypeMapping.REMOTE; +} + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing the query. + * + * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains the EJB QL query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. The ejb-ql element must be specified for all queries that are expressible in EJB QL. + * + * @invariant The value must be a valid EJB QL query string for the entity bean or dependent object class for which the query is specified. + * @invariant The ejb-ql element must be specified for all queries that are expressible in EJB QL. + * + * Example: + * + * + * ejbSelectPendingLineitems + * + * + * SELECT ENTITY(l) + * FROM LineItems l + * WHERE l.shipped is FALSE + * + * + */ + public String getEjbQL() { + return ejbQL; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbQL(String newEjbQL) { + String oldEjbQL = ejbQL; + ejbQL = newEjbQL; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__EJB_QL, oldEjbQL, ejbQL)); + } + + /** + * @generated This field/method will be replaced during code generation + * The return-type-mapping element is used in the query element to specify whether an abstract schema type that is returned by a query for a select method is to be mapped to an EJBLocalObject or EJBObject type. The value of the return-type-mapping element, if specified must be one of the following. + */ + public ReturnTypeMapping getReturnTypeMapping() { + return returnTypeMapping; + } + + /** + * + * + * @generated + */ + public void setReturnTypeMapping(ReturnTypeMapping newReturnTypeMapping) { + ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping; + returnTypeMapping = newReturnTypeMapping == null ? RETURN_TYPE_MAPPING_EDEFAULT : newReturnTypeMapping; + boolean oldReturnTypeMappingESet = returnTypeMappingESet; + returnTypeMappingESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, returnTypeMapping, !oldReturnTypeMappingESet)); + } + + /** + * + * + * @generated + */ + public void unsetReturnTypeMapping() { + ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping; + boolean oldReturnTypeMappingESet = returnTypeMappingESet; + returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT; + returnTypeMappingESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, RETURN_TYPE_MAPPING_EDEFAULT, oldReturnTypeMappingESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetReturnTypeMapping() { + return returnTypeMappingESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The query-method element is used to specify the method (DB//SR//CM-"on the home") for a finder or + * select query. + * + * The method-name element specifies the name of a finder or select + * method in the entity bean's implementation class or a select method in + * the dependent object class. + * + * Each method-param must be defined for a query-method using the + * method-params element. + * + * Used in: query + * + * Example: + * + * Example: + * + * Method finds large orders + * + * findLargeOrders + * + * + * SELECT ENTITY(o) FROM Order o WHERE o.amount > 1000 + * + */ + public QueryMethod getQueryMethod() { + return queryMethod; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetQueryMethod(QueryMethod newQueryMethod, NotificationChain msgs) { + QueryMethod oldQueryMethod = queryMethod; + queryMethod = newQueryMethod; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, oldQueryMethod, newQueryMethod); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setQueryMethod(QueryMethod newQueryMethod) { + if (newQueryMethod != queryMethod) { + NotificationChain msgs = null; + if (queryMethod != null) + msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs); + if (newQueryMethod != null) + msgs = ((InternalEObject)newQueryMethod).eInverseAdd(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs); + msgs = basicSetQueryMethod(newQueryMethod, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, newQueryMethod, newQueryMethod)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public ContainerManagedEntity getEntity() { + if (eContainerFeatureID != EjbPackage.QUERY__ENTITY) return null; + return (ContainerManagedEntity)eContainer; + } + + /** + * + * + * @generated + */ + public void setEntity(ContainerManagedEntity newEntity) { + if (newEntity != eContainer || (eContainerFeatureID != EjbPackage.QUERY__ENTITY && newEntity != null)) { + if (EcoreUtil.isAncestor(this, newEntity)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newEntity != null) + msgs = ((InternalEObject)newEntity).eInverseAdd(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newEntity, EjbPackage.QUERY__ENTITY, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__ENTITY, newEntity, newEntity)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.QUERY__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.QUERY__QUERY_METHOD: + if (queryMethod != null) + msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.QUERY__QUERY_METHOD, null, msgs); + return basicSetQueryMethod((QueryMethod)otherEnd, msgs); + case EjbPackage.QUERY__ENTITY: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.QUERY__ENTITY, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.QUERY__QUERY_METHOD: + return basicSetQueryMethod(null, msgs); + case EjbPackage.QUERY__ENTITY: + return eBasicSetContainer(null, EjbPackage.QUERY__ENTITY, msgs); + case EjbPackage.QUERY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.QUERY__ENTITY: + return eContainer.eInverseRemove(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY__DESCRIPTION: + return getDescription(); + case EjbPackage.QUERY__EJB_QL: + return getEjbQL(); + case EjbPackage.QUERY__RETURN_TYPE_MAPPING: + return getReturnTypeMapping(); + case EjbPackage.QUERY__QUERY_METHOD: + return getQueryMethod(); + case EjbPackage.QUERY__ENTITY: + return getEntity(); + case EjbPackage.QUERY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.QUERY__EJB_QL: + return EJB_QL_EDEFAULT == null ? ejbQL != null : !EJB_QL_EDEFAULT.equals(ejbQL); + case EjbPackage.QUERY__RETURN_TYPE_MAPPING: + return isSetReturnTypeMapping(); + case EjbPackage.QUERY__QUERY_METHOD: + return queryMethod != null; + case EjbPackage.QUERY__ENTITY: + return getEntity() != null; + case EjbPackage.QUERY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.QUERY__EJB_QL: + setEjbQL((String)newValue); + return; + case EjbPackage.QUERY__RETURN_TYPE_MAPPING: + setReturnTypeMapping((ReturnTypeMapping)newValue); + return; + case EjbPackage.QUERY__QUERY_METHOD: + setQueryMethod((QueryMethod)newValue); + return; + case EjbPackage.QUERY__ENTITY: + setEntity((ContainerManagedEntity)newValue); + return; + case EjbPackage.QUERY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.QUERY__EJB_QL: + setEjbQL(EJB_QL_EDEFAULT); + return; + case EjbPackage.QUERY__RETURN_TYPE_MAPPING: + unsetReturnTypeMapping(); + return; + case EjbPackage.QUERY__QUERY_METHOD: + setQueryMethod((QueryMethod)null); + return; + case EjbPackage.QUERY__ENTITY: + setEntity((ContainerManagedEntity)null); + return; + case EjbPackage.QUERY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(", ejbQL: "); //$NON-NLS-1$ + result.append(ejbQL); + result.append(", returnTypeMapping: "); //$NON-NLS-1$ + if (returnTypeMappingESet) result.append(returnTypeMapping); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryMethodImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryMethodImpl.java new file mode 100644 index 000000000..fc8a4b0bc --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/QueryMethodImpl.java @@ -0,0 +1,373 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MethodElementKind; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; + +/** + * @generated + */ +public class QueryMethodImpl extends MethodElementImpl implements QueryMethod{ + + public QueryMethodImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getQueryMethod(); + } + +/** + * For Query methods, their enterprise bean must be derived. + * It is the Entity which contains the Query. + */ +public EnterpriseBean getEnterpriseBean() { + if (enterpriseBean == null) { + if (getQuery() != null) + enterpriseBean = getQuery().getEntity(); + } + return enterpriseBean; +} +/** + * Answer the method for which this method element applies in the HOME INTERFACE. + */ +protected Method getHomeMethod() { + Method result = null; + JavaClass javaClass = getEnterpriseBean().getHomeInterface(); + if (javaClass != null) { + String methodName = getName().trim(); + if (hasMethodParams()) + result = javaClass.getPublicMethodExtended(methodName, getMethodParams()); + else { + List methods = javaClass.getPublicMethodsExtendedNamed(methodName); + if (!methods.isEmpty()) + result = (Method) methods.get(0); + } + } + return result; +} +/** + * Answer the method for which this method element applies in the LOCAL HOME INTERFACE. + */ +protected Method getLocalHomeMethod() { + Method result = null; + JavaClass javaClass = getEnterpriseBean().getLocalHomeInterface(); + if (javaClass != null) { + String methodName = getName().trim(); + if (hasMethodParams()) + result = javaClass.getPublicMethodExtended(methodName, getMethodParams()); + else { + List methods = javaClass.getPublicMethodsExtendedNamed(methodName); + if (!methods.isEmpty()) + result = (Method) methods.get(0); + } + } + return result; +} + + + +protected void addMethodIfNotNull(List aList, Method aMethod) { + if (aMethod != null) + aList.add(aMethod); +} +/** + * This method will return a zero-length Method[] if there is no matching method + * on the home, local home, or bean class. It will return exactly one method + * for ejbSelect, and one or two methods for finders. The two method case occurs + * when the same method with the same signature exists on both the home and + * local home. + */ +public Method[] getMethods() { + List result = new ArrayList(2); + if (getName().startsWith("ejbSelect")) { //$NON-NLS-1$ + addMethodIfNotNull(result, getSelectMethod()); + } else { + addMethodIfNotNull(result, getHomeMethod()); + addMethodIfNotNull(result, getLocalHomeMethod()); + } + return (Method[])result.toArray(new Method[result.size()]); +} +/** + * Answer the method for which this method element applies in the HOME INTERFACE. + */ +protected Method getSelectMethod() { + Method result = null; + JavaClass javaClass = getEnterpriseBean().getEjbClass(); + String methodName = getName().trim(); + if (hasMethodParams()) + result = javaClass.getPublicMethodExtended(name, getMethodParams()); + else { + List methods = javaClass.getPublicMethodsExtendedNamed(methodName); + if (!methods.isEmpty()) + result = (Method) methods.iterator().next(); + } + return result; +} + /** + * @generated This field/method will be replaced during code generation + */ + public Query getQuery() { + if (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY) return null; + return (Query)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setQuery(Query newQuery) { + if (newQuery != eContainer || (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY && newQuery != null)) { + if (EcoreUtil.isAncestor(this, newQuery)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newQuery != null) + msgs = ((InternalEObject)newQuery).eInverseAdd(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newQuery, EjbPackage.QUERY_METHOD__QUERY, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY_METHOD__QUERY, newQuery, newQuery)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.QUERY_METHOD__QUERY: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.QUERY_METHOD__QUERY, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.QUERY_METHOD__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.QUERY_METHOD__QUERY: + return eBasicSetContainer(null, EjbPackage.QUERY_METHOD__QUERY, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.QUERY_METHOD__QUERY: + return eContainer.eInverseRemove(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY_METHOD__NAME: + return getName(); + case EjbPackage.QUERY_METHOD__PARMS: + return getParms(); + case EjbPackage.QUERY_METHOD__TYPE: + return getType(); + case EjbPackage.QUERY_METHOD__DESCRIPTION: + return getDescription(); + case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: + if (resolve) return getEnterpriseBean(); + return basicGetEnterpriseBean(); + case EjbPackage.QUERY_METHOD__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.QUERY_METHOD__QUERY: + return getQuery(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY_METHOD__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.QUERY_METHOD__PARMS: + return PARMS_EDEFAULT == null ? parms != null : !PARMS_EDEFAULT.equals(parms); + case EjbPackage.QUERY_METHOD__TYPE: + return isSetType(); + case EjbPackage.QUERY_METHOD__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: + return enterpriseBean != null; + case EjbPackage.QUERY_METHOD__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.QUERY_METHOD__QUERY: + return getQuery() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY_METHOD__NAME: + setName((String)newValue); + return; + case EjbPackage.QUERY_METHOD__PARMS: + setParms((String)newValue); + return; + case EjbPackage.QUERY_METHOD__TYPE: + setType((MethodElementKind)newValue); + return; + case EjbPackage.QUERY_METHOD__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: + setEnterpriseBean((EnterpriseBean)newValue); + return; + case EjbPackage.QUERY_METHOD__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.QUERY_METHOD__QUERY: + setQuery((Query)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.QUERY_METHOD__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.QUERY_METHOD__PARMS: + setParms(PARMS_EDEFAULT); + return; + case EjbPackage.QUERY_METHOD__TYPE: + unsetType(); + return; + case EjbPackage.QUERY_METHOD__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.QUERY_METHOD__ENTERPRISE_BEAN: + setEnterpriseBean((EnterpriseBean)null); + return; + case EjbPackage.QUERY_METHOD__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.QUERY_METHOD__QUERY: + setQuery((Query)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * You should use getClientTypeJavaClasses to ensure you pick up both home interfaces + * if they exist. + */ + public JavaClass getTypeJavaClass() { + JavaClass[] result = getClientTypeJavaClasses(); + if (result != null && result.length > 0) + return result[0]; + return null; + } + + /** + * Return an array of JavaClasses of all the interfaces or bean class that this method is presented + * to a client. If it is an ejbSelect... on the bean class will be returned and if + * it if a find both home interfaces will be returned if they exist. + * + * May return null. + */ + public JavaClass[] getClientTypeJavaClasses() { + if (getName() == null || getEnterpriseBean() == null) return null; + EnterpriseBean ejb = getEnterpriseBean(); + if (getName().startsWith(SELECT_PREFIX)) + return new JavaClass[]{ejb.getEjbClass()}; + //Next case is tougher since you could have both a remove and local client + //We want to return the home interface in this case. + if (getName().startsWith(FIND_PREFIX)) { + if (ejb.hasLocalClient() && !ejb.hasRemoteClient()) + return new JavaClass[]{getEnterpriseBean().getLocalHomeInterface()}; + if (ejb.hasRemoteClient() && !ejb.hasLocalClient()) + return new JavaClass[]{ejb.getHomeInterface()}; + if (ejb.hasRemoteClient() && ejb.hasLocalClient()) + return new JavaClass[]{ejb.getLocalHomeInterface(), ejb.getHomeInterface()}; + } + return null; + } +} + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipRoleAttributeFilter.java new file mode 100644 index 000000000..a4ae157b9 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipRoleAttributeFilter.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + +/** + * This filter will return a subset of the persistentAttributes (this includes inherited + * attributes) from the ContainerManagedEntityExtension that is passed as an + * argument to the filter method. + * It will remove any attribute that is not pointed to by an EjbRelationshipRole. + * Thus, the returned list will contain attributes (including inherited attributes) that only + * belong to roles. + * Creation date: (11/28/2000 6:46:08 PM) + * @author: Administrator + */ +public class RelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter { + private static RelationshipRoleAttributeFilter singleton; +/** + * Return the proper list of roles from cmpExt. + */ +protected java.util.List getSourceRoles(ContainerManagedEntity cmp) { + return getRelationshipRoles(cmp); +} +/** + * Insert the method's description here. + * Creation date: (11/28/2000 5:36:00 PM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RelationshipRoleAttributeFilter + */ +public static RelationshipRoleAttributeFilter singleton() { + if (singleton == null) + singleton = new RelationshipRoleAttributeFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipsImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipsImpl.java new file mode 100644 index 000000000..f37ccb228 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RelationshipsImpl.java @@ -0,0 +1,313 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.Relationships; + + +/** + * The relationships describes the relationships in which entity beans with container managed persistence participate. The relationships element contains an optional description; and a list of ejb-relation elements, which specify the container managed relationships. + */ +public class RelationshipsImpl extends EObjectImpl implements Relationships, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList ejbRelations = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public RelationshipsImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getRelationships(); + } + + /** + * @generated This field/method will be replaced during code generation + * The description is used by the ejb-jar file producer to provide text describing the collection of relationships. + * + * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EJBJar getEjbJar() { + if (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR) return null; + return (EJBJar)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEjbJar(EJBJar newEjbJar) { + if (newEjbJar != eContainer || (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR && newEjbJar != null)) { + if (EcoreUtil.isAncestor(this, newEjbJar)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newEjbJar != null) + msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__EJB_JAR, newEjbJar, newEjbJar)); + } + + /** + * @generated This field/method will be replaced during code generation + * A list of ejb-relation elements, which specify the container managed + * relationships. + */ + public EList getEjbRelations() { + if (ejbRelations == null) { + ejbRelations = new EObjectContainmentWithInverseEList(EJBRelation.class, this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST); + } + return ejbRelations; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.RELATIONSHIPS__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.RELATIONSHIPS__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + return ((InternalEList)getEjbRelations()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.RELATIONSHIPS__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs); + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + return ((InternalEList)getEjbRelations()).basicRemove(otherEnd, msgs); + case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.RELATIONSHIPS__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.RELATIONSHIPS__DESCRIPTION: + return getDescription(); + case EjbPackage.RELATIONSHIPS__EJB_JAR: + return getEjbJar(); + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + return getEjbRelations(); + case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.RELATIONSHIPS__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.RELATIONSHIPS__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + return ejbRelations != null && !ejbRelations.isEmpty(); + case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.RELATIONSHIPS__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.RELATIONSHIPS__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + getEjbRelations().clear(); + getEjbRelations().addAll((Collection)newValue); + return; + case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.RELATIONSHIPS__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.RELATIONSHIPS__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.RELATIONSHIPS__EJB_RELATIONS: + getEjbRelations().clear(); + return; + case EjbPackage.RELATIONSHIPS__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredLocalRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredLocalRelationshipRoleFilter.java new file mode 100644 index 000000000..40ca6b645 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredLocalRelationshipRoleFilter.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collections; + +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; + + +/** + * Insert the type's description here. + * Creation date: (10/15/2001 11:35:00 AM) + * @author: Administrator + */ +public class RequiredLocalRelationshipRoleFilter extends AbstractRequiredRelationshipRoleFilter { + private static RequiredLocalRelationshipRoleFilter singleton; +protected java.util.List getRolesToFilter(ContainerManagedEntity cmp) { + EjbModuleExtensionHelper modHelper = getEjbModuleExtHelper(cmp); + if(modHelper != null) + return modHelper.getLocalRelationshipRoles_cmp11(cmp); + return Collections.EMPTY_LIST; +} +/** + * Insert the method's description here. + * Creation date: (8/6/2001 11:27:25 AM) + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredLocalRelationshipRoleFilter + */ +public static RequiredLocalRelationshipRoleFilter singleton() { + if (singleton == null) + singleton = new RequiredLocalRelationshipRoleFilter(); + return singleton; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredRelationshipRoleFilter.java new file mode 100644 index 000000000..bd83244f8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RequiredRelationshipRoleFilter.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; + + +/** + * Insert the type's description here. Creation date: (8/6/2001 11:26:10 AM) + * @author: Administrator + */ +public class RequiredRelationshipRoleFilter extends ContainerManagedEntityFilter { + + private static RequiredRelationshipRoleFilter singleton; + + /** + * filter method comment. + */ + public List filter(ContainerManagedEntity cmp) { + List roles = new ArrayList(); + Iterator it = getRelationshipRoles(cmp).iterator(); + CommonRelationshipRole role; + while (it.hasNext()) { + role = (CommonRelationshipRole) it.next(); + if (shouldAddFilteredResult(role)) roles.add(role); + } + return roles; + } + + /** + * Return true if the multiplicity for @aRole is required. + */ + protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) { + return aRole.isRequired(); + } + + /** + * Insert the method's description here. Creation date: (8/6/2001 11:27:25 + * AM) + * + * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredRelationshipRoleFilter + */ + public static RequiredRelationshipRoleFilter singleton() { + if (singleton == null) singleton = new RequiredRelationshipRoleFilter(); + return singleton; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleShapeStrategy.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleShapeStrategy.java new file mode 100644 index 000000000..d75398e8b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleShapeStrategy.java @@ -0,0 +1,171 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy; + + +/** + * Insert the type's description here. + * Creation date: (11/6/2000 11:41:33 AM) + * @author: Administrator + */ +public abstract class RoleShapeStrategy implements IRoleShapeStrategy { + protected boolean busy = false; + protected CommonRelationshipRole role; + protected ArrayList visitedKeyTypes = new ArrayList(5); +/** + * FlattenedRoleShapeStrategy constructor comment. + */ +public RoleShapeStrategy(CommonRelationshipRole aRole) { + super(); + setRole(aRole); +} +protected String appendName(String fullName, String additionalName) { + return fullName + ATTRIBUTE_NAME_JOINER + additionalName; +} +protected boolean canContinue() { + return !busy && role.isForward() && role.getName() != null; +} +protected boolean canComputeNames() { + //return getRole().getOpposite() != null; + return true; +} +/** + * Insert the method's description here. + * Creation date: (11/16/00 9:19:27 PM) + * @return CommonRelationshipRole + */ +public CommonRelationshipRole getRole() { + return role; +} +/** + * Insert the method's description here. + * Creation date: (11/16/00 9:19:27 PM) + * @return CommonRelationshipRole + */ + +public boolean isFlat () { + return false; +} +public boolean isRound () { + return false; +} +/** + * Creates an appended name while uppercasing the first letter of the secondName. + */ +public static String makeJavaName(String firstName, String secondName) { + StringBuffer nameBuffer = new StringBuffer(firstName); + nameBuffer.append(Character.toUpperCase(secondName.charAt(0))); + for (int i = 1; i < secondName.length(); i++) + nameBuffer.append(secondName.charAt(i)); + return nameBuffer.toString(); +} +public void reconcileAttributes(List roleAttributes) { + if (canContinue()) { + busy = true; + String attributeName = getRole().getName(); + List computedNames = new ArrayList(); + if (canComputeNames()){ + visitedKeyTypes.clear(); + reconcileAttributes(getRole(), attributeName, roleAttributes, computedNames); + } + removeExtraAttributes(computedNames); + busy = false; + } +} +/** + * getFields method comment. + */ +protected abstract void reconcileAttributes(CommonRelationshipRole aRole, String attributeName, List aList, List computedNames); +/** + * Remove attributes from our role whose name is not contained in the list of + * @computedNames. Also, remove from the role's source EJB. + */ +protected void removeExtraAttributes(List computedNames) { + if (!getRole().getAttributes().isEmpty()) { + java.util.Iterator it = getRole().getAttributes().iterator(); + ContainerManagedEntity cmp = getRole().getSourceEntity(); + CMPAttribute attribute; + while (it.hasNext()) { + attribute = (CMPAttribute) it.next(); + if (computedNames.contains(attribute.getName())) + continue; + it.remove(); + cmp.getKeyAttributes().remove(attribute); + cmp.getPersistentAttributes().remove(attribute); + } + } +} +/** + * Insert the method's description here. + * Creation date: (11/16/00 9:19:27 PM) + * @param newRole com.ibm.ejs.models.base.extensions.ejbext.EjbRelationshipRole + */ +public void setRole(CommonRelationshipRole newRole) { + role = newRole; +} +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleSourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleSourceImpl.java new file mode 100644 index 000000000..02bd8553b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/RoleSourceImpl.java @@ -0,0 +1,330 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.RoleSource; + + +/** + * Designates the source of a role that participates in a relationship. A relationship-role-source element uniquely identifies an entity bean. + * @invariant The content of each role-source element shall refer to an existing entity bean, entity bean reference. + */ +public class RoleSourceImpl extends EObjectImpl implements RoleSource, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected ContainerManagedEntity entityBean = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public RoleSourceImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getRoleSource(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EJBRelationshipRole getRole() { + if (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE) return null; + return (EJBRelationshipRole)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRole(EJBRelationshipRole newRole) { + if (newRole != eContainer || (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE && newRole != null)) { + if (EcoreUtil.isAncestor(this, newRole)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newRole != null) + msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.ROLE_SOURCE__ROLE, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ROLE, newRole, newRole)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public ContainerManagedEntity getEntityBean() { + if (entityBean != null && entityBean.eIsProxy()) { + ContainerManagedEntity oldEntityBean = entityBean; + entityBean = (ContainerManagedEntity)eResolveProxy((InternalEObject)entityBean); + if (entityBean != oldEntityBean) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean)); + } + } + return entityBean; + } + + /** + * + * + * @generated + */ + public ContainerManagedEntity basicGetEntityBean() { + return entityBean; + } + + /** + * + * + * @generated + */ + public void setEntityBean(ContainerManagedEntity newEntityBean) { + ContainerManagedEntity oldEntityBean = entityBean; + entityBean = newEntityBean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ROLE_SOURCE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ROLE_SOURCE__ROLE: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.ROLE_SOURCE__ROLE, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.ROLE_SOURCE__ROLE: + return eBasicSetContainer(null, EjbPackage.ROLE_SOURCE__ROLE, msgs); + case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.ROLE_SOURCE__ROLE: + return eContainer.eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ROLE_SOURCE__DESCRIPTION: + return getDescription(); + case EjbPackage.ROLE_SOURCE__ROLE: + return getRole(); + case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: + if (resolve) return getEntityBean(); + return basicGetEntityBean(); + case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ROLE_SOURCE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.ROLE_SOURCE__ROLE: + return getRole() != null; + case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: + return entityBean != null; + case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ROLE_SOURCE__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.ROLE_SOURCE__ROLE: + setRole((EJBRelationshipRole)newValue); + return; + case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: + setEntityBean((ContainerManagedEntity)newValue); + return; + case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.ROLE_SOURCE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.ROLE_SOURCE__ROLE: + setRole((EJBRelationshipRole)null); + return; + case EjbPackage.ROLE_SOURCE__ENTITY_BEAN: + setEntityBean((ContainerManagedEntity)null); + return; + case EjbPackage.ROLE_SOURCE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SessionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SessionImpl.java new file mode 100644 index 000000000..be9841c06 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SessionImpl.java @@ -0,0 +1,670 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.SecurityIdentity; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Session; +import org.eclipse.jst.j2ee.ejb.SessionType; +import org.eclipse.jst.j2ee.ejb.TransactionType; + + +/** + * The session element declares an session bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a name assigned + * to the enterprise bean in the deployment description; the names of the session bean's home and remote interfaces, if any; the names of the session bean's local home and local interfaces, if any; the session bean's implementation class; the session bean's state management type; the session bean's transaction management type; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; and an optional declaration of the bean's resource environment references. The elements that are optional are "optional" in the sense that they are omitted when if lists represented by them are empty. + */ +public class SessionImpl extends EnterpriseBeanImpl implements Session, EnterpriseBean { + + /** + * The default value of the '{@link #getTransactionType() Transaction Type}' attribute. + * + * + * @see #getTransactionType() + * @generated + * @ordered + */ + protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT; + /** + * This is true if the Transaction Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transactionTypeESet = false; + + /** + * The default value of the '{@link #getSessionType() Session Type}' attribute. + * + * + * @see #getSessionType() + * @generated + * @ordered + */ + protected static final SessionType SESSION_TYPE_EDEFAULT = SessionType.STATEFUL_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected SessionType sessionType = SESSION_TYPE_EDEFAULT; + /** + * This is true if the Session Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean sessionTypeESet = false; + + /** + * The cached value of the '{@link #getServiceEndpoint() Service Endpoint}' reference. + * + * + * @see #getServiceEndpoint() + * @generated + * @ordered + */ + protected JavaClass serviceEndpoint = null; + + public SessionImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return EjbPackage.eINSTANCE.getSession(); + } + + public boolean isSession() { + return true; + } + /** + * @generated This field/method will be replaced during code generation + * The transaction-type element specifies an enterprise bean's transaction management type. + * + + */ + public TransactionType getTransactionType() { + return transactionType; + } + + /** + * + * + * @generated + */ + public void setTransactionType(TransactionType newTransactionType) { + TransactionType oldTransactionType = transactionType; + transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType; + boolean oldTransactionTypeESet = transactionTypeESet; + transactionTypeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransactionType() { + TransactionType oldTransactionType = transactionType; + boolean oldTransactionTypeESet = transactionTypeESet; + transactionType = TRANSACTION_TYPE_EDEFAULT; + transactionTypeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransactionType() { + return transactionTypeESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public SessionType getSessionType() { + return sessionType; + } + + /** + * + * + * @generated + */ + public void setSessionType(SessionType newSessionType) { + SessionType oldSessionType = sessionType; + sessionType = newSessionType == null ? SESSION_TYPE_EDEFAULT : newSessionType; + boolean oldSessionTypeESet = sessionTypeESet; + sessionTypeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, sessionType, !oldSessionTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetSessionType() { + SessionType oldSessionType = sessionType; + boolean oldSessionTypeESet = sessionTypeESet; + sessionType = SESSION_TYPE_EDEFAULT; + sessionTypeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, SESSION_TYPE_EDEFAULT, oldSessionTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetSessionType() { + return sessionTypeESet; + } + + /** + * + * + * @generated + */ + public JavaClass getServiceEndpoint() { + if (serviceEndpoint != null && serviceEndpoint.eIsProxy()) { + JavaClass oldServiceEndpoint = serviceEndpoint; + serviceEndpoint = (JavaClass)eResolveProxy((InternalEObject)serviceEndpoint); + if (serviceEndpoint != oldServiceEndpoint) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint)); + } + } + return serviceEndpoint; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetServiceEndpoint() { + return serviceEndpoint; + } + + /** + * + * + * @generated + */ + public void setServiceEndpoint(JavaClass newServiceEndpoint) { + JavaClass oldServiceEndpoint = serviceEndpoint; + serviceEndpoint = newServiceEndpoint; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.SESSION__EJB_JAR: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, EjbPackage.SESSION__EJB_JAR, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case EjbPackage.SESSION__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case EjbPackage.SESSION__EJB_JAR: + return eBasicSetContainer(null, EjbPackage.SESSION__EJB_JAR, msgs); + case EjbPackage.SESSION__SECURITY_IDENTITY: + return basicSetSecurityIdentity(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case EjbPackage.SESSION__EJB_JAR: + return eContainer.eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.SESSION__ICONS: + return getIcons(); + case EjbPackage.SESSION__DISPLAY_NAMES: + return getDisplayNames(); + case EjbPackage.SESSION__DESCRIPTIONS: + return getDescriptions(); + case EjbPackage.SESSION__SMALL_ICON: + return getSmallIcon(); + case EjbPackage.SESSION__LARGE_ICON: + return getLargeIcon(); + case EjbPackage.SESSION__DESCRIPTION: + return getDescription(); + case EjbPackage.SESSION__DISPLAY_NAME: + return getDisplayName(); + case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case EjbPackage.SESSION__RESOURCE_REFS: + return getResourceRefs(); + case EjbPackage.SESSION__EJB_REFS: + return getEjbRefs(); + case EjbPackage.SESSION__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case EjbPackage.SESSION__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case EjbPackage.SESSION__SERVICE_REFS: + return getServiceRefs(); + case EjbPackage.SESSION__NAME: + return getName(); + case EjbPackage.SESSION__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case EjbPackage.SESSION__EJB_CLASS: + if (resolve) return getEjbClass(); + return basicGetEjbClass(); + case EjbPackage.SESSION__HOME_INTERFACE: + if (resolve) return getHomeInterface(); + return basicGetHomeInterface(); + case EjbPackage.SESSION__REMOTE_INTERFACE: + if (resolve) return getRemoteInterface(); + return basicGetRemoteInterface(); + case EjbPackage.SESSION__EJB_JAR: + return getEjbJar(); + case EjbPackage.SESSION__SECURITY_IDENTITY: + return getSecurityIdentity(); + case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: + if (resolve) return getLocalHomeInterface(); + return basicGetLocalHomeInterface(); + case EjbPackage.SESSION__LOCAL_INTERFACE: + if (resolve) return getLocalInterface(); + return basicGetLocalInterface(); + case EjbPackage.SESSION__TRANSACTION_TYPE: + return getTransactionType(); + case EjbPackage.SESSION__SESSION_TYPE: + return getSessionType(); + case EjbPackage.SESSION__SERVICE_ENDPOINT: + if (resolve) return getServiceEndpoint(); + return basicGetServiceEndpoint(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.SESSION__ICONS: + return icons != null && !icons.isEmpty(); + case EjbPackage.SESSION__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case EjbPackage.SESSION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case EjbPackage.SESSION__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case EjbPackage.SESSION__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case EjbPackage.SESSION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case EjbPackage.SESSION__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case EjbPackage.SESSION__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case EjbPackage.SESSION__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case EjbPackage.SESSION__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case EjbPackage.SESSION__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case EjbPackage.SESSION__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case EjbPackage.SESSION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case EjbPackage.SESSION__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case EjbPackage.SESSION__EJB_CLASS: + return ejbClass != null; + case EjbPackage.SESSION__HOME_INTERFACE: + return homeInterface != null; + case EjbPackage.SESSION__REMOTE_INTERFACE: + return remoteInterface != null; + case EjbPackage.SESSION__EJB_JAR: + return getEjbJar() != null; + case EjbPackage.SESSION__SECURITY_IDENTITY: + return securityIdentity != null; + case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: + return localHomeInterface != null; + case EjbPackage.SESSION__LOCAL_INTERFACE: + return localInterface != null; + case EjbPackage.SESSION__TRANSACTION_TYPE: + return isSetTransactionType(); + case EjbPackage.SESSION__SESSION_TYPE: + return isSetSessionType(); + case EjbPackage.SESSION__SERVICE_ENDPOINT: + return serviceEndpoint != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.SESSION__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case EjbPackage.SESSION__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case EjbPackage.SESSION__DESCRIPTION: + setDescription((String)newValue); + return; + case EjbPackage.SESSION__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__NAME: + setName((String)newValue); + return; + case EjbPackage.SESSION__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case EjbPackage.SESSION__EJB_CLASS: + setEjbClass((JavaClass)newValue); + return; + case EjbPackage.SESSION__HOME_INTERFACE: + setHomeInterface((JavaClass)newValue); + return; + case EjbPackage.SESSION__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)newValue); + return; + case EjbPackage.SESSION__EJB_JAR: + setEjbJar((EJBJar)newValue); + return; + case EjbPackage.SESSION__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)newValue); + return; + case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)newValue); + return; + case EjbPackage.SESSION__LOCAL_INTERFACE: + setLocalInterface((JavaClass)newValue); + return; + case EjbPackage.SESSION__TRANSACTION_TYPE: + setTransactionType((TransactionType)newValue); + return; + case EjbPackage.SESSION__SESSION_TYPE: + setSessionType((SessionType)newValue); + return; + case EjbPackage.SESSION__SERVICE_ENDPOINT: + setServiceEndpoint((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case EjbPackage.SESSION__ICONS: + getIcons().clear(); + return; + case EjbPackage.SESSION__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case EjbPackage.SESSION__DESCRIPTIONS: + getDescriptions().clear(); + return; + case EjbPackage.SESSION__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case EjbPackage.SESSION__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case EjbPackage.SESSION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case EjbPackage.SESSION__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case EjbPackage.SESSION__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case EjbPackage.SESSION__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case EjbPackage.SESSION__EJB_REFS: + getEjbRefs().clear(); + return; + case EjbPackage.SESSION__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case EjbPackage.SESSION__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case EjbPackage.SESSION__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case EjbPackage.SESSION__SERVICE_REFS: + getServiceRefs().clear(); + return; + case EjbPackage.SESSION__NAME: + setName(NAME_EDEFAULT); + return; + case EjbPackage.SESSION__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case EjbPackage.SESSION__EJB_CLASS: + setEjbClass((JavaClass)null); + return; + case EjbPackage.SESSION__HOME_INTERFACE: + setHomeInterface((JavaClass)null); + return; + case EjbPackage.SESSION__REMOTE_INTERFACE: + setRemoteInterface((JavaClass)null); + return; + case EjbPackage.SESSION__EJB_JAR: + setEjbJar((EJBJar)null); + return; + case EjbPackage.SESSION__SECURITY_IDENTITY: + setSecurityIdentity((SecurityIdentity)null); + return; + case EjbPackage.SESSION__LOCAL_HOME_INTERFACE: + setLocalHomeInterface((JavaClass)null); + return; + case EjbPackage.SESSION__LOCAL_INTERFACE: + setLocalInterface((JavaClass)null); + return; + case EjbPackage.SESSION__TRANSACTION_TYPE: + unsetTransactionType(); + return; + case EjbPackage.SESSION__SESSION_TYPE: + unsetSessionType(); + return; + case EjbPackage.SESSION__SERVICE_ENDPOINT: + setServiceEndpoint((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (transactionType: "); //$NON-NLS-1$ + if (transactionTypeESet) result.append(transactionType); else result.append(""); //$NON-NLS-1$ + result.append(", sessionType: "); //$NON-NLS-1$ + if (sessionTypeESet) result.append(sessionType); else result.append(""); //$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.Session#setServiceEndpointName(java.lang.String) + */ + public void setServiceEndpointName(String serviceEndpointName) { + eSet(EjbPackage.eINSTANCE.getSession_ServiceEndpoint(), createClassRef(serviceEndpointName)); + } + /* + * @see EnterpriseBean#hasLocalClient() + */ + public boolean hasServiceEndpoint() { + return getServiceEndpoint() != null; + } + public String getServiceEndpointName() { + getServiceEndpoint(); + return serviceEndpoint == null ? null : serviceEndpoint.getQualifiedName(); + } +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SupertypeCMPAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SupertypeCMPAttributeFilter.java new file mode 100644 index 000000000..0d3041527 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/impl/SupertypeCMPAttributeFilter.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.impl; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; + + +/** + * Insert the type's description here. + * Creation date: (11/28/2000 6:54:26 PM) + * @author: Administrator + */ +public abstract class SupertypeCMPAttributeFilter extends ContainerManagedEntityFilter { +/** + * SupertypeCMPAttributeFilter constructor comment. + */ +public SupertypeCMPAttributeFilter() { + super(); +} +/** + * filter method comment. + */ +public List filter(ContainerManagedEntity cmp) { + ContainerManagedEntity supertype = null; + EjbModuleExtensionHelper extensionHelper = getEjbModuleExtHelper(cmp); + if(extensionHelper != null) + supertype = (ContainerManagedEntity)extensionHelper.getSuperType(cmp); + if (supertype == null) + return getSourceAttributes(cmp); + return filterUsingSupertype(cmp, supertype); +} +/** + * filter method comment. + */ +protected java.util.List filterUsingSupertype(ContainerManagedEntity cmp, ContainerManagedEntity supertype) { + ContainerManagedEntity superEntity = supertype; + List result = new ArrayList(); + Iterator it = getSourceAttributes(cmp).iterator(); + CMPAttribute attribute; + while (it.hasNext()) { + attribute = (CMPAttribute) it.next(); + if (!isSupertypeAttribute(superEntity, attribute)) + result.add(attribute); + } + return result; +} +/** + * Return the proper list of attributes from cmpExt. + */ +protected abstract java.util.List getSourceAttributes(ContainerManagedEntity cmp) ; +/** + * Return a boolean indicating whether anAttribute also exists in the superEntity. + */ +protected abstract boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) ; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPFieldDescriptor.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPFieldDescriptor.java new file mode 100644 index 000000000..a90b372b0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPFieldDescriptor.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +/** + * A parameter descriptor is used to describe a method parameter. + * It holds the parameter name and type. The type is held in + * Java readable form (not a signature). + */ +public class CMPFieldDescriptor { + private String fType = null; + private String fName = null; +/** + * JavaParameterDescriptor default constructor. + */ +public CMPFieldDescriptor() { + super(); +} +/** + * @return the parameter name. + */ +public String getName() { + return fName; +} +/** + * Returns the parameter type. + * @return The parameter type in Java readable form (not a signature) + */ +public String getType() { + return fType; +} +/** + * Sets the parameter name. + */ +public void setName(String newName) { + fName = (newName == null) ? null : newName.trim(); +} +/** + * Sets the parameter type. + * @param newType The parameter name in Java readable form (not a signature) + */ +public void setType(String newType) { + fType = (newType == null) ? null : newType.trim(); +} +/** + * Returns "type name". The {@link JavaParameterDescriptor#getType()} + * and {@link JavaParameterDescriptor#getName()} methods are used + * to build the result. + */ +public String toString() { + StringBuffer sb = new StringBuffer(100); + sb.append(getType()); + sb.append(' '); + sb.append(getName()); + return sb.toString(); +} +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPHelper.java new file mode 100644 index 000000000..b72fbc586 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPHelper.java @@ -0,0 +1,263 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.jem.java.Field; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaParameter; +import org.eclipse.jem.java.JavaVisibilityKind; +import org.eclipse.jem.java.Method; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; + + +public class CMPHelper { + + public static final String GET = "get"; //$NON-NLS-1$ + public static final String SET = "set"; //$NON-NLS-1$ + protected static Comparator methodComparator = new Comparator() { + /** + * @see Comparator#compare(Object, Object) + */ + public int compare(Object o1, Object o2) { + Method m1 = (Method) o1; + Method m2 = (Method) o2; + String s1 = m1.getName(); + String s2 = m2.getName(); + if (s1 == null) + return "".compareTo(s2); //$NON-NLS-1$ + return s1.compareTo(s2); + } + }; + + public interface CMPFieldExistTester { + boolean isExisting(Field aField); + boolean isExisting(Method aMethod); + }; + + protected CMPHelper() { + super(); + } + + /** + * For CMP 2.0 beans, the bean class is abstract and + * contains abstract get/set methods for the fields + * This infers the those fields based on the get/set methods + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass) { + return getAvailableCMP20FieldDescriptors(beanClass, null); + } + + /** + * For CMP 2.0 beans, the bean class is abstract and + * contains abstract get/set methods for the fields + * This infers the those fields based on the get/set methods + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) { + if (beanClass == null) + return Collections.EMPTY_LIST; + List result = new ArrayList(); + Map getters = new HashMap(); + List methods = beanClass.getPublicMethodsExtended(); + Collections.sort(methods, methodComparator); + for (int i = 0; i < methods.size(); i++) { + Method aMethod = (Method) methods.get(i); + if (isGetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic() && + (fieldTester == null || fieldTester.isExisting(aMethod))) + getters.put(getFieldName(aMethod), aMethod); + else if (isSetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic()) { + String fieldName = getFieldName(aMethod); + Method getter = (Method) getters.get(fieldName); + if (typesAgree(getter, aMethod)) { + String typeName = getReturnTypeName(getter); + if (typeName != null && (fieldTester == null || fieldTester.isExisting(getter))) + result.add(createFieldDescriptor(fieldName, typeName)); + } + } + } + return result; + } + + /** + * For CMP 1.1 beans, the list is simply the fields, extended, + * on the bean class + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass) { + return getAvailableCMP11FieldDescriptors(beanClass, null); + } + + /** + * For CMP 1.1 beans, the list is simply the fields, extended, + * on the bean class + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) { + if (beanClass == null) + return Collections.EMPTY_LIST; + List fields = beanClass.getFieldsExtended(); + List result = new ArrayList(); + for (int i = 0; i < fields.size(); i++) { + Field aField = (Field) fields.get(i); + if (!isPublic(aField) || aField.isStatic() || aField.isTransient() || + (fieldTester != null && !fieldTester.isExisting(aField))) + continue; + String name = aField.getName(); + String typeName = getTypeName(aField); + if (typeName != null && name != null) + result.add(createFieldDescriptor(name, typeName)); + } + return result; + } + + /** + * Get a list of available cmp fields for the CMP bean; if the bean + * is v1.1, this is the fields on the bean class; if it is 2.0, this + * is defined by the abstract get/set methods on the bean class + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean) { + return getAvailableCMPFieldDescriptors(cmpBean, null); + } + + /** + * Get a list of available cmp fields for the CMP bean; if the bean + * is v1.1, this is the fields on the bean class; if it is 2.0, this + * is defined by the abstract get/set methods on the bean class + * + * @return java.util.List of {@link CMPFieldDescriptor} + */ + public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean, CMPHelper.CMPFieldExistTester fieldTester) { + JavaClass beanClass = cmpBean.getEjbClass(); + if (beanClass == null) + return Collections.EMPTY_LIST; + switch(cmpBean.getVersionID()) { + case J2EEVersionConstants.EJB_1_0_ID: + case J2EEVersionConstants.EJB_1_1_ID: + return getAvailableCMP11FieldDescriptors(beanClass, fieldTester); + case J2EEVersionConstants.EJB_2_0_ID: + case J2EEVersionConstants.EJB_2_1_ID: default: + return getAvailableCMP20FieldDescriptors(beanClass, fieldTester); + } + } + + /** + * Does the method name start with "get", and is the method a zero arg + * method, that does not return void? + */ + protected static boolean isGetter(Method aMethod) { + String name = aMethod.getName(); + return name != null && + name.startsWith(GET) && + name.length() > 3 && + aMethod.listParametersWithoutReturn().length==0 && + !aMethod.isVoid(); + } + + + /** + * Does the method name start with "get", and is the method a one arg + * method, that is void + */ + protected static boolean isSetter(Method aMethod) { + String name = aMethod.getName(); + return name != null && + name.startsWith(SET) && + name.length() > 3 && + aMethod.listParametersWithoutReturn().length == 1 && + aMethod.isVoid(); + } + + protected static String getFieldName(Method aMethod) { + if (aMethod == null) + return null; + + return getFieldName(aMethod.getName()); + } + + public static String getFieldName(String methodName) { + if (methodName == null) + return null; + StringBuffer sb = new StringBuffer(methodName); + sb.delete(0, 3); + char lower = Character.toLowerCase(sb.charAt(0)); + sb.setCharAt(0, lower); + return sb.toString(); + } + + protected static String getReturnTypeName(Method getter) { + if (getter == null) + return null; + JavaHelpers retType = getter.getReturnType(); + return getTypeName(retType); + } + + protected static String getTypeName(Field aField) { + if (aField == null) + return null; + JavaHelpers type = (JavaHelpers)aField.getEType(); + return getTypeName(type); + } + + protected static String getTypeName(JavaHelpers helpers) { + if (helpers == null) + return null; + return helpers.getQualifiedName(); + } + /** + * Precondition: setter must take one parameter, and getter must return + * a type, not void + */ + protected static boolean typesAgree(Method getter, Method setter) { + if (getter == null || getter.isVoid() || setter == null) + return false; + + JavaParameter[] parameters = setter.listParametersWithoutReturn(); + if (parameters.length != 1) + return false; + + JavaParameter param = parameters[0]; + return param.getEType() != null && + param.getEType() == getter.getReturnType(); + } + + protected static CMPFieldDescriptor createFieldDescriptor(String name, String typeName) { + CMPFieldDescriptor desc = new CMPFieldDescriptor(); + desc.setName(name); + desc.setType(typeName); + return desc; + } + + protected static boolean isPublic(Field field) { + if (field == null) + return false; + return (JavaVisibilityKind.PUBLIC_LITERAL.getValue() == field.getJavaVisibility().getValue()); + } + + + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPKeySynchronizationAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPKeySynchronizationAdapter.java new file mode 100644 index 000000000..99633cfb8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/CMPKeySynchronizationAdapter.java @@ -0,0 +1,398 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Oct 24, 2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jem.java.Field; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaVisibilityKind; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EjbFactory; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.ejb.impl.ContainerManagedEntityImpl; + + +/** + * @author jlanuti + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class CMPKeySynchronizationAdapter extends AdapterImpl { + + public static final String ADAPTER_TYPE = CMPKeySynchronizationAdapter.class.getName(); + + private boolean initialized = false; + + protected ContainerManagedEntity cmp = null; + private boolean isUpdating = false; + private boolean isEnabled = true; + + /** + * Default constructor + */ + public CMPKeySynchronizationAdapter(ContainerManagedEntity cmp) { + super(); + this.cmp = cmp; + } + + /** + * If the keyAttributes list is empty, try to reflect + * the keyAttributes from the fields of the primaryKey class. + */ + public void initializeKeyAttributes() { + if(cmp == null || initialized) + return; + + Resource res = cmp.eResource(); + if(res == null) + return; + + boolean cachedIsModified = res.isModified(); + + try { + // Handle primkeyfield scenario + if (cmp.getPrimKeyField()!=null) + initializeForPrimKey(); + + // Handle compound key scenario + else + initializeForCompoundKey(); + } finally { + res.setModified(cachedIsModified); + } + + initialized = true; + } + + protected void initializeForPrimKey() { + // Ensure the key attributes list contains only the primKeyField attribute + if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(cmp.getPrimKeyField()))) + primKeyFieldChanged(cmp.getPrimKeyField()); + } + + protected void initializeForCompoundKey() { + List keys = getKeyAttributes(); + // clear key list + keys.clear(); + //ensure the key class is not null + JavaClass keyClass = cmp.getPrimaryKey(); + if (keyClass == null) + return; + keyClass.eAdapters().add(this); + + // reflect key fields into key attributes list + List keyFields = keyClass.getFieldsExtended(); + for (int i = 0; i < keyFields.size(); i++) { + Field field = (Field) keyFields.get(i); + if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields + CMPAttribute keyAttribute = cmp.getPersistentAttribute(field.getName()); + if (keyAttribute != null) + keys.add(keyAttribute); + } + } + } + + public void notifyChanged(Notification notification) { + if (isUpdating || !isEnabled) return; //we don't want to react to our own changes + try { + isUpdating = true; + EClass featureClass = ((EObject)notification.getNotifier()).eClass(); + if (EjbPackage.eINSTANCE.getContainerManagedEntity().equals(featureClass)) { + switch (notification.getFeatureID(ContainerManagedEntity.class)) { + // handle if cmp attribute is updated, added, removed + case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES : { + handleCMPAttributeEvent(notification); + break; + } + // handle the key attributes list is updated programatically + case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES : { + handleCMPAttributeEvent(notification); + break; + } + // handle if the key class is changed,added, removed + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY : { + handleKeyClassEvent(notification); + break; + } + // handle prim key field sets, adds, removes + case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD : { + handlePrimKeyFieldEvent(notification); + break; + } + } + } else if (EjbPackage.eINSTANCE.getCMPAttribute().equals(featureClass)) { + switch (notification.getFeatureID(CMPAttribute.class)) { + // handle a set or change of an attribute name + case (EjbPackage.CMP_ATTRIBUTE__NAME) : { + handleCMPAttributeRenameEvent((CMPAttribute)notification.getNotifier(), notification.getOldValue()); + break; + } + } + } + } finally { + // restore initial notification state + isUpdating = false; + } + } + + /** + * @param attribute + */ + private void handleCMPAttributeRenameEvent(CMPAttribute attribute, Object oldValue) { + // if renamed attribute was in key and is not anymore, remove it from key list + if (getKeyAttributes().contains(attribute)) { + if (!isAttributeKeyClassField(attribute.getName())) + removeKeyAttribute(attribute,(String)oldValue); + } + // if renamed attribute is now part of the key, add it to the key list + else + attributeAdded(attribute); + } + + /** + * @param notification + */ + private void handlePrimKeyFieldEvent(Notification notification) { + EObject newPrimKeyField = (EObject)notification.getNewValue(); + cmp.setPrimKeyField((CMPAttribute)newPrimKeyField); + // if primKeyField is removed or a proxy, recompute key attributes based on key class + if (newPrimKeyField == null || newPrimKeyField.eIsProxy()) { + CMPAttribute primField = (CMPAttribute)newPrimKeyField; + if (primField!=null && primField.getName() == null) { + primField.setName(((InternalEObject)primField).eProxyURI().toString()); + makePrimKeyFieldProxy(primField.getName()); + } + removeAllKeyAttributes(); + initialized = false; + initializeKeyAttributes(); + } + // Ensure the key attributes list contains only the primKeyField attribute + else if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(newPrimKeyField))) { + primKeyFieldChanged(newPrimKeyField); + } + + } + + /** + * @param notification + */ + private void handleKeyClassEvent(Notification notification) { + // if primkey null or proxy, clear key fields and reinitialize if key class not null + if (cmp.getPrimKeyField()==null || cmp.getPrimKeyField().eIsProxy()) { + keyClassChanged(); + } + // if primkey is not null, then do nothing + + } + + /** + * @param notification + */ + private void handleCMPAttributeEvent(Notification notification) { + int eventType = notification.getEventType(); + // handle a CMPAttribute added + if (eventType == Notification.ADD) { + attributeAdded((CMPAttribute)notification.getNewValue()); + } + // handle a CMPAttribute removed + else if (eventType == Notification.REMOVE) { + CMPAttribute attribute = (CMPAttribute)notification.getOldValue(); + // remove this adapter from the deleted attribute + attribute.eAdapters().remove(this); + removeKeyAttribute(attribute, attribute.getName()); + + } + } + + protected void removeKeyAttribute(CMPAttribute attribute, String oldName) { + + // if attribute was a key attribute it will be removed, otherwise do nothing + getKeyAttributes().remove(attribute); + + // if it is the prim key attribute, then make the prim key attribute a proxy + if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().equals(attribute)) { + makePrimKeyFieldProxy(oldName); + } + + } + + public void makePrimKeyFieldProxy(String oldName) { + if (cmp.getPrimKeyField() == null) return; + cmp.setPrimKeyField(EjbFactory.eINSTANCE.createCMPAttribute()); + cmp.getPrimKeyField().setName(oldName); + ((InternalEObject)cmp.getPrimKeyField()).eSetProxyURI(URI.createURI(oldName)); + + } + + protected void removeAllKeyAttributes() { + // clear key attributes list on cmp + getKeyAttributes().clear(); + } + + protected void addKeyAttribute(CMPAttribute attribute) { + + CMPAttribute primKeyField = cmp.getPrimKeyField(); + // if prim key is null add attribute to key list + if (primKeyField==null || primKeyField.eIsProxy()) { + if (!getKeyAttributes().contains(attribute)) + getKeyAttributes().add(attribute); + // if att is only key att, and type is the key class type, set the prim key field + if (getKeyAttributes().size()==1 && attribute.getType().equals(cmp.getPrimaryKey())) + cmp.setPrimKeyField(attribute); + } + // if primkey set + primkeyfield is the new attribute ensure its the only one + else if (primKeyField.equals(attribute)) { + if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(attribute))) { + getKeyAttributes().clear(); + getKeyAttributes().add(attribute); + } + } + // if primkey set,new attribute not prim key, key atts > 1, remove primkey field + else { + cmp.setPrimKeyField(null); + if (!getKeyAttributes().contains(attribute)) + getKeyAttributes().add(attribute); + } + } + + protected void attributeAdded(CMPAttribute attribute) { + //Make sure cmp key adapters are initialized if needed + cmp.getKeyAttributes(); + + // add this as a listener to name changes on this attribute + if (!attribute.eAdapters().contains(this)) + attribute.eAdapters().add(this); + + if (attribute.getName() ==null) return; + // add it to the key list if applicable and sort the key list + if (isAttributeKeyClassField(attribute.getName())) { + addKeyAttribute(attribute); + sortKeyAttributeList(); + } + // if new attribute name is now prim key name, fix up prim key field + else if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().eIsProxy() && attribute.getName().equals(cmp.getPrimKeyField().getName())) { + cmp.setPrimKeyField(attribute); + primKeyFieldChanged(attribute); + } + } + + + /** + * Is the cmp attribute also a field in the key class? + */ + protected boolean isAttributeKeyClassField(String attributeName) { + // ensure key class is not null + JavaClass keyClass = cmp.getPrimaryKey(); + if (keyClass == null) + return false; + // see if the attribute name matchs any of the reflected key class public field names + List keyFields = keyClass.getFieldsExtended(); + for (int i = 0; i < keyFields.size(); i++) { + Field field = (Field) keyFields.get(i); + if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { + if (field.getName().equals(attributeName)) + return true; + } + } + return false; + } + + /** + * Sort the list of the key attributes to match the order of the key class + */ + private void sortKeyAttributeList() { + + List result = new ArrayList(); + JavaClass keyClass = cmp.getPrimaryKey(); + if (keyClass == null) return; + List keyFields = keyClass.getFieldsExtended(); + List currentKeys = getKeyAttributes(); + + // create a new list of the attributes in order of key class fields. + for (int i = 0; i < keyFields.size(); i++) { + Field field = (Field) keyFields.get(i); + if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields + for (int j=0; j 1) { + //remove one force a disconnect + getRelationship().getCommonRoles().remove(0); + } + } + /** + * Add this Adapter to @aRole and the ContainerManagedEntity + * that the ContainerManagedEntityExtension container is pointing to. + * This only works if @aRole is contained. + */ + protected void addAdaptors(CommonRelationshipRole aRole) { + removeAdaptors(aRole); //to ensure this adapter is not added twice + aRole.eAdapters().add(this); + ContainerManagedEntity cmp = aRole.getSourceEntity(); + if (cmp != null) + cmp.eAdapters().add(this); + } + /** + * Remove this Adapter from @aRole and the ContainerManagedEntity + * that the ContainerManagedEntityExtension container is pointing to. + * This only works if @aRole is contained. + */ + protected void removeAdaptors(CommonRelationshipRole aRole) { + aRole.eAdapters().remove(this); + ContainerManagedEntity cmp = aRole.getSourceEntity(); + if (cmp != null) + cmp.eAdapters().remove(this); + } + protected void addedRole(CommonRelationshipRole aRole) { + addAdaptors(aRole); + if ((getRelationship().eContainer() != null) && rolesFullyReflected()) + reconcileRoleAttributes(); + } + protected boolean rolesFullyReflected() { + List roles = getRelationship().getCommonRoles(); + if (roles.isEmpty()) + return false; + CommonRelationshipRole role = null; + for (int i = 0; i < roles.size(); i++) { + role = (CommonRelationshipRole) roles.get(i); + if (role.getSourceEntity() == null) + return false; + } + return true; + } + + protected void removedRole(CommonRelationshipRole aRole) { + removeAdaptors(aRole); + if (getRelationship().eContainer() != null) { + aRole.reconcileAttributes(); + reconcileRoleAttributes(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.emf.common.notify.impl.AdapterImpl#setTarget(org.eclipse.emf.common.notify.Notifier) + */ + public void setTarget(Notifier notifier) { + //Only set the target if it is a CommonRelationship + if (notifier == null || notifier instanceof CommonRelationship) + super.setTarget(notifier); + } + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/ConvertedEJBAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/ConvertedEJBAdapter.java new file mode 100644 index 000000000..28cde94ab --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/ConvertedEJBAdapter.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import org.eclipse.emf.common.notify.impl.AdapterImpl; + +public class ConvertedEJBAdapter extends AdapterImpl { + + public static final String ADAPTER_KEY = "ConvertedEJBAdpater"; //$NON-NLS-1$ + public static final int VERSION_1_0 = 1; + + protected int version = -1; + protected boolean readOnly = false; + + + /** + * Constructor for ConvertedEJBAdapter. + */ + public ConvertedEJBAdapter() { + super(); + } + + /** + * Gets the version. This will be one of the static constants. + * @return Returns a int + */ + public int getVersion() { + return version; + } + + /** + * Sets the version. This should be one of the static constants. + * @param version The version to set + */ + public void setVersion(int version) { + this.version = version; + } + + /** + * Gets the readOnly. + * @return Returns a boolean + */ + public boolean isReadOnly() { + return readOnly; + } + + /** + * Sets the readOnly. + * @param readOnly The readOnly to set + */ + public void setReadOnly(boolean readOnly) { + this.readOnly = readOnly; + } + + public boolean isFromVersion1_0() { + return version == VERSION_1_0; + } + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBAttributeMaintenanceFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBAttributeMaintenanceFactoryImpl.java new file mode 100644 index 000000000..65ac195d1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBAttributeMaintenanceFactoryImpl.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.wst.common.emf.utilities.ExtendedEcoreUtil; + + +public class EJBAttributeMaintenanceFactoryImpl extends EjbAdapterFactory { + public static final String ADAPTER_KEY = "EJBAttributeMaintenance"; //$NON-NLS-1$ + + public EJBAttributeMaintenanceFactoryImpl() { + super(); + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.ejb.util.EjbAdapterFactory#createAdapter(org.eclipse.emf.common.notify.Notifier) + */ + public Adapter createAdapter(Notifier target) { + Adapter targetAdapter = (Adapter) modelSwitch.doSwitch((EObject)target); + return ExtendedEcoreUtil.createAdapterForLoading(targetAdapter, (EObject) target); + } + + + public Adapter createEJBRelationAdapter() { + return new EJBRelationAttributeMaintenanceAdapter(); + } + + public Adapter createRelationshipsAdapter() { + return new RelationshipsAttributeMaintenanceAdapter(); + } + + public boolean isFactoryForType(Object type) { + return ADAPTER_KEY == type; + } +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBRelationAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBRelationAttributeMaintenanceAdapter.java new file mode 100644 index 000000000..08117bc93 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EJBRelationAttributeMaintenanceAdapter.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import org.eclipse.emf.ecore.EObject; + +public class EJBRelationAttributeMaintenanceAdapter extends CommonRelationshipAttributeMaintenanceAdapter { + /** + * Constructor for EJBRelationAttributeMaintenanceAdapter. + * @param aRelationship + */ + public EJBRelationAttributeMaintenanceAdapter() { + super(); + } + + /** + * @see org.eclipse.jst.j2ee.internal.ejb.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipRolesSF(EObject) + */ + protected boolean isRelationshipRolesSF(EObject sf) { + return sf == EJB_PACK.getEJBRelation_RelationshipRoles(); + } + + /** + * @see org.eclipse.jst.j2ee.internal.ejb.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipsSF(EObject) + */ + protected boolean isRelationshipsSF(EObject sf) { + return sf == EJB_PACK.getRelationships_EjbRelations(); + } + + /** + * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(Object) + */ + public boolean isAdapterForType(Object type) { + return EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY == type; + } + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbAdapterFactory.java new file mode 100644 index 000000000..86d2bddec --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbAdapterFactory.java @@ -0,0 +1,607 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.ETypedElement; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.Relationships; +import org.eclipse.jst.j2ee.ejb.RoleSource; +import org.eclipse.jst.j2ee.ejb.Session; + +public class EjbAdapterFactory extends AdapterFactoryImpl { + protected static EjbPackage modelPackage; + public EjbAdapterFactory() { + if (modelPackage == null) { + modelPackage = (EjbPackage) EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject) type).eClass().eContainer() == modelPackage; + } + return false; + } + protected EjbSwitch sw = new EjbSwitch() { + public Object caseMethodPermission(MethodPermission object) { + return createMethodPermissionAdapter(); + } + public Object caseAssemblyDescriptor(AssemblyDescriptor object) { + return createAssemblyDescriptorAdapter(); + } + public Object caseMethodTransaction(MethodTransaction object) { + return createMethodTransactionAdapter(); + } + public Object caseEnterpriseBean(EnterpriseBean object) { + return createEnterpriseBeanAdapter(); + } + public Object caseEntity(Entity object) { + return createEntityAdapter(); + } + public Object caseContainerManagedEntity(ContainerManagedEntity object) { + return createContainerManagedEntityAdapter(); + } + public Object caseCMPAttribute(CMPAttribute object) { + return createCMPAttributeAdapter(); + } + public Object caseCMRField(CMRField object) { + return createCMRFieldAdapter(); + } + public Object caseEJBRelationshipRole(EJBRelationshipRole object) { + return createEJBRelationshipRoleAdapter(); + } + public Object caseEJBRelation(EJBRelation object) { + return createEJBRelationAdapter(); + } + public Object caseRelationships(Relationships object) { + return createRelationshipsAdapter(); + } + public Object caseEJBJar(EJBJar object) { + return createEJBJarAdapter(); + } + public Object caseRoleSource(RoleSource object) { + return createRoleSourceAdapter(); + } + public Object caseQuery(Query object) { + return createQueryAdapter(); + } + public Object caseQueryMethod(QueryMethod object) { + return createQueryMethodAdapter(); + } + public Object caseMethodElement(MethodElement object) { + return createMethodElementAdapter(); + } + public Object caseExcludeList(ExcludeList object) { + return createExcludeListAdapter(); + } + public Object caseSession(Session object) { + return createSessionAdapter(); + } + public Object caseMessageDriven(MessageDriven object) { + return createMessageDrivenAdapter(); + } + public Object caseMessageDrivenDestination(MessageDrivenDestination object) { + return createMessageDrivenDestinationAdapter(); + } + public Object caseActivationConfig(ActivationConfig object) { + return createActivationConfigAdapter(); + } + public Object caseActivationConfigProperty(ActivationConfigProperty object) { + return createActivationConfigPropertyAdapter(); + } + public Object caseEJBMethodCategory(EJBMethodCategory object) { + return createEJBMethodCategoryAdapter(); + } + public Object caseEClass(EClass object) { + return createEClassAdapter(); + } + public Object caseEAttribute(EAttribute object) { + return createEAttributeAdapter(); + } + public Object caseEStructuralFeature(EStructuralFeature object) { + return createEStructuralFeatureAdapter(); + } + public Object caseEClassifier(EClassifier object) { + return createEClassifierAdapter(); + } + public Object caseEModelElement(EModelElement object) { + return createEModelElementAdapter(); + } + public Object caseENamedElement(ENamedElement object) { + return createENamedElementAdapter(); + } + }; + public Adapter createAdapter(Notifier target) { + return (Adapter) sw.doSwitch((EObject) target); + } + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases + * anyway. + */ + public Adapter createMethodPermissionAdapter() { + return null; + } + public Adapter createAssemblyDescriptorAdapter() { + return null; + } + public Adapter createMethodTransactionAdapter() { + return null; + } + public Adapter createEnterpriseBeanAdapter() { + return null; + } + public Adapter createEntityAdapter() { + return null; + } + public Adapter createContainerManagedEntityAdapter() { + return null; + } + public Adapter createCMPAttributeAdapter() { + return null; + } + public Adapter createCMRFieldAdapter() { + return null; + } + public Adapter createEJBRelationshipRoleAdapter() { + return null; + } + public Adapter createEJBRelationAdapter() { + return null; + } + public Adapter createRelationshipsAdapter() { + return null; + } + public Adapter createEJBJarAdapter() { + return null; + } + public Adapter createRoleSourceAdapter() { + return null; + } + public Adapter createQueryAdapter() { + return null; + } + public Adapter createQueryMethodAdapter() { + return null; + } + public Adapter createMethodElementAdapter() { + return null; + } + public Adapter createExcludeListAdapter() { + return null; + } + public Adapter createSessionAdapter() { + return null; + } + public Adapter createMessageDrivenAdapter() { + return null; + } + public Adapter createMessageDrivenDestinationAdapter() { + return null; + } + public Adapter createEJBMethodCategoryAdapter() { + return null; + } + public Adapter createEClassAdapter() { + return null; + } + public Adapter createEAttributeAdapter() { + return null; + } + public Adapter createEStructuralFeatureAdapter() { + return null; + } + public Adapter createEClassifierAdapter() { + return null; + } + public Adapter createEModelElementAdapter() { + return null; + } + public Adapter createENamedElementAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEObjectAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected EjbSwitch modelSwitch = new EjbSwitch() { + public Object caseContainerManagedEntity(ContainerManagedEntity object) { + return createContainerManagedEntityAdapter(); + } + public Object caseMethodPermission(MethodPermission object) { + return createMethodPermissionAdapter(); + } + public Object caseAssemblyDescriptor(AssemblyDescriptor object) { + return createAssemblyDescriptorAdapter(); + } + public Object caseMethodTransaction(MethodTransaction object) { + return createMethodTransactionAdapter(); + } + public Object caseSession(Session object) { + return createSessionAdapter(); + } + public Object caseEntity(Entity object) { + return createEntityAdapter(); + } + public Object caseEnterpriseBean(EnterpriseBean object) { + return createEnterpriseBeanAdapter(); + } + public Object caseEJBMethodCategory(EJBMethodCategory object) { + return createEJBMethodCategoryAdapter(); + } + public Object caseEJBJar(EJBJar object) { + return createEJBJarAdapter(); + } + public Object caseMethodElement(MethodElement object) { + return createMethodElementAdapter(); + } + public Object caseCMPAttribute(CMPAttribute object) { + return createCMPAttributeAdapter(); + } + public Object caseRelationships(Relationships object) { + return createRelationshipsAdapter(); + } + public Object caseQuery(Query object) { + return createQueryAdapter(); + } + public Object caseEJBRelation(EJBRelation object) { + return createEJBRelationAdapter(); + } + public Object caseEJBRelationshipRole(EJBRelationshipRole object) { + return createEJBRelationshipRoleAdapter(); + } + public Object caseRoleSource(RoleSource object) { + return createRoleSourceAdapter(); + } + public Object caseCMRField(CMRField object) { + return createCMRFieldAdapter(); + } + public Object caseMessageDriven(MessageDriven object) { + return createMessageDrivenAdapter(); + } + public Object caseMessageDrivenDestination(MessageDrivenDestination object) { + return createMessageDrivenDestinationAdapter(); + } + public Object caseExcludeList(ExcludeList object) { + return createExcludeListAdapter(); + } + public Object caseQueryMethod(QueryMethod object) { + return createQueryMethodAdapter(); + } + public Object caseActivationConfigProperty(ActivationConfigProperty object) { + return createActivationConfigPropertyAdapter(); + } + public Object caseActivationConfig(ActivationConfig object) { + return createActivationConfigAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return createJNDIEnvRefsGroupAdapter(); + } + public Object caseEModelElement(EModelElement object) { + return createEModelElementAdapter(); + } + public Object caseENamedElement(ENamedElement object) { + return createENamedElementAdapter(); + } + public Object caseETypedElement(ETypedElement object) { + return createETypedElementAdapter(); + } + public Object caseEStructuralFeature(EStructuralFeature object) { + return createEStructuralFeatureAdapter(); + } + public Object caseEAttribute(EAttribute object) { + return createEAttributeAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter) modelSwitch.doSwitch((EObject) target); + } + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases + * anyway. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMethodPermissionAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAssemblyDescriptorAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMethodTransactionAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEnterpriseBeanAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEntityAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createContainerManagedEntityAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createCMPAttributeAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createCMRFieldAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEJBRelationshipRoleAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEJBRelationAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createRelationshipsAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEJBJarAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createRoleSourceAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createQueryAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createQueryMethodAdapterGen() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.ejb.ActivationConfigProperty Activation Config Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.ejb.ActivationConfigProperty + * @generated + */ + public Adapter createActivationConfigPropertyAdapter() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.ejb.ActivationConfig Activation Config}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.ejb.ActivationConfig + * @generated + */ + public Adapter createActivationConfigAdapter() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup + * @generated + */ + public Adapter createJNDIEnvRefsGroupAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMethodElementAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createExcludeListAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSessionAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMessageDrivenAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMessageDrivenDestinationAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEJBMethodCategoryAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEAttributeAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEStructuralFeatureAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createEModelElementAdapterGen() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createENamedElementAdapterGen() { + return null; + } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypedElement ETyped Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.ecore.ETypedElement + * @generated + */ + public Adapter createETypedElementAdapter() { + return null; + } +} //EjbAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbSwitch.java new file mode 100644 index 000000000..90c6300d2 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/EjbSwitch.java @@ -0,0 +1,743 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.ETypedElement; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; +import org.eclipse.jst.j2ee.ejb.CMPAttribute; +import org.eclipse.jst.j2ee.ejb.CMRField; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBMethodCategory; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.Entity; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; +import org.eclipse.jst.j2ee.ejb.Query; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.Relationships; +import org.eclipse.jst.j2ee.ejb.RoleSource; +import org.eclipse.jst.j2ee.ejb.Session; + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.ejb.EjbPackage + * @generated + */ +public class EjbSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static EjbPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public EjbSwitch() { + if (modelPackage == null) { + modelPackage = EjbPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case EjbPackage.CONTAINER_MANAGED_ENTITY: { + ContainerManagedEntity containerManagedEntity = (ContainerManagedEntity)theEObject; + Object result = caseContainerManagedEntity(containerManagedEntity); + if (result == null) result = caseEntity(containerManagedEntity); + if (result == null) result = caseEnterpriseBean(containerManagedEntity); + if (result == null) result = caseJNDIEnvRefsGroup(containerManagedEntity); + if (result == null) result = caseCompatibilityDescriptionGroup(containerManagedEntity); + if (result == null) result = caseDescriptionGroup(containerManagedEntity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.METHOD_PERMISSION: { + MethodPermission methodPermission = (MethodPermission)theEObject; + Object result = caseMethodPermission(methodPermission); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.ASSEMBLY_DESCRIPTOR: { + AssemblyDescriptor assemblyDescriptor = (AssemblyDescriptor)theEObject; + Object result = caseAssemblyDescriptor(assemblyDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.METHOD_TRANSACTION: { + MethodTransaction methodTransaction = (MethodTransaction)theEObject; + Object result = caseMethodTransaction(methodTransaction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.SESSION: { + Session session = (Session)theEObject; + Object result = caseSession(session); + if (result == null) result = caseEnterpriseBean(session); + if (result == null) result = caseJNDIEnvRefsGroup(session); + if (result == null) result = caseCompatibilityDescriptionGroup(session); + if (result == null) result = caseDescriptionGroup(session); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.ENTITY: { + Entity entity = (Entity)theEObject; + Object result = caseEntity(entity); + if (result == null) result = caseEnterpriseBean(entity); + if (result == null) result = caseJNDIEnvRefsGroup(entity); + if (result == null) result = caseCompatibilityDescriptionGroup(entity); + if (result == null) result = caseDescriptionGroup(entity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.EJB_METHOD_CATEGORY: { + EJBMethodCategory ejbMethodCategory = (EJBMethodCategory)theEObject; + Object result = caseEJBMethodCategory(ejbMethodCategory); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.EJB_JAR: { + EJBJar ejbJar = (EJBJar)theEObject; + Object result = caseEJBJar(ejbJar); + if (result == null) result = caseCompatibilityDescriptionGroup(ejbJar); + if (result == null) result = caseDescriptionGroup(ejbJar); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.METHOD_ELEMENT: { + MethodElement methodElement = (MethodElement)theEObject; + Object result = caseMethodElement(methodElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.CMP_ATTRIBUTE: { + CMPAttribute cmpAttribute = (CMPAttribute)theEObject; + Object result = caseCMPAttribute(cmpAttribute); + if (result == null) result = caseEAttribute(cmpAttribute); + if (result == null) result = caseEStructuralFeature(cmpAttribute); + if (result == null) result = caseETypedElement(cmpAttribute); + if (result == null) result = caseENamedElement(cmpAttribute); + if (result == null) result = caseEModelElement(cmpAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.RELATIONSHIPS: { + Relationships relationships = (Relationships)theEObject; + Object result = caseRelationships(relationships); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.QUERY: { + Query query = (Query)theEObject; + Object result = caseQuery(query); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.EJB_RELATION: { + EJBRelation ejbRelation = (EJBRelation)theEObject; + Object result = caseEJBRelation(ejbRelation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.EJB_RELATIONSHIP_ROLE: { + EJBRelationshipRole ejbRelationshipRole = (EJBRelationshipRole)theEObject; + Object result = caseEJBRelationshipRole(ejbRelationshipRole); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.ROLE_SOURCE: { + RoleSource roleSource = (RoleSource)theEObject; + Object result = caseRoleSource(roleSource); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.CMR_FIELD: { + CMRField cmrField = (CMRField)theEObject; + Object result = caseCMRField(cmrField); + if (result == null) result = caseCMPAttribute(cmrField); + if (result == null) result = caseEAttribute(cmrField); + if (result == null) result = caseEStructuralFeature(cmrField); + if (result == null) result = caseETypedElement(cmrField); + if (result == null) result = caseENamedElement(cmrField); + if (result == null) result = caseEModelElement(cmrField); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.MESSAGE_DRIVEN: { + MessageDriven messageDriven = (MessageDriven)theEObject; + Object result = caseMessageDriven(messageDriven); + if (result == null) result = caseEnterpriseBean(messageDriven); + if (result == null) result = caseJNDIEnvRefsGroup(messageDriven); + if (result == null) result = caseCompatibilityDescriptionGroup(messageDriven); + if (result == null) result = caseDescriptionGroup(messageDriven); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.MESSAGE_DRIVEN_DESTINATION: { + MessageDrivenDestination messageDrivenDestination = (MessageDrivenDestination)theEObject; + Object result = caseMessageDrivenDestination(messageDrivenDestination); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.EXCLUDE_LIST: { + ExcludeList excludeList = (ExcludeList)theEObject; + Object result = caseExcludeList(excludeList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.QUERY_METHOD: { + QueryMethod queryMethod = (QueryMethod)theEObject; + Object result = caseQueryMethod(queryMethod); + if (result == null) result = caseMethodElement(queryMethod); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.ACTIVATION_CONFIG_PROPERTY: { + ActivationConfigProperty activationConfigProperty = (ActivationConfigProperty)theEObject; + Object result = caseActivationConfigProperty(activationConfigProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EjbPackage.ACTIVATION_CONFIG: { + ActivationConfig activationConfig = (ActivationConfig)theEObject; + Object result = caseActivationConfig(activationConfig); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Container Managed Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Container Managed Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseContainerManagedEntity(ContainerManagedEntity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Method Permission'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Method Permission'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMethodPermission(MethodPermission object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Assembly Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Assembly Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseAssemblyDescriptor(AssemblyDescriptor object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Method Transaction'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Method Transaction'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMethodTransaction(MethodTransaction object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Session'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Session'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSession(Session object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEntity(Entity object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Enterprise Bean'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Enterprise Bean'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEnterpriseBean(EnterpriseBean object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Method Category'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Method Category'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBMethodCategory(EJBMethodCategory object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Jar'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Jar'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBJar(EJBJar object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Method Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Method Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMethodElement(MethodElement object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'CMP Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'CMP Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCMPAttribute(CMPAttribute object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Relationships'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Relationships'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRelationships(Relationships object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Query'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Query'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQuery(Query object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Relation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Relation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBRelation(EJBRelation object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Relationship Role'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Relationship Role'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBRelationshipRole(EJBRelationshipRole object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Role Source'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Role Source'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRoleSource(RoleSource object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'CMR Field'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'CMR Field'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCMRField(CMRField object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Driven'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Driven'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageDriven(MessageDriven object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Driven Destination'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Driven Destination'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageDrivenDestination(MessageDrivenDestination object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Exclude List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Exclude List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseExcludeList(ExcludeList object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Query Method'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Query Method'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQueryMethod(QueryMethod object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Activation Config Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Activation Config Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseActivationConfigProperty(ActivationConfigProperty object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Activation Config'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Activation Config'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseActivationConfig(ActivationConfig object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EModel Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EModel Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEModelElement(EModelElement object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'ENamed Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'ENamed Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseENamedElement(ENamedElement object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'ETyped Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'ETyped Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseETypedElement(ETypedElement object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EStructural Feature'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EStructural Feature'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEStructuralFeature(EStructuralFeature object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EAttribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EAttribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEAttribute(EAttribute object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //EjbSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/MethodElementHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/MethodElementHelper.java new file mode 100644 index 000000000..d80b520cf --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/MethodElementHelper.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.ejb.ExcludeList; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.MethodPermission; +import org.eclipse.jst.j2ee.ejb.MethodTransaction; + + +/** + * @author cbridgha + * + * To change this generated comment edit the template variable "typecomment": + * Window>Preferences>Java>Templates. + * To enable and disable the creation of type comments go to + * Window>Preferences>Java>Code Generation. + */ +public class MethodElementHelper { + public static final int NONE = 0; + public static final int METHOD_PERMISSION = 1; + public static final int METHOD_TRANSACTION = 2; + public static final int EXCLUDE_LIST = 3; + public static int getContainedType(MethodElement me) { + EObject container = me.eContainer(); + if (container == null) + return NONE; + if (container instanceof MethodPermission) + return METHOD_PERMISSION; + if (container instanceof MethodTransaction) + return METHOD_TRANSACTION; + if (container instanceof ExcludeList) + return EXCLUDE_LIST; + return NONE; + } + public static MethodPermission getMethodPermission(MethodElement me) { + if (METHOD_PERMISSION == getContainedType(me)) + return (MethodPermission) me.eContainer(); + return null; + } + public static MethodTransaction getMethodTransaction(MethodElement me) { + if (METHOD_TRANSACTION == getContainedType(me)) + return (MethodTransaction) me.eContainer(); + return null; + } + public static ExcludeList getExcludeList(MethodElement me) { + if (EXCLUDE_LIST == getContainedType(me)) + return (ExcludeList) me.eContainer(); + return null; + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/RelationshipsAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/RelationshipsAttributeMaintenanceAdapter.java new file mode 100644 index 000000000..28d9af773 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/ejb/util/RelationshipsAttributeMaintenanceAdapter.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.ejb.util; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.ejb.EJBRelation; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; + +public class RelationshipsAttributeMaintenanceAdapter extends AdapterImpl { + /** + * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(Notification) + */ + public void notifyChanged(Notification msg) { + if ((EStructuralFeature)msg.getFeature() == EjbFactoryImpl.getPackage().getRelationships_EjbRelations()) { + switch (msg.getEventType()) { + case Notification.ADD : + addedEJBRelation((EJBRelation) msg.getNewValue(), (EStructuralFeature)msg.getFeature()); + break; + case Notification.REMOVE : + removedEJBRelation((EJBRelation) msg.getOldValue(), (EStructuralFeature)msg.getFeature()); + break; + } + } + } + private void removedEJBRelation(EJBRelation aRelation, EObject sf) { + Adapter a = getAdapter(aRelation); + if (a != null) { + Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.REMOVE,(EStructuralFeature) sf, aRelation, null, Notification.NO_INDEX); + a.notifyChanged(not); + } + } + private void addedEJBRelation(EJBRelation aRelation, EObject sf) { + Adapter a = getAdapter(aRelation); + if (a != null) { + Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.ADD,(EStructuralFeature) sf, null, aRelation, Notification.NO_INDEX); + a.notifyChanged(not); + } + } + private Adapter getAdapter(EObject anObject) { + return EcoreUtil.getAdapter(anObject.eAdapters(),EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY); + } +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ActivationSpecImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ActivationSpecImpl.java new file mode 100644 index 000000000..5881fa369 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ActivationSpecImpl.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; + + +/** + * + * An implementation of the model object 'Activation Spec'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ActivationSpecImpl#getActivationSpecClass Activation Spec Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ActivationSpecImpl#getRequiredConfigProperties Required Config Properties}
  • + *
+ *

+ * + * @generated + */ +public class ActivationSpecImpl extends EObjectImpl implements ActivationSpec { + /** + * The default value of the '{@link #getActivationSpecClass() Activation Spec Class}' attribute. + * + * + * @see #getActivationSpecClass() + * @generated + * @ordered + */ + protected static final String ACTIVATION_SPEC_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getActivationSpecClass() Activation Spec Class}' attribute. + * + * + * @see #getActivationSpecClass() + * @generated + * @ordered + */ + protected String activationSpecClass = ACTIVATION_SPEC_CLASS_EDEFAULT; + + /** + * The cached value of the '{@link #getRequiredConfigProperties() Required Config Properties}' containment reference list. + * + * + * @see #getRequiredConfigProperties() + * @generated + * @ordered + */ + protected EList requiredConfigProperties = null; + + /** + * + * + * @generated + */ + protected ActivationSpecImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getActivationSpec(); + } + + /** + * + * + * @generated + */ + public String getActivationSpecClass() { + return activationSpecClass; + } + + /** + * + * + * @generated + */ + public void setActivationSpecClass(String newActivationSpecClass) { + String oldActivationSpecClass = activationSpecClass; + activationSpecClass = newActivationSpecClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS, oldActivationSpecClass, activationSpecClass)); + } + + /** + * + * + * @generated + */ + public EList getRequiredConfigProperties() { + if (requiredConfigProperties == null) { + requiredConfigProperties = new EObjectContainmentEList(RequiredConfigPropertyType.class, this, JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES); + } + return requiredConfigProperties; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: + return ((InternalEList)getRequiredConfigProperties()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: + return getActivationSpecClass(); + case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: + return getRequiredConfigProperties(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: + setActivationSpecClass((String)newValue); + return; + case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: + getRequiredConfigProperties().clear(); + getRequiredConfigProperties().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: + setActivationSpecClass(ACTIVATION_SPEC_CLASS_EDEFAULT); + return; + case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: + getRequiredConfigProperties().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: + return ACTIVATION_SPEC_CLASS_EDEFAULT == null ? activationSpecClass != null : !ACTIVATION_SPEC_CLASS_EDEFAULT.equals(activationSpecClass); + case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: + return requiredConfigProperties != null && !requiredConfigProperties.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (activationSpecClass: ");//$NON-NLS-1$ + result.append(activationSpecClass); + result.append(')'); + return result.toString(); + } + +} //ActivationSpecImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AdminObjectImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AdminObjectImpl.java new file mode 100644 index 000000000..13fa977c6 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AdminObjectImpl.java @@ -0,0 +1,277 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.JcaPackage; + + +/** + * + * An implementation of the model object 'Admin Object'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getAdminObjectInterface Admin Object Interface}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getAdminObjectClass Admin Object Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getConfigProperties Config Properties}
  • + *
+ *

+ * + * @generated + */ +public class AdminObjectImpl extends EObjectImpl implements AdminObject { + /** + * The default value of the '{@link #getAdminObjectInterface() Admin Object Interface}' attribute. + * + * + * @see #getAdminObjectInterface() + * @generated + * @ordered + */ + protected static final String ADMIN_OBJECT_INTERFACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAdminObjectInterface() Admin Object Interface}' attribute. + * + * + * @see #getAdminObjectInterface() + * @generated + * @ordered + */ + protected String adminObjectInterface = ADMIN_OBJECT_INTERFACE_EDEFAULT; + + /** + * The default value of the '{@link #getAdminObjectClass() Admin Object Class}' attribute. + * + * + * @see #getAdminObjectClass() + * @generated + * @ordered + */ + protected static final String ADMIN_OBJECT_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAdminObjectClass() Admin Object Class}' attribute. + * + * + * @see #getAdminObjectClass() + * @generated + * @ordered + */ + protected String adminObjectClass = ADMIN_OBJECT_CLASS_EDEFAULT; + + /** + * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. + * + * + * @see #getConfigProperties() + * @generated + * @ordered + */ + protected EList configProperties = null; + + /** + * + * + * @generated + */ + protected AdminObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getAdminObject(); + } + + /** + * + * + * @generated + */ + public String getAdminObjectInterface() { + return adminObjectInterface; + } + + /** + * + * + * @generated + */ + public void setAdminObjectInterface(String newAdminObjectInterface) { + String oldAdminObjectInterface = adminObjectInterface; + adminObjectInterface = newAdminObjectInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE, oldAdminObjectInterface, adminObjectInterface)); + } + + /** + * + * + * @generated + */ + public String getAdminObjectClass() { + return adminObjectClass; + } + + /** + * + * + * @generated + */ + public void setAdminObjectClass(String newAdminObjectClass) { + String oldAdminObjectClass = adminObjectClass; + adminObjectClass = newAdminObjectClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS, oldAdminObjectClass, adminObjectClass)); + } + + /** + * + * + * @generated + */ + public EList getConfigProperties() { + if (configProperties == null) { + configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES); + } + return configProperties; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: + return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: + return getAdminObjectInterface(); + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: + return getAdminObjectClass(); + case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: + return getConfigProperties(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: + setAdminObjectInterface((String)newValue); + return; + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: + setAdminObjectClass((String)newValue); + return; + case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: + getConfigProperties().clear(); + getConfigProperties().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: + setAdminObjectInterface(ADMIN_OBJECT_INTERFACE_EDEFAULT); + return; + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: + setAdminObjectClass(ADMIN_OBJECT_CLASS_EDEFAULT); + return; + case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: + getConfigProperties().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: + return ADMIN_OBJECT_INTERFACE_EDEFAULT == null ? adminObjectInterface != null : !ADMIN_OBJECT_INTERFACE_EDEFAULT.equals(adminObjectInterface); + case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: + return ADMIN_OBJECT_CLASS_EDEFAULT == null ? adminObjectClass != null : !ADMIN_OBJECT_CLASS_EDEFAULT.equals(adminObjectClass); + case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: + return configProperties != null && !configProperties.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (adminObjectInterface: ");//$NON-NLS-1$ + result.append(adminObjectInterface); + result.append(", adminObjectClass: ");//$NON-NLS-1$ + result.append(adminObjectClass); + result.append(')'); + return result.toString(); + } + +} //AdminObjectImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AuthenticationMechanismImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AuthenticationMechanismImpl.java new file mode 100644 index 000000000..a34d919d1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/AuthenticationMechanismImpl.java @@ -0,0 +1,866 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; +import org.eclipse.jst.j2ee.jca.JcaPackage; + + +/** + * The element authentication-mechanism specifies an authentication mechanism supported by the resource adapter. Note that this support is for the resource adapter and not for the underlying EIS instance. The optional description specifies any resource adapter specific requirement for the support of security contract and authentication mechanism. + * + * Note that BasicPassword mechanism type should support the + * javax.resource.spi.security.PasswordCredential interface. + * The Kerbv5 mechanism type should support the + * javax.resource.spi.security.GenericCredential interface. + + */ +public class AuthenticationMechanismImpl extends EObjectImpl implements AuthenticationMechanism, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getAuthenticationMechanism() Authentication Mechanism}' attribute. + * + * + * @see #getAuthenticationMechanism() + * @generated + * @ordered + */ + protected static final String AUTHENTICATION_MECHANISM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAuthenticationMechanism() Authentication Mechanism}' attribute. + * + * + * @see #getAuthenticationMechanism() + * @generated + * @ordered + */ + protected String authenticationMechanism = AUTHENTICATION_MECHANISM_EDEFAULT; + + /** + * The default value of the '{@link #getAuthenticationMechanismType() Authentication Mechanism Type}' attribute. + * + * + * @see #getAuthenticationMechanismType() + * @generated + * @ordered + */ + protected static final AuthenticationMechanismType AUTHENTICATION_MECHANISM_TYPE_EDEFAULT = AuthenticationMechanismType.BASIC_PASSWORD_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected AuthenticationMechanismType authenticationMechanismType = AUTHENTICATION_MECHANISM_TYPE_EDEFAULT; + /** + * This is true if the Authentication Mechanism Type attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean authenticationMechanismTypeESet = false; + + /** + * The default value of the '{@link #getCredentialInterface() Credential Interface}' attribute. + * + * + * @see #getCredentialInterface() + * @generated + * @ordered + */ + protected static final String CREDENTIAL_INTERFACE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String credentialInterface = CREDENTIAL_INTERFACE_EDEFAULT; + /** + * The default value of the '{@link #getCustomAuthMechType() Custom Auth Mech Type}' attribute. + * + * + * @see #getCustomAuthMechType() + * @generated + * @ordered + */ + protected static final String CUSTOM_AUTH_MECH_TYPE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String customAuthMechType = CUSTOM_AUTH_MECH_TYPE_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected AuthenticationMechanismImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getAuthenticationMechanism(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getAuthenticationMechanism() { + return authenticationMechanism; + } + + /** + * + * + * @generated + */ + public void setAuthenticationMechanism(String newAuthenticationMechanism) { + String oldAuthenticationMechanism = authenticationMechanism; + authenticationMechanism = newAuthenticationMechanism; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM, oldAuthenticationMechanism, authenticationMechanism)); + } + + /** + * @generated This field/method will be replaced during code generation + * The authentication-mechanism-type specifies type of an authentication mechanism. + * + * The example values are: + * - BasicPassword + * - Kerbv5 + * + * Any additional security mechanisms are outside the scope of the + * Connector architecture specification. + + */ + public AuthenticationMechanismType getAuthenticationMechanismType() { + return authenticationMechanismType; + } + + /** + * + * + * @generated + */ + public void setAuthenticationMechanismType(AuthenticationMechanismType newAuthenticationMechanismType) { + AuthenticationMechanismType oldAuthenticationMechanismType = authenticationMechanismType; + authenticationMechanismType = newAuthenticationMechanismType == null ? AUTHENTICATION_MECHANISM_TYPE_EDEFAULT : newAuthenticationMechanismType; + boolean oldAuthenticationMechanismTypeESet = authenticationMechanismTypeESet; + authenticationMechanismTypeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE, oldAuthenticationMechanismType, authenticationMechanismType, !oldAuthenticationMechanismTypeESet)); + } + + /** + * + * + * @generated + */ + public void unsetAuthenticationMechanismType() { + AuthenticationMechanismType oldAuthenticationMechanismType = authenticationMechanismType; + boolean oldAuthenticationMechanismTypeESet = authenticationMechanismTypeESet; + authenticationMechanismType = AUTHENTICATION_MECHANISM_TYPE_EDEFAULT; + authenticationMechanismTypeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE, oldAuthenticationMechanismType, AUTHENTICATION_MECHANISM_TYPE_EDEFAULT, oldAuthenticationMechanismTypeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetAuthenticationMechanismType() { + return authenticationMechanismTypeESet; + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the interface that the resource adapter implementation supports for + * the representation of the credentials. This element should be used by + * application server to find out the Credential interface it should use as part + * of the security contract. + * + * The possible values are: + * javax.resource.spi.security.PasswordCredential + * javax.resource.spi.security.GenericCredential + + */ + public String getCredentialInterface() { + return credentialInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setCredentialInterface(String newCredentialInterface) { + String oldCredentialInterface = credentialInterface; + credentialInterface = newCredentialInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE, oldCredentialInterface, credentialInterface)); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: + return AUTHENTICATION_MECHANISM_EDEFAULT == null ? authenticationMechanism != null : !AUTHENTICATION_MECHANISM_EDEFAULT.equals(authenticationMechanism); + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: + return isSetAuthenticationMechanismType(); + case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: + return CREDENTIAL_INTERFACE_EDEFAULT == null ? credentialInterface != null : !CREDENTIAL_INTERFACE_EDEFAULT.equals(credentialInterface); + case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: + return CUSTOM_AUTH_MECH_TYPE_EDEFAULT == null ? customAuthMechType != null : !CUSTOM_AUTH_MECH_TYPE_EDEFAULT.equals(customAuthMechType); + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: + setDescription((String)newValue); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: + setAuthenticationMechanism((String)newValue); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: + setAuthenticationMechanismType((AuthenticationMechanismType)newValue); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: + setCredentialInterface((String)newValue); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: + setCustomAuthMechType((String)newValue); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: + setAuthenticationMechanism(AUTHENTICATION_MECHANISM_EDEFAULT); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: + unsetAuthenticationMechanismType(); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: + setCredentialInterface(CREDENTIAL_INTERFACE_EDEFAULT); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: + setCustomAuthMechType(CUSTOM_AUTH_MECH_TYPE_EDEFAULT); + return; + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", authenticationMechanism: ");//$NON-NLS-1$ + result.append(authenticationMechanism); + result.append(", authenticationMechanismType: ");//$NON-NLS-1$ + if (authenticationMechanismTypeESet) result.append(authenticationMechanismType); else result.append("");//$NON-NLS-1$ + result.append(", credentialInterface: ");//$NON-NLS-1$ + result.append(credentialInterface); + result.append(", customAuthMechType: ");//$NON-NLS-1$ + result.append(customAuthMechType); + result.append(')'); + return result.toString(); + } + + /** + * @generated This field/method will be replaced during code generation + * This is an internal variable used to store the AthenticationMechanismType when + * it is something other than BasicPassword or Kerbv5. AuthenticationMecanismType + * is set to 'Custom' in those cases. This attribute should not be used by + * runtime. It is only used by the writer to write back out the custom + * AuthenticationMechanismType string in the case of custom + * AuthenticationMechanismType's. + * This variable is internal, used only by the reader//writer classes, and can + * change or disappear without notice. + */ + public String getCustomAuthMechType() { + return customAuthMechType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setCustomAuthMechType(String newCustomAuthMechType) { + String oldCustomAuthMechType = customAuthMechType; + customAuthMechType = newCustomAuthMechType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE, oldCustomAuthMechType, customAuthMechType)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: + return getDescription(); + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: + return getAuthenticationMechanism(); + case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: + return getAuthenticationMechanismType(); + case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: + return getCredentialInterface(); + case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: + return getCustomAuthMechType(); + case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConfigPropertyImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConfigPropertyImpl.java new file mode 100644 index 000000000..02993bfae --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConfigPropertyImpl.java @@ -0,0 +1,357 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.JcaPackage; + + +/** + * The config property contains a declaration of a single + * configuration property for a ManagedConnectionFactory instance. + * + * Each ManagedConnectionFactory instance creates connections to a specific EIS instance based on the properties configured on the ManagedConnectionFactory instance. The configurable properties are specified only once in the deployment descriptor, even though a resource adapter can be used to configure multiple ManagedConnnection-Factory instances (that create connections to different instances of the same EIS). + * + * The declaration consists of an optional description, name, type + * and an optional value of the configuration property. If the resource + * adapter provider does not specify a value than the deployer is + * responsible for providing a valid value for a configuration property. + * + * Any bounds or well-defined values of properties should be described in the description. + + */ +public class ConfigPropertyImpl extends EObjectImpl implements ConfigProperty, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String type = TYPE_EDEFAULT; + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String value = VALUE_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected ConfigPropertyImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getConfigProperty(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains the name of a configuration property. + * + * The connector architecture defines a set of well-defined properties all of type java.lang.String. These are as follows: + * + * ServerName + * PortNumber + * UserName + * Password + * ConnectionURL + * + * A resource adapter provider can extend this property set to include properties specific to the resource adapter and its underlying EIS. + + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains the fully qualified Java type of a configuration property as required by ManagedConnection-Factory instance. + * + * The following are the legal values of config-property-type: + * java.lang.Boolean, java.lang.String, java.lang.Integer, + * java.lang.Double, java.lang.Byte, java.lang.Short, + * java.lang.Long, java.lang.Float, java.lang.Character + */ + public String getType() { + return type; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__TYPE, oldType, type)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains the value of a configuration entry. + */ + public String getValue() { + return value; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: + return getDescription(); + case JcaPackage.CONFIG_PROPERTY__NAME: + return getName(); + case JcaPackage.CONFIG_PROPERTY__TYPE: + return getType(); + case JcaPackage.CONFIG_PROPERTY__VALUE: + return getValue(); + case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JcaPackage.CONFIG_PROPERTY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case JcaPackage.CONFIG_PROPERTY__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case JcaPackage.CONFIG_PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: + setDescription((String)newValue); + return; + case JcaPackage.CONFIG_PROPERTY__NAME: + setName((String)newValue); + return; + case JcaPackage.CONFIG_PROPERTY__TYPE: + setType((String)newValue); + return; + case JcaPackage.CONFIG_PROPERTY__VALUE: + setValue((String)newValue); + return; + case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JcaPackage.CONFIG_PROPERTY__NAME: + setName(NAME_EDEFAULT); + return; + case JcaPackage.CONFIG_PROPERTY__TYPE: + setType(TYPE_EDEFAULT); + return; + case JcaPackage.CONFIG_PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", name: ");//$NON-NLS-1$ + result.append(name); + result.append(", type: ");//$NON-NLS-1$ + result.append(type); + result.append(", value: ");//$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectionDefinitionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectionDefinitionImpl.java new file mode 100644 index 000000000..8eee57356 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectionDefinitionImpl.java @@ -0,0 +1,439 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.JcaPackage; + + +/** + * + * An implementation of the model object 'Connection Definition'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getManagedConnectionFactoryClass Managed Connection Factory Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionFactoryInterface Connection Factory Interface}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionFactoryImplClass Connection Factory Impl Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionInterface Connection Interface}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionImplClass Connection Impl Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConfigProperties Config Properties}
  • + *
+ *

+ * + * @generated + */ +public class ConnectionDefinitionImpl extends EObjectImpl implements ConnectionDefinition { + /** + * The default value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. + * + * + * @see #getManagedConnectionFactoryClass() + * @generated + * @ordered + */ + protected static final String MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. + * + * + * @see #getManagedConnectionFactoryClass() + * @generated + * @ordered + */ + protected String managedConnectionFactoryClass = MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. + * + * + * @see #getConnectionFactoryInterface() + * @generated + * @ordered + */ + protected static final String CONNECTION_FACTORY_INTERFACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. + * + * + * @see #getConnectionFactoryInterface() + * @generated + * @ordered + */ + protected String connectionFactoryInterface = CONNECTION_FACTORY_INTERFACE_EDEFAULT; + + /** + * The default value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. + * + * + * @see #getConnectionFactoryImplClass() + * @generated + * @ordered + */ + protected static final String CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. + * + * + * @see #getConnectionFactoryImplClass() + * @generated + * @ordered + */ + protected String connectionFactoryImplClass = CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getConnectionInterface() Connection Interface}' attribute. + * + * + * @see #getConnectionInterface() + * @generated + * @ordered + */ + protected static final String CONNECTION_INTERFACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConnectionInterface() Connection Interface}' attribute. + * + * + * @see #getConnectionInterface() + * @generated + * @ordered + */ + protected String connectionInterface = CONNECTION_INTERFACE_EDEFAULT; + + /** + * The default value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. + * + * + * @see #getConnectionImplClass() + * @generated + * @ordered + */ + protected static final String CONNECTION_IMPL_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. + * + * + * @see #getConnectionImplClass() + * @generated + * @ordered + */ + protected String connectionImplClass = CONNECTION_IMPL_CLASS_EDEFAULT; + + /** + * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. + * + * + * @see #getConfigProperties() + * @generated + * @ordered + */ + protected EList configProperties = null; + + /** + * + * + * @generated + */ + protected ConnectionDefinitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getConnectionDefinition(); + } + + /** + * + * + * @generated + */ + public String getManagedConnectionFactoryClass() { + return managedConnectionFactoryClass; + } + + /** + * + * + * @generated + */ + public void setManagedConnectionFactoryClass(String newManagedConnectionFactoryClass) { + String oldManagedConnectionFactoryClass = managedConnectionFactoryClass; + managedConnectionFactoryClass = newManagedConnectionFactoryClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS, oldManagedConnectionFactoryClass, managedConnectionFactoryClass)); + } + + /** + * + * + * @generated + */ + public String getConnectionFactoryInterface() { + return connectionFactoryInterface; + } + + /** + * + * + * @generated + */ + public void setConnectionFactoryInterface(String newConnectionFactoryInterface) { + String oldConnectionFactoryInterface = connectionFactoryInterface; + connectionFactoryInterface = newConnectionFactoryInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE, oldConnectionFactoryInterface, connectionFactoryInterface)); + } + + /** + * + * + * @generated + */ + public String getConnectionFactoryImplClass() { + return connectionFactoryImplClass; + } + + /** + * + * + * @generated + */ + public void setConnectionFactoryImplClass(String newConnectionFactoryImplClass) { + String oldConnectionFactoryImplClass = connectionFactoryImplClass; + connectionFactoryImplClass = newConnectionFactoryImplClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS, oldConnectionFactoryImplClass, connectionFactoryImplClass)); + } + + /** + * + * + * @generated + */ + public String getConnectionInterface() { + return connectionInterface; + } + + /** + * + * + * @generated + */ + public void setConnectionInterface(String newConnectionInterface) { + String oldConnectionInterface = connectionInterface; + connectionInterface = newConnectionInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE, oldConnectionInterface, connectionInterface)); + } + + /** + * + * + * @generated + */ + public String getConnectionImplClass() { + return connectionImplClass; + } + + /** + * + * + * @generated + */ + public void setConnectionImplClass(String newConnectionImplClass) { + String oldConnectionImplClass = connectionImplClass; + connectionImplClass = newConnectionImplClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS, oldConnectionImplClass, connectionImplClass)); + } + + /** + * + * + * @generated + */ + public EList getConfigProperties() { + if (configProperties == null) { + configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES); + } + return configProperties; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: + return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: + return getManagedConnectionFactoryClass(); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: + return getConnectionFactoryInterface(); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: + return getConnectionFactoryImplClass(); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: + return getConnectionInterface(); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: + return getConnectionImplClass(); + case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: + return getConfigProperties(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: + setManagedConnectionFactoryClass((String)newValue); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: + setConnectionFactoryInterface((String)newValue); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: + setConnectionFactoryImplClass((String)newValue); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: + setConnectionInterface((String)newValue); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: + setConnectionImplClass((String)newValue); + return; + case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: + getConfigProperties().clear(); + getConfigProperties().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: + setManagedConnectionFactoryClass(MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: + setConnectionFactoryInterface(CONNECTION_FACTORY_INTERFACE_EDEFAULT); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: + setConnectionFactoryImplClass(CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: + setConnectionInterface(CONNECTION_INTERFACE_EDEFAULT); + return; + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: + setConnectionImplClass(CONNECTION_IMPL_CLASS_EDEFAULT); + return; + case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: + getConfigProperties().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: + return MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT == null ? managedConnectionFactoryClass != null : !MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT.equals(managedConnectionFactoryClass); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: + return CONNECTION_FACTORY_INTERFACE_EDEFAULT == null ? connectionFactoryInterface != null : !CONNECTION_FACTORY_INTERFACE_EDEFAULT.equals(connectionFactoryInterface); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: + return CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT == null ? connectionFactoryImplClass != null : !CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT.equals(connectionFactoryImplClass); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: + return CONNECTION_INTERFACE_EDEFAULT == null ? connectionInterface != null : !CONNECTION_INTERFACE_EDEFAULT.equals(connectionInterface); + case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: + return CONNECTION_IMPL_CLASS_EDEFAULT == null ? connectionImplClass != null : !CONNECTION_IMPL_CLASS_EDEFAULT.equals(connectionImplClass); + case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: + return configProperties != null && !configProperties.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (managedConnectionFactoryClass: ");//$NON-NLS-1$ + result.append(managedConnectionFactoryClass); + result.append(", connectionFactoryInterface: ");//$NON-NLS-1$ + result.append(connectionFactoryInterface); + result.append(", connectionFactoryImplClass: ");//$NON-NLS-1$ + result.append(connectionFactoryImplClass); + result.append(", connectionInterface: ");//$NON-NLS-1$ + result.append(connectionInterface); + result.append(", connectionImplClass: ");//$NON-NLS-1$ + result.append(connectionImplClass); + result.append(')'); + return result.toString(); + } + +} //ConnectionDefinitionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorImpl.java new file mode 100644 index 000000000..c6e8ef062 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorImpl.java @@ -0,0 +1,508 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; + + +/** + * The connector element is the root element of the deployment descriptor for the resource adapter. This element includes general information - vendor name, version, specification version supported, icon - about the resource adapter module. It also includes information specific to the implementation of the resource adapter library as specified through the element resourceadapter. + + */ +public class ConnectorImpl extends CompatibilityDescriptionGroupImpl implements Connector{ + + /** + * The default value of the '{@link #getVendorName() Vendor Name}' attribute. + * + * + * @see #getVendorName() + * @generated + * @ordered + */ + protected static final String VENDOR_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String vendorName = VENDOR_NAME_EDEFAULT; + /** + * The default value of the '{@link #getSpecVersion() Spec Version}' attribute. + * + * + * @see #getSpecVersion() + * @generated + * @ordered + */ + protected static final String SPEC_VERSION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String specVersion = SPEC_VERSION_EDEFAULT; + /** + * The default value of the '{@link #getEisType() Eis Type}' attribute. + * + * + * @see #getEisType() + * @generated + * @ordered + */ + protected static final String EIS_TYPE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String eisType = EIS_TYPE_EDEFAULT; + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String version = VERSION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected License license = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected ResourceAdapter resourceAdapter = null; + protected ConnectorImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getConnector(); + } + + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ + public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getModuleVersionID(); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the name of resource adapter provider vendor. + * Example: Wombat Corp. + */ + public String getVendorName() { + return vendorName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setVendorName(String newVendorName) { + String oldVendorName = vendorName; + vendorName = newVendorName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__VENDOR_NAME, oldVendorName, vendorName)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the version of the connector architecture specification that is supported by this resource adapter. This information enables deployer to configure the resource adapter to support deployment and runtime requirements of the corresponding connector architecture specification. + + */ + public String getSpecVersion() { + return specVersion; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSpecVersion(String newSpecVersion) { + String oldSpecVersion = specVersion; + specVersion = newSpecVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__SPEC_VERSION, oldSpecVersion, specVersion)); + } + + /** + * @generated This field/method will be replaced during code generation + * Contains information about the type of the EIS. For example, the type of an EIS can be product name of EIS independent of any version info. + * + * This helps in identifying EIS instances that can be used with + * this resource adapter. + + */ + public String getEisType() { + return eisType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setEisType(String newEisType) { + String oldEisType = eisType; + eisType = newEisType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__EIS_TYPE, oldEisType, eisType)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies a string-based version of the resource adapter from the resource adapter provider. + * + * Example: 1.0 + */ + public String getVersion() { + return version; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies licensing requirements for the resource adapter module. This element specifies whether a license is required to deploy and use this resource adapter, and an optional description of the licensing terms (examples: duration of license, number of + * connection restrictions). + */ + public License getLicense() { + return license; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLicense(License newLicense, NotificationChain msgs) { + License oldLicense = license; + license = newLicense; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__LICENSE, oldLicense, newLicense); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLicense(License newLicense) { + if (newLicense != license) { + NotificationChain msgs = null; + if (license != null) + msgs = ((InternalEObject)license).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__LICENSE, null, msgs); + if (newLicense != null) + msgs = ((InternalEObject)newLicense).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__LICENSE, null, msgs); + msgs = basicSetLicense(newLicense, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__LICENSE, newLicense, newLicense)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetResourceAdapter(ResourceAdapter newResourceAdapter, NotificationChain msgs) { + ResourceAdapter oldResourceAdapter = resourceAdapter; + resourceAdapter = newResourceAdapter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__RESOURCE_ADAPTER, oldResourceAdapter, newResourceAdapter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setResourceAdapter(ResourceAdapter newResourceAdapter) { + if (newResourceAdapter != resourceAdapter) { + NotificationChain msgs = null; + if (resourceAdapter != null) + msgs = ((InternalEObject)resourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__RESOURCE_ADAPTER, null, msgs); + if (newResourceAdapter != null) + msgs = ((InternalEObject)newResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__RESOURCE_ADAPTER, null, msgs); + msgs = basicSetResourceAdapter(newResourceAdapter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__RESOURCE_ADAPTER, newResourceAdapter, newResourceAdapter)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.CONNECTOR__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case JcaPackage.CONNECTOR__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case JcaPackage.CONNECTOR__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case JcaPackage.CONNECTOR__LICENSE: + return basicSetLicense(null, msgs); + case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: + return basicSetResourceAdapter(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTOR__ICONS: + return getIcons(); + case JcaPackage.CONNECTOR__DISPLAY_NAMES: + return getDisplayNames(); + case JcaPackage.CONNECTOR__DESCRIPTIONS: + return getDescriptions(); + case JcaPackage.CONNECTOR__SMALL_ICON: + return getSmallIcon(); + case JcaPackage.CONNECTOR__LARGE_ICON: + return getLargeIcon(); + case JcaPackage.CONNECTOR__DESCRIPTION: + return getDescription(); + case JcaPackage.CONNECTOR__DISPLAY_NAME: + return getDisplayName(); + case JcaPackage.CONNECTOR__VENDOR_NAME: + return getVendorName(); + case JcaPackage.CONNECTOR__SPEC_VERSION: + return getSpecVersion(); + case JcaPackage.CONNECTOR__EIS_TYPE: + return getEisType(); + case JcaPackage.CONNECTOR__VERSION: + return getVersion(); + case JcaPackage.CONNECTOR__LICENSE: + return getLicense(); + case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: + return getResourceAdapter(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTOR__ICONS: + return icons != null && !icons.isEmpty(); + case JcaPackage.CONNECTOR__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case JcaPackage.CONNECTOR__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case JcaPackage.CONNECTOR__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case JcaPackage.CONNECTOR__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case JcaPackage.CONNECTOR__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JcaPackage.CONNECTOR__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case JcaPackage.CONNECTOR__VENDOR_NAME: + return VENDOR_NAME_EDEFAULT == null ? vendorName != null : !VENDOR_NAME_EDEFAULT.equals(vendorName); + case JcaPackage.CONNECTOR__SPEC_VERSION: + return SPEC_VERSION_EDEFAULT == null ? specVersion != null : !SPEC_VERSION_EDEFAULT.equals(specVersion); + case JcaPackage.CONNECTOR__EIS_TYPE: + return EIS_TYPE_EDEFAULT == null ? eisType != null : !EIS_TYPE_EDEFAULT.equals(eisType); + case JcaPackage.CONNECTOR__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case JcaPackage.CONNECTOR__LICENSE: + return license != null; + case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: + return resourceAdapter != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTOR__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case JcaPackage.CONNECTOR__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case JcaPackage.CONNECTOR__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case JcaPackage.CONNECTOR__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case JcaPackage.CONNECTOR__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case JcaPackage.CONNECTOR__DESCRIPTION: + setDescription((String)newValue); + return; + case JcaPackage.CONNECTOR__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case JcaPackage.CONNECTOR__VENDOR_NAME: + setVendorName((String)newValue); + return; + case JcaPackage.CONNECTOR__SPEC_VERSION: + setSpecVersion((String)newValue); + return; + case JcaPackage.CONNECTOR__EIS_TYPE: + setEisType((String)newValue); + return; + case JcaPackage.CONNECTOR__VERSION: + setVersion((String)newValue); + return; + case JcaPackage.CONNECTOR__LICENSE: + setLicense((License)newValue); + return; + case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: + setResourceAdapter((ResourceAdapter)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.CONNECTOR__ICONS: + getIcons().clear(); + return; + case JcaPackage.CONNECTOR__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case JcaPackage.CONNECTOR__DESCRIPTIONS: + getDescriptions().clear(); + return; + case JcaPackage.CONNECTOR__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case JcaPackage.CONNECTOR__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case JcaPackage.CONNECTOR__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JcaPackage.CONNECTOR__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case JcaPackage.CONNECTOR__VENDOR_NAME: + setVendorName(VENDOR_NAME_EDEFAULT); + return; + case JcaPackage.CONNECTOR__SPEC_VERSION: + setSpecVersion(SPEC_VERSION_EDEFAULT); + return; + case JcaPackage.CONNECTOR__EIS_TYPE: + setEisType(EIS_TYPE_EDEFAULT); + return; + case JcaPackage.CONNECTOR__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case JcaPackage.CONNECTOR__LICENSE: + setLicense((License)null); + return; + case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: + setResourceAdapter((ResourceAdapter)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (vendorName: ");//$NON-NLS-1$ + result.append(vendorName); + result.append(", specVersion: ");//$NON-NLS-1$ + result.append(specVersion); + result.append(", eisType: ");//$NON-NLS-1$ + result.append(eisType); + result.append(", version: ");//$NON-NLS-1$ + result.append(version); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceFactory.java new file mode 100644 index 000000000..593c2f718 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceFactory.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +public class ConnectorResourceFactory extends TranslatorResourceFactory { + + /** + * Method registerDtds. + */ + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.CONNECTOR_SYSTEMID_1_0, "connector_1_0.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.CONNECTOR_SCHEMA_LOC_1_5, "connector_1_5.xsd"); //$NON-NLS-1$ + } + + /** + * Constructor for ConnectorResourceFactory. + * @param aRendererFactory + */ + public ConnectorResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) + */ + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new ConnectorResourceImpl(uri, aRenderer); + } + + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(aRendererFactory)); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.RAR_DD_URI_OBJ); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceImpl.java new file mode 100644 index 000000000..71cecaf6c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ConnectorResourceImpl.java @@ -0,0 +1,180 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.connector.ConnectorTranslator; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.ConnectorResource; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + + +public class ConnectorResourceImpl extends XMLResourceImpl implements ConnectorResource{ + + /** + * Constructor for ApplicationClientResourceImpl. + * @param uri + * @param aRenderer + */ + public ConnectorResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + /** + * Constructor for ApplicationClientResourceImpl. + * @param aRenderer + */ + public ConnectorResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /** + * Return the first element in the EList. + */ + public Connector getConnector() { + return (Connector) getRootObject(); + } + + + public int getType() { + return RAR_TYPE; + } + + + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.CONNECTOR_SYSTEMID_1_0; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.CONNECTOR_SYSTEMID_1_0; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.CONNECTOR_PUBLICID_1_0; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.CONNECTOR_PUBLICID_1_0; + } + + + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.CONNECTOR_DOCTYPE; + default : + return null; + } + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) + * This is setting the module version on the resource. + */ + public void setDoctypeValues(String publicId, String systemId) { + int version = JCA_1_5_ID; + if (systemId == null) + version = JCA_1_5_ID; + else if (systemId.equals(getJ2EE_1_3_SystemID())) + version = JCA_1_0_ID; + super.setDoctypeValues(publicId, systemId); + super.setVersionID(version); + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (JCA_1_5_ID) : + super.setDoctypeValues(null, null); + break; + case (JCA_1_0_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version + */ + public void setJ2EEVersionID(int id) { + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + primSetVersionID(JCA_1_5_ID); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + primSetVersionID(JCA_1_0_ID); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + primSetVersionID(JCA_1_0_ID); + } + syncVersionOfRootObject(); + } + /** + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return ConnectorTranslator.INSTANCE; + } + /* Return J2EE version based on module version + */ + public int getJ2EEVersionID() { + switch (getModuleVersionID()) { + case J2EEVersionConstants.JCA_1_0_ID : + return J2EEVersionConstants.J2EE_1_3_ID; + case J2EEVersionConstants.JCA_1_5_ID : + return J2EEVersionConstants.J2EE_1_4_ID; + default : + return J2EEVersionConstants.J2EE_1_4_ID; + } + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return JCA_1_5_ID; + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + Connector conn = getConnector(); + if (conn == null) + return; + + String version = conn.getSpecVersion(); + String newVersion = getModuleVersionString(); + if (!newVersion.equals(version)) + conn.setSpecVersion(newVersion); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/InboundResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/InboundResourceAdapterImpl.java new file mode 100644 index 000000000..d7f355c40 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/InboundResourceAdapterImpl.java @@ -0,0 +1,181 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.MessageAdapter; + + +/** + * + * An implementation of the model object 'Inbound Resource Adapter'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.InboundResourceAdapterImpl#getMessageAdapter Message Adapter}
  • + *
+ *

+ * + * @generated + */ +public class InboundResourceAdapterImpl extends EObjectImpl implements InboundResourceAdapter { + /** + * The cached value of the '{@link #getMessageAdapter() Message Adapter}' containment reference. + * + * + * @see #getMessageAdapter() + * @generated + * @ordered + */ + protected MessageAdapter messageAdapter = null; + + /** + * + * + * @generated + */ + protected InboundResourceAdapterImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getInboundResourceAdapter(); + } + + /** + * + * + * @generated + */ + public MessageAdapter getMessageAdapter() { + return messageAdapter; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMessageAdapter(MessageAdapter newMessageAdapter, NotificationChain msgs) { + MessageAdapter oldMessageAdapter = messageAdapter; + messageAdapter = newMessageAdapter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, oldMessageAdapter, newMessageAdapter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setMessageAdapter(MessageAdapter newMessageAdapter) { + if (newMessageAdapter != messageAdapter) { + NotificationChain msgs = null; + if (messageAdapter != null) + msgs = ((InternalEObject)messageAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, null, msgs); + if (newMessageAdapter != null) + msgs = ((InternalEObject)newMessageAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, null, msgs); + msgs = basicSetMessageAdapter(newMessageAdapter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, newMessageAdapter, newMessageAdapter)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: + return basicSetMessageAdapter(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: + return getMessageAdapter(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: + setMessageAdapter((MessageAdapter)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: + setMessageAdapter((MessageAdapter)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: + return messageAdapter != null; + } + return eDynamicIsSet(eFeature); + } + +} //InboundResourceAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaFactoryImpl.java new file mode 100644 index 000000000..76e854066 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaFactoryImpl.java @@ -0,0 +1,422 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaFactory; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.MessageAdapter; +import org.eclipse.jst.j2ee.jca.MessageListener; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; +import org.eclipse.jst.j2ee.jca.TransactionSupportKind; + +/** + * @generated + */ +public class JcaFactoryImpl extends EFactoryImpl implements JcaFactory{ + + public JcaFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case JcaPackage.CONNECTOR: return createConnector(); + case JcaPackage.RESOURCE_ADAPTER: return createResourceAdapter(); + case JcaPackage.AUTHENTICATION_MECHANISM: return createAuthenticationMechanism(); + case JcaPackage.CONFIG_PROPERTY: return createConfigProperty(); + case JcaPackage.SECURITY_PERMISSION: return createSecurityPermission(); + case JcaPackage.LICENSE: return createLicense(); + case JcaPackage.INBOUND_RESOURCE_ADAPTER: return createInboundResourceAdapter(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER: return createOutboundResourceAdapter(); + case JcaPackage.MESSAGE_ADAPTER: return createMessageAdapter(); + case JcaPackage.CONNECTION_DEFINITION: return createConnectionDefinition(); + case JcaPackage.ADMIN_OBJECT: return createAdminObject(); + case JcaPackage.MESSAGE_LISTENER: return createMessageListener(); + case JcaPackage.ACTIVATION_SPEC: return createActivationSpec(); + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE: return createRequiredConfigPropertyType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case JcaPackage.AUTHENTICATION_MECHANISM_TYPE: + return AuthenticationMechanismType.get(initialValue); + case JcaPackage.TRANSACTION_SUPPORT_KIND: + return TransactionSupportKind.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");//$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case JcaPackage.AUTHENTICATION_MECHANISM_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case JcaPackage.TRANSACTION_SUPPORT_KIND: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ + } + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Connector createConnector() { + ConnectorImpl connector = new ConnectorImpl(); + return connector; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public License createLicense() { + LicenseImpl license = new LicenseImpl(); + return license; + } + + /** + * + * + * @generated + */ + public InboundResourceAdapter createInboundResourceAdapter() { + InboundResourceAdapterImpl inboundResourceAdapter = new InboundResourceAdapterImpl(); + return inboundResourceAdapter; + } + + /** + * + * + * @generated + */ + public OutboundResourceAdapter createOutboundResourceAdapter() { + OutboundResourceAdapterImpl outboundResourceAdapter = new OutboundResourceAdapterImpl(); + return outboundResourceAdapter; + } + + /** + * + * + * @generated + */ + public MessageAdapter createMessageAdapter() { + MessageAdapterImpl messageAdapter = new MessageAdapterImpl(); + return messageAdapter; + } + + /** + * + * + * @generated + */ + public ConnectionDefinition createConnectionDefinition() { + ConnectionDefinitionImpl connectionDefinition = new ConnectionDefinitionImpl(); + return connectionDefinition; + } + + /** + * + * + * @generated + */ + public AdminObject createAdminObject() { + AdminObjectImpl adminObject = new AdminObjectImpl(); + return adminObject; + } + + /** + * + * + * @generated + */ + public MessageListener createMessageListener() { + MessageListenerImpl messageListener = new MessageListenerImpl(); + return messageListener; + } + + /** + * + * + * @generated + */ + public ActivationSpec createActivationSpec() { + ActivationSpecImpl activationSpec = new ActivationSpecImpl(); + return activationSpec; + } + + /** + * + * + * @generated + */ + public RequiredConfigPropertyType createRequiredConfigPropertyType() { + RequiredConfigPropertyTypeImpl requiredConfigPropertyType = new RequiredConfigPropertyTypeImpl(); + return requiredConfigPropertyType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ResourceAdapter createResourceAdapter() { + ResourceAdapterImpl resourceAdapter = new ResourceAdapterImpl(); + return resourceAdapter; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public SecurityPermission createSecurityPermission() { + SecurityPermissionImpl securityPermission = new SecurityPermissionImpl(); + return securityPermission; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public AuthenticationMechanism createAuthenticationMechanism() { + AuthenticationMechanismImpl authenticationMechanism = new AuthenticationMechanismImpl(); + return authenticationMechanism; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ConfigProperty createConfigProperty() { + ConfigPropertyImpl configProperty = new ConfigPropertyImpl(); + return configProperty; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JcaPackage getJcaPackage() { + return (JcaPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static JcaPackage getPackage() { + return JcaPackage.eINSTANCE; + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaPackageImpl.java new file mode 100644 index 000000000..2290e474c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/JcaPackageImpl.java @@ -0,0 +1,2107 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaFactory; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.MessageAdapter; +import org.eclipse.jst.j2ee.jca.MessageListener; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; +import org.eclipse.jst.j2ee.jca.TransactionSupportKind; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class JcaPackageImpl extends EPackageImpl implements JcaPackage, EPackage { + /** + * + * + * @generated + */ + private EClass connectorEClass = null; + + /** + * + * + * @generated + */ + private EClass resourceAdapterEClass = null; + + /** + * + * + * @generated + */ + private EClass authenticationMechanismEClass = null; + + /** + * + * + * @generated + */ + private EClass configPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass securityPermissionEClass = null; + + /** + * + * + * @generated + */ + private EClass licenseEClass = null; + + /** + * + * + * @generated + */ + private EClass inboundResourceAdapterEClass = null; + + /** + * + * + * @generated + */ + private EClass outboundResourceAdapterEClass = null; + + /** + * + * + * @generated + */ + private EClass messageAdapterEClass = null; + + /** + * + * + * @generated + */ + private EClass connectionDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass adminObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass messageListenerEClass = null; + + /** + * + * + * @generated + */ + private EClass activationSpecEClass = null; + + /** + * + * + * @generated + */ + private EClass requiredConfigPropertyTypeEClass = null; + + /** + * + * + * @generated + */ + private EEnum authenticationMechanismTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum transactionSupportKindEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private JcaPackageImpl() { + super(eNS_URI, JcaFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static JcaPackage init() { + if (isInited) return (JcaPackage)EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI); + + // Obtain or create and register package. + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JcaPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + + // Step 1: create meta-model objects + theJcaPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theJcaPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theJcaPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getConnector() { + return connectorEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConnector_VendorName() { + return (EAttribute)connectorEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConnector_SpecVersion() { + return (EAttribute)connectorEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConnector_EisType() { + return (EAttribute)connectorEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConnector_Version() { + return (EAttribute)connectorEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getConnector_License() { + return (EReference)connectorEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getConnector_ResourceAdapter() { + return (EReference)connectorEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getLicense() { + return licenseEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getLicense_Description() { + return (EAttribute)licenseEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getLicense_Required() { + return (EAttribute)licenseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getLicense_Descriptions() { + return (EReference)licenseEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getInboundResourceAdapter() { + return inboundResourceAdapterEClass; + } + + /** + * + * + * @generated + */ + public EReference getInboundResourceAdapter_MessageAdapter() { + return (EReference)inboundResourceAdapterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getOutboundResourceAdapter() { + return outboundResourceAdapterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getOutboundResourceAdapter_ReauthenticationSupport() { + return (EAttribute)outboundResourceAdapterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getOutboundResourceAdapter_TransactionSupport() { + return (EAttribute)outboundResourceAdapterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getOutboundResourceAdapter_ConnectionDefinitions() { + return (EReference)outboundResourceAdapterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getOutboundResourceAdapter_AuthenticationMechanisms() { + return (EReference)outboundResourceAdapterEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getMessageAdapter() { + return messageAdapterEClass; + } + + /** + * + * + * @generated + */ + public EReference getMessageAdapter_MessageListeners() { + return (EReference)messageAdapterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getConnectionDefinition() { + return connectionDefinitionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionDefinition_ManagedConnectionFactoryClass() { + return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionDefinition_ConnectionFactoryInterface() { + return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionDefinition_ConnectionFactoryImplClass() { + return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionDefinition_ConnectionInterface() { + return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionDefinition_ConnectionImplClass() { + return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getConnectionDefinition_ConfigProperties() { + return (EReference)connectionDefinitionEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getAdminObject() { + return adminObjectEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAdminObject_AdminObjectInterface() { + return (EAttribute)adminObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAdminObject_AdminObjectClass() { + return (EAttribute)adminObjectEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getAdminObject_ConfigProperties() { + return (EReference)adminObjectEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getMessageListener() { + return messageListenerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMessageListener_MessageListenerType() { + return (EAttribute)messageListenerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getMessageListener_ActivationSpec() { + return (EReference)messageListenerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getActivationSpec() { + return activationSpecEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getActivationSpec_ActivationSpecClass() { + return (EAttribute)activationSpecEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getActivationSpec_RequiredConfigProperties() { + return (EReference)activationSpecEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getRequiredConfigPropertyType() { + return requiredConfigPropertyTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getRequiredConfigPropertyType_Name() { + return (EAttribute)requiredConfigPropertyTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getRequiredConfigPropertyType_Descriptions() { + return (EReference)requiredConfigPropertyTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getResourceAdapter() { + return resourceAdapterEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ManagedConnectionFactoryClass() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ConnectionFactoryInterface() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ConnectionFactoryImplClass() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ConnectionInterface() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ConnectionImplClass() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_TransactionSupport() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getResourceAdapter_ReauthenticationSupport() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getResourceAdapter_ResourceAdapterClass() { + return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getResourceAdapter_SecurityPermissions() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(8); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getResourceAdapter_AuthenticationMechanisms() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(9); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getResourceAdapter_ConfigProperties() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getResourceAdapter_OutboundResourceAdapter() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EReference getResourceAdapter_InboundResourceAdapter() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EReference getResourceAdapter_AdminObjects() { + return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(13); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSecurityPermission() { + return securityPermissionEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityPermission_Description() { + return (EAttribute)securityPermissionEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSecurityPermission_Specification() { + return (EAttribute)securityPermissionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSecurityPermission_Descriptions() { + return (EReference)securityPermissionEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getAuthenticationMechanism() { + return authenticationMechanismEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthenticationMechanism_Description() { + return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAuthenticationMechanism_AuthenticationMechanism() { + return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthenticationMechanism_AuthenticationMechanismType() { + return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthenticationMechanism_CredentialInterface() { + return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getConfigProperty() { + return configPropertyEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConfigProperty_Description() { + return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConfigProperty_Name() { + return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConfigProperty_Type() { + return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getConfigProperty_Value() { + return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getConfigProperty_Descriptions() { + return (EReference)configPropertyEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getTransactionSupportKind() { + return transactionSupportKindEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getAuthenticationMechanismType() { + return authenticationMechanismTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JcaFactory getJcaFactory() { + return (JcaFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + connectorEClass = createEClass(CONNECTOR); + createEAttribute(connectorEClass, CONNECTOR__VENDOR_NAME); + createEAttribute(connectorEClass, CONNECTOR__SPEC_VERSION); + createEAttribute(connectorEClass, CONNECTOR__EIS_TYPE); + createEAttribute(connectorEClass, CONNECTOR__VERSION); + createEReference(connectorEClass, CONNECTOR__LICENSE); + createEReference(connectorEClass, CONNECTOR__RESOURCE_ADAPTER); + + resourceAdapterEClass = createEClass(RESOURCE_ADAPTER); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_INTERFACE); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__TRANSACTION_SUPPORT); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT); + createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__SECURITY_PERMISSIONS); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__CONFIG_PROPERTIES); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER); + createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__ADMIN_OBJECTS); + + authenticationMechanismEClass = createEClass(AUTHENTICATION_MECHANISM); + createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__DESCRIPTION); + createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM); + createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE); + createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE); + createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE); + createEReference(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__DESCRIPTIONS); + + configPropertyEClass = createEClass(CONFIG_PROPERTY); + createEAttribute(configPropertyEClass, CONFIG_PROPERTY__DESCRIPTION); + createEAttribute(configPropertyEClass, CONFIG_PROPERTY__NAME); + createEAttribute(configPropertyEClass, CONFIG_PROPERTY__TYPE); + createEAttribute(configPropertyEClass, CONFIG_PROPERTY__VALUE); + createEReference(configPropertyEClass, CONFIG_PROPERTY__DESCRIPTIONS); + + securityPermissionEClass = createEClass(SECURITY_PERMISSION); + createEAttribute(securityPermissionEClass, SECURITY_PERMISSION__DESCRIPTION); + createEAttribute(securityPermissionEClass, SECURITY_PERMISSION__SPECIFICATION); + createEReference(securityPermissionEClass, SECURITY_PERMISSION__DESCRIPTIONS); + + licenseEClass = createEClass(LICENSE); + createEAttribute(licenseEClass, LICENSE__DESCRIPTION); + createEAttribute(licenseEClass, LICENSE__REQUIRED); + createEReference(licenseEClass, LICENSE__DESCRIPTIONS); + + inboundResourceAdapterEClass = createEClass(INBOUND_RESOURCE_ADAPTER); + createEReference(inboundResourceAdapterEClass, INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER); + + outboundResourceAdapterEClass = createEClass(OUTBOUND_RESOURCE_ADAPTER); + createEAttribute(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT); + createEAttribute(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT); + createEReference(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS); + createEReference(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); + + messageAdapterEClass = createEClass(MESSAGE_ADAPTER); + createEReference(messageAdapterEClass, MESSAGE_ADAPTER__MESSAGE_LISTENERS); + + connectionDefinitionEClass = createEClass(CONNECTION_DEFINITION); + createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS); + createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE); + createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS); + createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_INTERFACE); + createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS); + createEReference(connectionDefinitionEClass, CONNECTION_DEFINITION__CONFIG_PROPERTIES); + + adminObjectEClass = createEClass(ADMIN_OBJECT); + createEAttribute(adminObjectEClass, ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE); + createEAttribute(adminObjectEClass, ADMIN_OBJECT__ADMIN_OBJECT_CLASS); + createEReference(adminObjectEClass, ADMIN_OBJECT__CONFIG_PROPERTIES); + + messageListenerEClass = createEClass(MESSAGE_LISTENER); + createEAttribute(messageListenerEClass, MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE); + createEReference(messageListenerEClass, MESSAGE_LISTENER__ACTIVATION_SPEC); + + activationSpecEClass = createEClass(ACTIVATION_SPEC); + createEAttribute(activationSpecEClass, ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS); + createEReference(activationSpecEClass, ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES); + + requiredConfigPropertyTypeEClass = createEClass(REQUIRED_CONFIG_PROPERTY_TYPE); + createEAttribute(requiredConfigPropertyTypeEClass, REQUIRED_CONFIG_PROPERTY_TYPE__NAME); + createEReference(requiredConfigPropertyTypeEClass, REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS); + + // Create enums + authenticationMechanismTypeEEnum = createEEnum(AUTHENTICATION_MECHANISM_TYPE); + transactionSupportKindEEnum = createEEnum(TRANSACTION_SUPPORT_KIND); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Add supertypes to classes + connectorEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(connectorEClass, Connector.class, "Connector", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getConnector_VendorName(), ecorePackage.getEString(), "vendorName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnector_SpecVersion(), ecorePackage.getEString(), "specVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnector_EisType(), ecorePackage.getEString(), "eisType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnector_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getConnector_License(), this.getLicense(), null, "license", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getConnector_ResourceAdapter(), this.getResourceAdapter(), null, "resourceAdapter", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(resourceAdapterEClass, ResourceAdapter.class, "ResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ManagedConnectionFactoryClass(), ecorePackage.getEString(), "managedConnectionFactoryClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ConnectionFactoryInterface(), ecorePackage.getEString(), "connectionFactoryInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ConnectionFactoryImplClass(), ecorePackage.getEString(), "connectionFactoryImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ConnectionInterface(), ecorePackage.getEString(), "connectionInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ConnectionImplClass(), ecorePackage.getEString(), "connectionImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_TransactionSupport(), this.getTransactionSupportKind(), "transactionSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ReauthenticationSupport(), ecorePackage.getEBoolean(), "reauthenticationSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getResourceAdapter_ResourceAdapterClass(), ecorePackage.getEString(), "resourceAdapterClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_SecurityPermissions(), this.getSecurityPermission(), null, "securityPermissions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_AuthenticationMechanisms(), this.getAuthenticationMechanism(), null, "authenticationMechanisms", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_OutboundResourceAdapter(), this.getOutboundResourceAdapter(), null, "outboundResourceAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_InboundResourceAdapter(), this.getInboundResourceAdapter(), null, "inboundResourceAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getResourceAdapter_AdminObjects(), this.getAdminObject(), null, "adminObjects", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(authenticationMechanismEClass, AuthenticationMechanism.class, "AuthenticationMechanism", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getAuthenticationMechanism_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAuthenticationMechanism_AuthenticationMechanism(), ecorePackage.getEString(), "authenticationMechanism", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAuthenticationMechanism_AuthenticationMechanismType(), this.getAuthenticationMechanismType(), "authenticationMechanismType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAuthenticationMechanism_CredentialInterface(), ecorePackage.getEString(), "credentialInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAuthenticationMechanism_CustomAuthMechType(), ecorePackage.getEString(), "customAuthMechType", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getAuthenticationMechanism_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(configPropertyEClass, ConfigProperty.class, "ConfigProperty", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getConfigProperty_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConfigProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConfigProperty_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConfigProperty_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getConfigProperty_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(securityPermissionEClass, SecurityPermission.class, "SecurityPermission", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getSecurityPermission_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getSecurityPermission_Specification(), ecorePackage.getEString(), "specification", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityPermission_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(licenseEClass, License.class, "License", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getLicense_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getLicense_Required(), ecorePackage.getEBoolean(), "required", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getLicense_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(inboundResourceAdapterEClass, InboundResourceAdapter.class, "InboundResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getInboundResourceAdapter_MessageAdapter(), this.getMessageAdapter(), null, "messageAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(outboundResourceAdapterEClass, OutboundResourceAdapter.class, "OutboundResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getOutboundResourceAdapter_ReauthenticationSupport(), ecorePackage.getEBoolean(), "reauthenticationSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getOutboundResourceAdapter_TransactionSupport(), this.getTransactionSupportKind(), "transactionSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getOutboundResourceAdapter_ConnectionDefinitions(), this.getConnectionDefinition(), null, "connectionDefinitions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getOutboundResourceAdapter_AuthenticationMechanisms(), this.getAuthenticationMechanism(), null, "authenticationMechanisms", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(messageAdapterEClass, MessageAdapter.class, "MessageAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getMessageAdapter_MessageListeners(), this.getMessageListener(), null, "messageListeners", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(connectionDefinitionEClass, ConnectionDefinition.class, "ConnectionDefinition", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getConnectionDefinition_ManagedConnectionFactoryClass(), ecorePackage.getEString(), "managedConnectionFactoryClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnectionDefinition_ConnectionFactoryInterface(), ecorePackage.getEString(), "connectionFactoryInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnectionDefinition_ConnectionFactoryImplClass(), ecorePackage.getEString(), "connectionFactoryImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnectionDefinition_ConnectionInterface(), ecorePackage.getEString(), "connectionInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getConnectionDefinition_ConnectionImplClass(), ecorePackage.getEString(), "connectionImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getConnectionDefinition_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(adminObjectEClass, AdminObject.class, "AdminObject", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getAdminObject_AdminObjectInterface(), ecorePackage.getEString(), "adminObjectInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAdminObject_AdminObjectClass(), ecorePackage.getEString(), "adminObjectClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getAdminObject_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(messageListenerEClass, MessageListener.class, "MessageListener", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getMessageListener_MessageListenerType(), ecorePackage.getEString(), "messageListenerType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getMessageListener_ActivationSpec(), this.getActivationSpec(), null, "activationSpec", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(activationSpecEClass, ActivationSpec.class, "ActivationSpec", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getActivationSpec_ActivationSpecClass(), ecorePackage.getEString(), "activationSpecClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getActivationSpec_RequiredConfigProperties(), this.getRequiredConfigPropertyType(), null, "requiredConfigProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(requiredConfigPropertyTypeEClass, RequiredConfigPropertyType.class, "RequiredConfigPropertyType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getRequiredConfigPropertyType_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getRequiredConfigPropertyType_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(authenticationMechanismTypeEEnum, AuthenticationMechanismType.class, "AuthenticationMechanismType");//$NON-NLS-1$ + addEEnumLiteral(authenticationMechanismTypeEEnum, AuthenticationMechanismType.BASIC_PASSWORD_LITERAL);//$NON-NLS-1$ + addEEnumLiteral(authenticationMechanismTypeEEnum, AuthenticationMechanismType.KERBV5_LITERAL);//$NON-NLS-1$ + + initEEnum(transactionSupportKindEEnum, TransactionSupportKind.class, "TransactionSupportKind");//$NON-NLS-1$ + addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.NO_TRANSACTION_LITERAL); + addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.LOCAL_TRANSACTION_LITERAL); + addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.XA_TRANSACTION_LITERAL); + + // Create resource + createResource(eNS_URI); + } + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthenticationMechanism_CustomAuthMechType() { + return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getAuthenticationMechanism_Descriptions() { + return (EReference)authenticationMechanismEClass.getEStructuralFeatures().get(5); + } + +} //JcaPackageImpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/LicenseImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/LicenseImpl.java new file mode 100644 index 000000000..99de87f49 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/LicenseImpl.java @@ -0,0 +1,275 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; + + +/** + * Specifies licensing requirements for the resource adapter module. Specifies whether a license is required to deploy and use this resource adapter, and an optional description of the licensing terms (examples: duration of license, number of connection restrictions). + */ +public class LicenseImpl extends EObjectImpl implements License, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected static final boolean REQUIRED_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean required = REQUIRED_EDEFAULT; + /** + * This is true if the Required attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean requiredESet = false; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected LicenseImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getLicense(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.LICENSE__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public boolean isRequired() { + return required; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRequired(boolean newRequired) { + boolean oldRequired = required; + required = newRequired; + boolean oldRequiredESet = requiredESet; + requiredESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.LICENSE__REQUIRED, oldRequired, required, !oldRequiredESet)); + } + + /** + * + * + * @generated + */ + public void unsetRequired() { + boolean oldRequired = required; + boolean oldRequiredESet = requiredESet; + required = REQUIRED_EDEFAULT; + requiredESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.LICENSE__REQUIRED, oldRequired, REQUIRED_EDEFAULT, oldRequiredESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetRequired() { + return requiredESet; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.LICENSE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.LICENSE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.LICENSE__DESCRIPTION: + return getDescription(); + case JcaPackage.LICENSE__REQUIRED: + return isRequired() ? Boolean.TRUE : Boolean.FALSE; + case JcaPackage.LICENSE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.LICENSE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JcaPackage.LICENSE__REQUIRED: + return isSetRequired(); + case JcaPackage.LICENSE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.LICENSE__DESCRIPTION: + setDescription((String)newValue); + return; + case JcaPackage.LICENSE__REQUIRED: + setRequired(((Boolean)newValue).booleanValue()); + return; + case JcaPackage.LICENSE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.LICENSE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JcaPackage.LICENSE__REQUIRED: + unsetRequired(); + return; + case JcaPackage.LICENSE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", required: ");//$NON-NLS-1$ + if (requiredESet) result.append(required); else result.append("");//$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageAdapterImpl.java new file mode 100644 index 000000000..1297a9cb1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageAdapterImpl.java @@ -0,0 +1,154 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.MessageAdapter; +import org.eclipse.jst.j2ee.jca.MessageListener; + + +/** + * + * An implementation of the model object 'Message Adapter'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageAdapterImpl#getMessageListeners Message Listeners}
  • + *
+ *

+ * + * @generated + */ +public class MessageAdapterImpl extends EObjectImpl implements MessageAdapter { + /** + * The cached value of the '{@link #getMessageListeners() Message Listeners}' containment reference list. + * + * + * @see #getMessageListeners() + * @generated + * @ordered + */ + protected EList messageListeners = null; + + /** + * + * + * @generated + */ + protected MessageAdapterImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getMessageAdapter(); + } + + /** + * + * + * @generated + */ + public EList getMessageListeners() { + if (messageListeners == null) { + messageListeners = new EObjectContainmentEList(MessageListener.class, this, JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS); + } + return messageListeners; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: + return ((InternalEList)getMessageListeners()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: + return getMessageListeners(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: + getMessageListeners().clear(); + getMessageListeners().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: + getMessageListeners().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: + return messageListeners != null && !messageListeners.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //MessageAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageListenerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageListenerImpl.java new file mode 100644 index 000000000..c7cd6ca04 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/MessageListenerImpl.java @@ -0,0 +1,248 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.MessageListener; + + +/** + * + * An implementation of the model object 'Message Listener'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageListenerImpl#getMessageListenerType Message Listener Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageListenerImpl#getActivationSpec Activation Spec}
  • + *
+ *

+ * + * @generated + */ +public class MessageListenerImpl extends EObjectImpl implements MessageListener { + /** + * The default value of the '{@link #getMessageListenerType() Message Listener Type}' attribute. + * + * + * @see #getMessageListenerType() + * @generated + * @ordered + */ + protected static final String MESSAGE_LISTENER_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessageListenerType() Message Listener Type}' attribute. + * + * + * @see #getMessageListenerType() + * @generated + * @ordered + */ + protected String messageListenerType = MESSAGE_LISTENER_TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getActivationSpec() Activation Spec}' containment reference. + * + * + * @see #getActivationSpec() + * @generated + * @ordered + */ + protected ActivationSpec activationSpec = null; + + /** + * + * + * @generated + */ + protected MessageListenerImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getMessageListener(); + } + + /** + * + * + * @generated + */ + public String getMessageListenerType() { + return messageListenerType; + } + + /** + * + * + * @generated + */ + public void setMessageListenerType(String newMessageListenerType) { + String oldMessageListenerType = messageListenerType; + messageListenerType = newMessageListenerType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE, oldMessageListenerType, messageListenerType)); + } + + /** + * + * + * @generated + */ + public ActivationSpec getActivationSpec() { + return activationSpec; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetActivationSpec(ActivationSpec newActivationSpec, NotificationChain msgs) { + ActivationSpec oldActivationSpec = activationSpec; + activationSpec = newActivationSpec; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, oldActivationSpec, newActivationSpec); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setActivationSpec(ActivationSpec newActivationSpec) { + if (newActivationSpec != activationSpec) { + NotificationChain msgs = null; + if (activationSpec != null) + msgs = ((InternalEObject)activationSpec).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, null, msgs); + if (newActivationSpec != null) + msgs = ((InternalEObject)newActivationSpec).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, null, msgs); + msgs = basicSetActivationSpec(newActivationSpec, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, newActivationSpec, newActivationSpec)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: + return basicSetActivationSpec(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: + return getMessageListenerType(); + case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: + return getActivationSpec(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: + setMessageListenerType((String)newValue); + return; + case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: + setActivationSpec((ActivationSpec)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: + setMessageListenerType(MESSAGE_LISTENER_TYPE_EDEFAULT); + return; + case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: + setActivationSpec((ActivationSpec)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: + return MESSAGE_LISTENER_TYPE_EDEFAULT == null ? messageListenerType != null : !MESSAGE_LISTENER_TYPE_EDEFAULT.equals(messageListenerType); + case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: + return activationSpec != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (messageListenerType: ");//$NON-NLS-1$ + result.append(messageListenerType); + result.append(')'); + return result.toString(); + } + +} //MessageListenerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/OutboundResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/OutboundResourceAdapterImpl.java new file mode 100644 index 000000000..66b0c98b2 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/OutboundResourceAdapterImpl.java @@ -0,0 +1,383 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.TransactionSupportKind; + + +/** + * + * An implementation of the model object 'Outbound Resource Adapter'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#isReauthenticationSupport Reauthentication Support}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getTransactionSupport Transaction Support}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getConnectionDefinitions Connection Definitions}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getAuthenticationMechanisms Authentication Mechanisms}
  • + *
+ *

+ * + * @generated + */ +public class OutboundResourceAdapterImpl extends EObjectImpl implements OutboundResourceAdapter { + /** + * The default value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. + * + * + * @see #isReauthenticationSupport() + * @generated + * @ordered + */ + protected static final boolean REAUTHENTICATION_SUPPORT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. + * + * + * @see #isReauthenticationSupport() + * @generated + * @ordered + */ + protected boolean reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; + + /** + * This is true if the Reauthentication Support attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean reauthenticationSupportESet = false; + + /** + * The default value of the '{@link #getTransactionSupport() Transaction Support}' attribute. + * + * + * @see #getTransactionSupport() + * @generated + * @ordered + */ + protected static final TransactionSupportKind TRANSACTION_SUPPORT_EDEFAULT = TransactionSupportKind.NO_TRANSACTION_LITERAL; + + /** + * The cached value of the '{@link #getTransactionSupport() Transaction Support}' attribute. + * + * + * @see #getTransactionSupport() + * @generated + * @ordered + */ + protected TransactionSupportKind transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; + + /** + * This is true if the Transaction Support attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transactionSupportESet = false; + + /** + * The cached value of the '{@link #getConnectionDefinitions() Connection Definitions}' containment reference list. + * + * + * @see #getConnectionDefinitions() + * @generated + * @ordered + */ + protected EList connectionDefinitions = null; + + /** + * The cached value of the '{@link #getAuthenticationMechanisms() Authentication Mechanisms}' containment reference list. + * + * + * @see #getAuthenticationMechanisms() + * @generated + * @ordered + */ + protected EList authenticationMechanisms = null; + + /** + * + * + * @generated + */ + protected OutboundResourceAdapterImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getOutboundResourceAdapter(); + } + + /** + * + * + * @generated + */ + public boolean isReauthenticationSupport() { + return reauthenticationSupport; + } + + /** + * + * + * @generated + */ + public void setReauthenticationSupport(boolean newReauthenticationSupport) { + boolean oldReauthenticationSupport = reauthenticationSupport; + reauthenticationSupport = newReauthenticationSupport; + boolean oldReauthenticationSupportESet = reauthenticationSupportESet; + reauthenticationSupportESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, reauthenticationSupport, !oldReauthenticationSupportESet)); + } + + /** + * + * + * @generated + */ + public void unsetReauthenticationSupport() { + boolean oldReauthenticationSupport = reauthenticationSupport; + boolean oldReauthenticationSupportESet = reauthenticationSupportESet; + reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; + reauthenticationSupportESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, REAUTHENTICATION_SUPPORT_EDEFAULT, oldReauthenticationSupportESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetReauthenticationSupport() { + return reauthenticationSupportESet; + } + + /** + * + * + * @generated + */ + public TransactionSupportKind getTransactionSupport() { + return transactionSupport; + } + + /** + * + * + * @generated + */ + public void setTransactionSupport(TransactionSupportKind newTransactionSupport) { + TransactionSupportKind oldTransactionSupport = transactionSupport; + transactionSupport = newTransactionSupport == null ? TRANSACTION_SUPPORT_EDEFAULT : newTransactionSupport; + boolean oldTransactionSupportESet = transactionSupportESet; + transactionSupportESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, transactionSupport, !oldTransactionSupportESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransactionSupport() { + TransactionSupportKind oldTransactionSupport = transactionSupport; + boolean oldTransactionSupportESet = transactionSupportESet; + transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; + transactionSupportESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, TRANSACTION_SUPPORT_EDEFAULT, oldTransactionSupportESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransactionSupport() { + return transactionSupportESet; + } + + /** + * + * + * @generated + */ + public EList getConnectionDefinitions() { + if (connectionDefinitions == null) { + connectionDefinitions = new EObjectContainmentEList(ConnectionDefinition.class, this, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS); + } + return connectionDefinitions; + } + + /** + * + * + * @generated + */ + public EList getAuthenticationMechanisms() { + if (authenticationMechanisms == null) { + authenticationMechanisms = new EObjectContainmentEList(AuthenticationMechanism.class, this, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); + } + return authenticationMechanisms; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: + return ((InternalEList)getConnectionDefinitions()).basicRemove(otherEnd, msgs); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return ((InternalEList)getAuthenticationMechanisms()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + return isReauthenticationSupport() ? Boolean.TRUE : Boolean.FALSE; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + return getTransactionSupport(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: + return getConnectionDefinitions(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return getAuthenticationMechanisms(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + setReauthenticationSupport(((Boolean)newValue).booleanValue()); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + setTransactionSupport((TransactionSupportKind)newValue); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: + getConnectionDefinitions().clear(); + getConnectionDefinitions().addAll((Collection)newValue); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + getAuthenticationMechanisms().clear(); + getAuthenticationMechanisms().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + unsetReauthenticationSupport(); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + unsetTransactionSupport(); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: + getConnectionDefinitions().clear(); + return; + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + getAuthenticationMechanisms().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + return isSetReauthenticationSupport(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + return isSetTransactionSupport(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: + return connectionDefinitions != null && !connectionDefinitions.isEmpty(); + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return authenticationMechanisms != null && !authenticationMechanisms.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (reauthenticationSupport: ");//$NON-NLS-1$ + if (reauthenticationSupportESet) result.append(reauthenticationSupport); else result.append("");//$NON-NLS-1$ + result.append(", transactionSupport: ");//$NON-NLS-1$ + if (transactionSupportESet) result.append(transactionSupport); else result.append("");//$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} //OutboundResourceAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/RequiredConfigPropertyTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/RequiredConfigPropertyTypeImpl.java new file mode 100644 index 000000000..4f11b29ee --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/RequiredConfigPropertyTypeImpl.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; + + +/** + * + * An implementation of the model object 'Required Config Property Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.RequiredConfigPropertyTypeImpl#getName Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.RequiredConfigPropertyTypeImpl#getDescriptions Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class RequiredConfigPropertyTypeImpl extends EObjectImpl implements RequiredConfigPropertyType { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + /** + * + * + * @generated + */ + protected RequiredConfigPropertyTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getRequiredConfigPropertyType(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: + return getName(); + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: + setName((String)newValue); + return; + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: + setName(NAME_EDEFAULT); + return; + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: ");//$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} //RequiredConfigPropertyTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ResourceAdapterImpl.java new file mode 100644 index 000000000..1eb9d66f7 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/ResourceAdapterImpl.java @@ -0,0 +1,817 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; +import org.eclipse.jst.j2ee.jca.TransactionSupportKind; + + +/** + * Specifies information about the resource adapter. The information includes fully-qualified names of class//interfaces required as part of the connector architecture specified contracts, level of transaction support provided, configurable properties for ManagedConnectionFactory instances, one or more authentication mechanisms supported and additional + * required security permissions. + * + * If there is no authentication-mechanism specified as part of + * resource adapter element then the resource adapter does not + * support any standard security authentication mechanisms as part + * of security contract. The application server ignores the security + * part of the system contracts in this case. + + */ +public class ResourceAdapterImpl extends EObjectImpl implements ResourceAdapter, EObject{ + + /** + * The default value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. + * + * + * @see #getManagedConnectionFactoryClass() + * @generated + * @ordered + */ + protected static final String MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String managedConnectionFactoryClass = MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT; + /** + * The default value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. + * + * + * @see #getConnectionFactoryInterface() + * @generated + * @ordered + */ + protected static final String CONNECTION_FACTORY_INTERFACE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String connectionFactoryInterface = CONNECTION_FACTORY_INTERFACE_EDEFAULT; + /** + * The default value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. + * + * + * @see #getConnectionFactoryImplClass() + * @generated + * @ordered + */ + protected static final String CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String connectionFactoryImplClass = CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT; + /** + * The default value of the '{@link #getConnectionInterface() Connection Interface}' attribute. + * + * + * @see #getConnectionInterface() + * @generated + * @ordered + */ + protected static final String CONNECTION_INTERFACE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String connectionInterface = CONNECTION_INTERFACE_EDEFAULT; + /** + * The default value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. + * + * + * @see #getConnectionImplClass() + * @generated + * @ordered + */ + protected static final String CONNECTION_IMPL_CLASS_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String connectionImplClass = CONNECTION_IMPL_CLASS_EDEFAULT; + /** + * The default value of the '{@link #getTransactionSupport() Transaction Support}' attribute. + * + * + * @see #getTransactionSupport() + * @generated + * @ordered + */ + protected static final TransactionSupportKind TRANSACTION_SUPPORT_EDEFAULT = TransactionSupportKind.NO_TRANSACTION_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected TransactionSupportKind transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; + /** + * This is true if the Transaction Support attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transactionSupportESet = false; + + /** + * The default value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. + * + * + * @see #isReauthenticationSupport() + * @generated + * @ordered + */ + protected static final boolean REAUTHENTICATION_SUPPORT_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; + /** + * This is true if the Reauthentication Support attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean reauthenticationSupportESet = false; + + /** + * The default value of the '{@link #getResourceAdapterClass() Resource Adapter Class}' attribute. + * + * + * @see #getResourceAdapterClass() + * @generated + * @ordered + */ + protected static final String RESOURCE_ADAPTER_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourceAdapterClass() Resource Adapter Class}' attribute. + * + * + * @see #getResourceAdapterClass() + * @generated + * @ordered + */ + protected String resourceAdapterClass = RESOURCE_ADAPTER_CLASS_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityPermissions = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList authenticationMechanisms = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList configProperties = null; + /** + * The cached value of the '{@link #getOutboundResourceAdapter() Outbound Resource Adapter}' containment reference. + * + * + * @see #getOutboundResourceAdapter() + * @generated + * @ordered + */ + protected OutboundResourceAdapter outboundResourceAdapter = null; + + /** + * The cached value of the '{@link #getInboundResourceAdapter() Inbound Resource Adapter}' containment reference. + * + * + * @see #getInboundResourceAdapter() + * @generated + * @ordered + */ + protected InboundResourceAdapter inboundResourceAdapter = null; + + /** + * The cached value of the '{@link #getAdminObjects() Admin Objects}' containment reference list. + * + * + * @see #getAdminObjects() + * @generated + * @ordered + */ + protected EList adminObjects = null; + + protected ResourceAdapterImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getResourceAdapter(); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the fully qualified name of the Java class that implements the javax.resource.spi.Managed-ConnectionFactory interface. This Java class is provided as part of resource adapter's implementation of connector architecture specified contracts. + + */ + public String getManagedConnectionFactoryClass() { + return managedConnectionFactoryClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setManagedConnectionFactoryClass(String newManagedConnectionFactoryClass) { + String oldManagedConnectionFactoryClass = managedConnectionFactoryClass; + managedConnectionFactoryClass = newManagedConnectionFactoryClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS, oldManagedConnectionFactoryClass, managedConnectionFactoryClass)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the fully-qualified name of the ConnectionFactory interface supported by the resource adapter. + + */ + public String getConnectionFactoryInterface() { + return connectionFactoryInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setConnectionFactoryInterface(String newConnectionFactoryInterface) { + String oldConnectionFactoryInterface = connectionFactoryInterface; + connectionFactoryInterface = newConnectionFactoryInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE, oldConnectionFactoryInterface, connectionFactoryInterface)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the fully-qualified name of the ConnectionFactory class that implements resource adapter specific ConnectionFactory interface. + */ + public String getConnectionFactoryImplClass() { + return connectionFactoryImplClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setConnectionFactoryImplClass(String newConnectionFactoryImplClass) { + String oldConnectionFactoryImplClass = connectionFactoryImplClass; + connectionFactoryImplClass = newConnectionFactoryImplClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS, oldConnectionFactoryImplClass, connectionFactoryImplClass)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getConnectionInterface() { + return connectionInterface; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setConnectionInterface(String newConnectionInterface) { + String oldConnectionInterface = connectionInterface; + connectionInterface = newConnectionInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE, oldConnectionInterface, connectionInterface)); + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies the fully-qualified name of the Connection interface supported by the resource adapter. + */ + public String getConnectionImplClass() { + return connectionImplClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setConnectionImplClass(String newConnectionImplClass) { + String oldConnectionImplClass = connectionImplClass; + connectionImplClass = newConnectionImplClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS, oldConnectionImplClass, connectionImplClass)); + } + + /** + * @generated This field/method will be replaced during code generation + * The transaction-support element specifies the level of transaction + * support provided by the resource adapter. + * The value of transaction-support must be one of the following: + * NoTransaction + * LocalTransaction + * XATransaction + */ + public TransactionSupportKind getTransactionSupport() { + return transactionSupport; + } + + /** + * + * + * @generated + */ + public void setTransactionSupport(TransactionSupportKind newTransactionSupport) { + TransactionSupportKind oldTransactionSupport = transactionSupport; + transactionSupport = newTransactionSupport == null ? TRANSACTION_SUPPORT_EDEFAULT : newTransactionSupport; + boolean oldTransactionSupportESet = transactionSupportESet; + transactionSupportESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, transactionSupport, !oldTransactionSupportESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransactionSupport() { + TransactionSupportKind oldTransactionSupport = transactionSupport; + boolean oldTransactionSupportESet = transactionSupportESet; + transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; + transactionSupportESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, TRANSACTION_SUPPORT_EDEFAULT, oldTransactionSupportESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransactionSupport() { + return transactionSupportESet; + } + + /** + * @generated This field/method will be replaced during code generation + * Specifies whether the resource adapter implementation supports re-authentication of existing Managed-Connection instance. Note that this information is for the resource adapter implementation and not for the underlying EIS instance. + */ + public boolean isReauthenticationSupport() { + return reauthenticationSupport; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setReauthenticationSupport(boolean newReauthenticationSupport) { + boolean oldReauthenticationSupport = reauthenticationSupport; + reauthenticationSupport = newReauthenticationSupport; + boolean oldReauthenticationSupportESet = reauthenticationSupportESet; + reauthenticationSupportESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, reauthenticationSupport, !oldReauthenticationSupportESet)); + } + + /** + * + * + * @generated + */ + public void unsetReauthenticationSupport() { + boolean oldReauthenticationSupport = reauthenticationSupport; + boolean oldReauthenticationSupportESet = reauthenticationSupportESet; + reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; + reauthenticationSupportESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, REAUTHENTICATION_SUPPORT_EDEFAULT, oldReauthenticationSupportESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetReauthenticationSupport() { + return reauthenticationSupportESet; + } + + /** + * + * + * @generated + */ + public String getResourceAdapterClass() { + return resourceAdapterClass; + } + + /** + * + * + * @generated + */ + public void setResourceAdapterClass(String newResourceAdapterClass) { + String oldResourceAdapterClass = resourceAdapterClass; + resourceAdapterClass = newResourceAdapterClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS, oldResourceAdapterClass, resourceAdapterClass)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getSecurityPermissions() { + if (securityPermissions == null) { + securityPermissions = new EObjectContainmentEList(SecurityPermission.class, this, JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS); + } + return securityPermissions; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getAuthenticationMechanisms() { + if (authenticationMechanisms == null) { + authenticationMechanisms = new EObjectContainmentEList(AuthenticationMechanism.class, this, JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); + } + return authenticationMechanisms; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getConfigProperties() { + if (configProperties == null) { + configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES); + } + return configProperties; + } + + /** + * + * + * @generated + */ + public OutboundResourceAdapter getOutboundResourceAdapter() { + return outboundResourceAdapter; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter, NotificationChain msgs) { + OutboundResourceAdapter oldOutboundResourceAdapter = outboundResourceAdapter; + outboundResourceAdapter = newOutboundResourceAdapter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, oldOutboundResourceAdapter, newOutboundResourceAdapter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter) { + if (newOutboundResourceAdapter != outboundResourceAdapter) { + NotificationChain msgs = null; + if (outboundResourceAdapter != null) + msgs = ((InternalEObject)outboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs); + if (newOutboundResourceAdapter != null) + msgs = ((InternalEObject)newOutboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs); + msgs = basicSetOutboundResourceAdapter(newOutboundResourceAdapter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, newOutboundResourceAdapter, newOutboundResourceAdapter)); + } + + /** + * + * + * @generated + */ + public InboundResourceAdapter getInboundResourceAdapter() { + return inboundResourceAdapter; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter, NotificationChain msgs) { + InboundResourceAdapter oldInboundResourceAdapter = inboundResourceAdapter; + inboundResourceAdapter = newInboundResourceAdapter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, oldInboundResourceAdapter, newInboundResourceAdapter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter) { + if (newInboundResourceAdapter != inboundResourceAdapter) { + NotificationChain msgs = null; + if (inboundResourceAdapter != null) + msgs = ((InternalEObject)inboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs); + if (newInboundResourceAdapter != null) + msgs = ((InternalEObject)newInboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs); + msgs = basicSetInboundResourceAdapter(newInboundResourceAdapter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, newInboundResourceAdapter, newInboundResourceAdapter)); + } + + /** + * + * + * @generated + */ + public EList getAdminObjects() { + if (adminObjects == null) { + adminObjects = new EObjectContainmentEList(AdminObject.class, this, JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS); + } + return adminObjects; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: + return ((InternalEList)getSecurityPermissions()).basicRemove(otherEnd, msgs); + case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return ((InternalEList)getAuthenticationMechanisms()).basicRemove(otherEnd, msgs); + case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: + return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); + case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: + return basicSetOutboundResourceAdapter(null, msgs); + case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: + return basicSetInboundResourceAdapter(null, msgs); + case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: + return ((InternalEList)getAdminObjects()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: + return getManagedConnectionFactoryClass(); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: + return getConnectionFactoryInterface(); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: + return getConnectionFactoryImplClass(); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: + return getConnectionInterface(); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: + return getConnectionImplClass(); + case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + return getTransactionSupport(); + case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + return isReauthenticationSupport() ? Boolean.TRUE : Boolean.FALSE; + case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: + return getResourceAdapterClass(); + case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: + return getSecurityPermissions(); + case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return getAuthenticationMechanisms(); + case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: + return getConfigProperties(); + case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: + return getOutboundResourceAdapter(); + case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: + return getInboundResourceAdapter(); + case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: + return getAdminObjects(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: + return MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT == null ? managedConnectionFactoryClass != null : !MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT.equals(managedConnectionFactoryClass); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: + return CONNECTION_FACTORY_INTERFACE_EDEFAULT == null ? connectionFactoryInterface != null : !CONNECTION_FACTORY_INTERFACE_EDEFAULT.equals(connectionFactoryInterface); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: + return CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT == null ? connectionFactoryImplClass != null : !CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT.equals(connectionFactoryImplClass); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: + return CONNECTION_INTERFACE_EDEFAULT == null ? connectionInterface != null : !CONNECTION_INTERFACE_EDEFAULT.equals(connectionInterface); + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: + return CONNECTION_IMPL_CLASS_EDEFAULT == null ? connectionImplClass != null : !CONNECTION_IMPL_CLASS_EDEFAULT.equals(connectionImplClass); + case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + return isSetTransactionSupport(); + case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + return isSetReauthenticationSupport(); + case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: + return RESOURCE_ADAPTER_CLASS_EDEFAULT == null ? resourceAdapterClass != null : !RESOURCE_ADAPTER_CLASS_EDEFAULT.equals(resourceAdapterClass); + case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: + return securityPermissions != null && !securityPermissions.isEmpty(); + case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + return authenticationMechanisms != null && !authenticationMechanisms.isEmpty(); + case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: + return configProperties != null && !configProperties.isEmpty(); + case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: + return outboundResourceAdapter != null; + case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: + return inboundResourceAdapter != null; + case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: + return adminObjects != null && !adminObjects.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: + setManagedConnectionFactoryClass((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: + setConnectionFactoryInterface((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: + setConnectionFactoryImplClass((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: + setConnectionInterface((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: + setConnectionImplClass((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + setTransactionSupport((TransactionSupportKind)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + setReauthenticationSupport(((Boolean)newValue).booleanValue()); + return; + case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: + setResourceAdapterClass((String)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: + getSecurityPermissions().clear(); + getSecurityPermissions().addAll((Collection)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + getAuthenticationMechanisms().clear(); + getAuthenticationMechanisms().addAll((Collection)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: + getConfigProperties().clear(); + getConfigProperties().addAll((Collection)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: + setOutboundResourceAdapter((OutboundResourceAdapter)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: + setInboundResourceAdapter((InboundResourceAdapter)newValue); + return; + case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: + getAdminObjects().clear(); + getAdminObjects().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: + setManagedConnectionFactoryClass(MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: + setConnectionFactoryInterface(CONNECTION_FACTORY_INTERFACE_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: + setConnectionFactoryImplClass(CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: + setConnectionInterface(CONNECTION_INTERFACE_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: + setConnectionImplClass(CONNECTION_IMPL_CLASS_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: + unsetTransactionSupport(); + return; + case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: + unsetReauthenticationSupport(); + return; + case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: + setResourceAdapterClass(RESOURCE_ADAPTER_CLASS_EDEFAULT); + return; + case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: + getSecurityPermissions().clear(); + return; + case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: + getAuthenticationMechanisms().clear(); + return; + case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: + getConfigProperties().clear(); + return; + case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: + setOutboundResourceAdapter((OutboundResourceAdapter)null); + return; + case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: + setInboundResourceAdapter((InboundResourceAdapter)null); + return; + case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: + getAdminObjects().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (managedConnectionFactoryClass: ");//$NON-NLS-1$ + result.append(managedConnectionFactoryClass); + result.append(", connectionFactoryInterface: ");//$NON-NLS-1$ + result.append(connectionFactoryInterface); + result.append(", connectionFactoryImplClass: ");//$NON-NLS-1$ + result.append(connectionFactoryImplClass); + result.append(", connectionInterface: ");//$NON-NLS-1$ + result.append(connectionInterface); + result.append(", connectionImplClass: ");//$NON-NLS-1$ + result.append(connectionImplClass); + result.append(", transactionSupport: ");//$NON-NLS-1$ + if (transactionSupportESet) result.append(transactionSupport); else result.append("");//$NON-NLS-1$ + result.append(", reauthenticationSupport: ");//$NON-NLS-1$ + if (reauthenticationSupportESet) result.append(reauthenticationSupport); else result.append("");//$NON-NLS-1$ + result.append(", resourceAdapterClass: ");//$NON-NLS-1$ + result.append(resourceAdapterClass); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/SecurityPermissionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/SecurityPermissionImpl.java new file mode 100644 index 000000000..4a755b51d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/impl/SecurityPermissionImpl.java @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.SecurityPermission; + + +/** + * Specifies a security permission that is required by the resource adapter code. + * + * The security permission listed in the deployment descriptor are ones that are different from those required by the default permission set as specified in the connector specification. The optional description can mention specific reason that resource adapter requires a given security permission. + + */ +public class SecurityPermissionImpl extends EObjectImpl implements SecurityPermission, EObject{ + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getSpecification() Specification}' attribute. + * + * + * @see #getSpecification() + * @generated + * @ordered + */ + protected static final String SPECIFICATION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String specification = SPECIFICATION_EDEFAULT; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected SecurityPermissionImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JcaPackage.eINSTANCE.getSecurityPermission(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.SECURITY_PERMISSION__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The element permission-spec specifies a security permission based on the Security policy file syntax. + + */ + public String getSpecification() { + return specification; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSpecification(String newSpecification) { + String oldSpecification = specification; + specification = newSpecification; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.SECURITY_PERMISSION__SPECIFICATION, oldSpecification, specification)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: + return getDescription(); + case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: + return getSpecification(); + case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: + return SPECIFICATION_EDEFAULT == null ? specification != null : !SPECIFICATION_EDEFAULT.equals(specification); + case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: + setDescription((String)newValue); + return; + case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: + setSpecification((String)newValue); + return; + case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: + setSpecification(SPECIFICATION_EDEFAULT); + return; + case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", specification: ");//$NON-NLS-1$ + result.append(specification); + result.append(')'); + return result.toString(); + } + +} + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JCADescriptionHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JCADescriptionHelper.java new file mode 100644 index 000000000..1f5eee606 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JCADescriptionHelper.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.util; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; +import org.eclipse.jst.j2ee.jca.SecurityPermission; + + +/** + * @deprecated + */ +public class JCADescriptionHelper { + public static void setDescription(ConfigProperty property, String description, int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + property.setDescription(description); + break; + case J2EEVersionConstants.JCA_1_5_ID: { + Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); + descriptionObj.setValue(description); + property.getDescriptions().add(descriptionObj); + } + } + } + public static String getDescription(ConfigProperty property,int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + return property.getDescription(); + case J2EEVersionConstants.JCA_1_5_ID: { + EList localizedDescriptions = property.getDescriptions(); + if(localizedDescriptions == null || localizedDescriptions.size() == 0) + return null; + Description localizedDescription = (Description)localizedDescriptions.get(0); + if(localizedDescription != null) + return localizedDescription.getValue(); + } + } + return null; + } + public static void setDescription(SecurityPermission property, String description, int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + property.setDescription(description); + break; + case J2EEVersionConstants.JCA_1_5_ID: { + Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); + descriptionObj.setValue(description); + property.getDescriptions().add(descriptionObj); + } + } + } + + public static String getDescription(SecurityPermission property,int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + return property.getDescription(); + case J2EEVersionConstants.JCA_1_5_ID: { + EList localizedDescriptions = property.getDescriptions(); + if(localizedDescriptions == null || localizedDescriptions.size() == 0) + return null; + Description localizedDescription = (Description)localizedDescriptions.get(0); + if(localizedDescription != null) + return localizedDescription.getValue(); + } + } + return null; + } + public static void setDescription(License property, String description, int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + property.setDescription(description); + break; + case J2EEVersionConstants.JCA_1_5_ID: { + Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); + descriptionObj.setValue(description); + property.getDescriptions().add(descriptionObj); + } + } + } + + public static String getDescription(License property,int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + return property.getDescription(); + case J2EEVersionConstants.JCA_1_5_ID: { + EList localizedDescriptions = property.getDescriptions(); + if(localizedDescriptions == null || localizedDescriptions.size() == 0) + return null; + Description localizedDescription = (Description)localizedDescriptions.get(0); + if(localizedDescription != null) + return localizedDescription.getValue(); + } + } + return null; + } + public static void setDescription(AuthenticationMechanism property, String description, int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + property.setDescription(description); + break; + case J2EEVersionConstants.JCA_1_5_ID: { + Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); + descriptionObj.setValue(description); + property.getDescriptions().add(descriptionObj); + } + } + } + + public static String getDescription(AuthenticationMechanism property,int jcaVersionID) { + switch(jcaVersionID) { + case J2EEVersionConstants.JCA_1_0_ID: + return property.getDescription(); + case J2EEVersionConstants.JCA_1_5_ID: { + EList localizedDescriptions = property.getDescriptions(); + if(localizedDescriptions == null || localizedDescriptions.size() == 0) + return null; + Description localizedDescription = (Description)localizedDescriptions.get(0); + if(localizedDescription != null) + return localizedDescription.getValue(); + } + } + return null; + } + public static void setDescription(RequiredConfigPropertyType property, String description, int jcaVersionID) { + if(jcaVersionID == J2EEVersionConstants.JCA_1_5_ID) { + Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); + descriptionObj.setValue(description); + property.getDescriptions().add(descriptionObj); + } + } + public static String getDescription(RequiredConfigPropertyType property,int jcaVersionID) { + if(jcaVersionID == J2EEVersionConstants.JCA_1_5_ID) { + EList localizedDescriptions = property.getDescriptions(); + if(localizedDescriptions == null || localizedDescriptions.size() == 0) + return null; + Description localizedDescription = (Description)localizedDescriptions.get(0); + if(localizedDescription != null) + return localizedDescription.getValue(); + } + return null; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaAdapterFactory.java new file mode 100644 index 000000000..560c57e9c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaAdapterFactory.java @@ -0,0 +1,392 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.MessageAdapter; +import org.eclipse.jst.j2ee.jca.MessageListener; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; + + + +public class JcaAdapterFactory extends AdapterFactoryImpl { + protected static JcaPackage modelPackage; + + public JcaAdapterFactory() { + if (modelPackage == null) { + modelPackage = (JcaPackage)EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + protected JcaSwitch sw = new JcaSwitch() { + public Object caseConnector(Connector object) { + return createConnectorAdapter(); + } + public Object caseLicense(License object) { + return createLicenseAdapter(); + } + public Object caseResourceAdapter(ResourceAdapter object) { + return createResourceAdapterAdapter(); + } + public Object caseSecurityPermission(SecurityPermission object) { + return createSecurityPermissionAdapter(); + } + public Object caseAuthenticationMechanism(AuthenticationMechanism object) { + return createAuthenticationMechanismAdapter(); + } + public Object caseConfigProperty(ConfigProperty object) { + return createConfigPropertyAdapter(); + } + }; + + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); // sw + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createConnectorAdapter() { + return null; + } + + public Adapter createLicenseAdapter() { + return null; + } + + public Adapter createResourceAdapterAdapter() { + return null; + } + + public Adapter createSecurityPermissionAdapter() { + return null; + } + + public Adapter createAuthenticationMechanismAdapter() { + return null; + } + + public Adapter createConfigPropertyAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected JcaSwitch modelSwitch = + new JcaSwitch() { + public Object caseConnector(Connector object) { + return createConnectorAdapter(); + } + public Object caseResourceAdapter(ResourceAdapter object) { + return createResourceAdapterAdapter(); + } + public Object caseAuthenticationMechanism(AuthenticationMechanism object) { + return createAuthenticationMechanismAdapter(); + } + public Object caseConfigProperty(ConfigProperty object) { + return createConfigPropertyAdapter(); + } + public Object caseSecurityPermission(SecurityPermission object) { + return createSecurityPermissionAdapter(); + } + public Object caseLicense(License object) { + return createLicenseAdapter(); + } + public Object caseInboundResourceAdapter(InboundResourceAdapter object) { + return createInboundResourceAdapterAdapter(); + } + public Object caseOutboundResourceAdapter(OutboundResourceAdapter object) { + return createOutboundResourceAdapterAdapter(); + } + public Object caseMessageAdapter(MessageAdapter object) { + return createMessageAdapterAdapter(); + } + public Object caseConnectionDefinition(ConnectionDefinition object) { + return createConnectionDefinitionAdapter(); + } + public Object caseAdminObject(AdminObject object) { + return createAdminObjectAdapter(); + } + public Object caseMessageListener(MessageListener object) { + return createMessageListenerAdapter(); + } + public Object caseActivationSpec(ActivationSpec object) { + return createActivationSpecAdapter(); + } + public Object caseRequiredConfigPropertyType(RequiredConfigPropertyType object) { + return createRequiredConfigPropertyTypeAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createConnectorAdapterGen() { + + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createLicenseAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.InboundResourceAdapter Inbound Resource Adapter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.InboundResourceAdapter + * @generated + */ + public Adapter createInboundResourceAdapterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.OutboundResourceAdapter Outbound Resource Adapter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.OutboundResourceAdapter + * @generated + */ + public Adapter createOutboundResourceAdapterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.MessageAdapter Message Adapter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.MessageAdapter + * @generated + */ + public Adapter createMessageAdapterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.ConnectionDefinition Connection Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.ConnectionDefinition + * @generated + */ + public Adapter createConnectionDefinitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.AdminObject Admin Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.AdminObject + * @generated + */ + public Adapter createAdminObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.MessageListener Message Listener}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.MessageListener + * @generated + */ + public Adapter createMessageListenerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.ActivationSpec Activation Spec}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.ActivationSpec + * @generated + */ + public Adapter createActivationSpecAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.RequiredConfigPropertyType Required Config Property Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jca.RequiredConfigPropertyType + * @generated + */ + public Adapter createRequiredConfigPropertyTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createResourceAdapterAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSecurityPermissionAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAuthenticationMechanismAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createConfigPropertyAdapterGen() { + return null; + } + +} //JcaAdapterFactory + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaSwitch.java new file mode 100644 index 000000000..2756ea01b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jca/util/JcaSwitch.java @@ -0,0 +1,427 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jca.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.jca.ActivationSpec; +import org.eclipse.jst.j2ee.jca.AdminObject; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jca.License; +import org.eclipse.jst.j2ee.jca.MessageAdapter; +import org.eclipse.jst.j2ee.jca.MessageListener; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; + + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.jca.JcaPackage + * @generated + */ +public class JcaSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static JcaPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public JcaSwitch() { + if (modelPackage == null) { + modelPackage = JcaPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case JcaPackage.CONNECTOR: { + Connector connector = (Connector)theEObject; + Object result = caseConnector(connector); + if (result == null) result = caseCompatibilityDescriptionGroup(connector); + if (result == null) result = caseDescriptionGroup(connector); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.RESOURCE_ADAPTER: { + ResourceAdapter resourceAdapter = (ResourceAdapter)theEObject; + Object result = caseResourceAdapter(resourceAdapter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.AUTHENTICATION_MECHANISM: { + AuthenticationMechanism authenticationMechanism = (AuthenticationMechanism)theEObject; + Object result = caseAuthenticationMechanism(authenticationMechanism); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.CONFIG_PROPERTY: { + ConfigProperty configProperty = (ConfigProperty)theEObject; + Object result = caseConfigProperty(configProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.SECURITY_PERMISSION: { + SecurityPermission securityPermission = (SecurityPermission)theEObject; + Object result = caseSecurityPermission(securityPermission); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.LICENSE: { + License license = (License)theEObject; + Object result = caseLicense(license); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.INBOUND_RESOURCE_ADAPTER: { + InboundResourceAdapter inboundResourceAdapter = (InboundResourceAdapter)theEObject; + Object result = caseInboundResourceAdapter(inboundResourceAdapter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.OUTBOUND_RESOURCE_ADAPTER: { + OutboundResourceAdapter outboundResourceAdapter = (OutboundResourceAdapter)theEObject; + Object result = caseOutboundResourceAdapter(outboundResourceAdapter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.MESSAGE_ADAPTER: { + MessageAdapter messageAdapter = (MessageAdapter)theEObject; + Object result = caseMessageAdapter(messageAdapter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.CONNECTION_DEFINITION: { + ConnectionDefinition connectionDefinition = (ConnectionDefinition)theEObject; + Object result = caseConnectionDefinition(connectionDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.ADMIN_OBJECT: { + AdminObject adminObject = (AdminObject)theEObject; + Object result = caseAdminObject(adminObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.MESSAGE_LISTENER: { + MessageListener messageListener = (MessageListener)theEObject; + Object result = caseMessageListener(messageListener); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.ACTIVATION_SPEC: { + ActivationSpec activationSpec = (ActivationSpec)theEObject; + Object result = caseActivationSpec(activationSpec); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE: { + RequiredConfigPropertyType requiredConfigPropertyType = (RequiredConfigPropertyType)theEObject; + Object result = caseRequiredConfigPropertyType(requiredConfigPropertyType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Connector'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Connector'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseConnector(Connector object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Resource Adapter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Resource Adapter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseResourceAdapter(ResourceAdapter object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Authentication Mechanism'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Authentication Mechanism'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseAuthenticationMechanism(AuthenticationMechanism object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Config Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Config Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseConfigProperty(ConfigProperty object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Security Permission'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Security Permission'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSecurityPermission(SecurityPermission object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'License'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'License'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseLicense(License object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Inbound Resource Adapter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Inbound Resource Adapter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseInboundResourceAdapter(InboundResourceAdapter object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Outbound Resource Adapter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Outbound Resource Adapter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseOutboundResourceAdapter(OutboundResourceAdapter object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Adapter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Adapter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageAdapter(MessageAdapter object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Connection Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Connection Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseConnectionDefinition(ConnectionDefinition object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Admin Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Admin Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseAdminObject(AdminObject object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Listener'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Listener'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageListener(MessageListener object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Activation Spec'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Activation Spec'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseActivationSpec(ActivationSpec object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Required Config Property Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Required Config Property Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRequiredConfigPropertyType(RequiredConfigPropertyType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //JcaSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPConfigImpl.java new file mode 100644 index 000000000..5f6ffb6be --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPConfigImpl.java @@ -0,0 +1,191 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; + + +/** + * + * An implementation of the model object 'JSP Config'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPConfigImpl#getTagLibs Tag Libs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPConfigImpl#getPropertyGroups Property Groups}
  • + *
+ *

+ * + * @generated + */ +public class JSPConfigImpl extends EObjectImpl implements JSPConfig { + /** + * The cached value of the '{@link #getTagLibs() Tag Libs}' containment reference list. + * + * + * @see #getTagLibs() + * @generated + * @ordered + */ + protected EList tagLibs = null; + + /** + * The cached value of the '{@link #getPropertyGroups() Property Groups}' containment reference list. + * + * + * @see #getPropertyGroups() + * @generated + * @ordered + */ + protected EList propertyGroups = null; + + /** + * + * + * @generated + */ + protected JSPConfigImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JspPackage.eINSTANCE.getJSPConfig(); + } + + /** + * + * + * @generated + */ + public EList getTagLibs() { + if (tagLibs == null) { + tagLibs = new EObjectContainmentEList(TagLibRefType.class, this, JspPackage.JSP_CONFIG__TAG_LIBS); + } + return tagLibs; + } + + /** + * + * + * @generated + */ + public EList getPropertyGroups() { + if (propertyGroups == null) { + propertyGroups = new EObjectContainmentEList(JSPPropertyGroup.class, this, JspPackage.JSP_CONFIG__PROPERTY_GROUPS); + } + return propertyGroups; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JspPackage.JSP_CONFIG__TAG_LIBS: + return ((InternalEList)getTagLibs()).basicRemove(otherEnd, msgs); + case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: + return ((InternalEList)getPropertyGroups()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_CONFIG__TAG_LIBS: + return getTagLibs(); + case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: + return getPropertyGroups(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_CONFIG__TAG_LIBS: + getTagLibs().clear(); + getTagLibs().addAll((Collection)newValue); + return; + case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: + getPropertyGroups().clear(); + getPropertyGroups().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_CONFIG__TAG_LIBS: + getTagLibs().clear(); + return; + case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: + getPropertyGroups().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_CONFIG__TAG_LIBS: + return tagLibs != null && !tagLibs.isEmpty(); + case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: + return propertyGroups != null && !propertyGroups.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //JSPConfigImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPPropertyGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPPropertyGroupImpl.java new file mode 100644 index 000000000..41d2b4d65 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JSPPropertyGroupImpl.java @@ -0,0 +1,637 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspPackage; + + +/** + * + * An implementation of the model object 'JSP Property Group'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getUrlPattern Url Pattern}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isElIgnored El Ignored}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getPageEncoding Page Encoding}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isScriptingInvalid Scripting Invalid}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isIsXML Is XML}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getIncludePreludes Include Preludes}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getIncludeCodas Include Codas}
  • + *
+ *

+ * + * @generated + */ +public class JSPPropertyGroupImpl extends CompatibilityDescriptionGroupImpl implements JSPPropertyGroup { + /** + * The cached value of the '{@link #getUrlPattern() Url Pattern}' attribute list. + * + * + * @see #getUrlPattern() + * @generated + * @ordered + */ + protected EList urlPattern = null; + + /** + * The default value of the '{@link #isElIgnored() El Ignored}' attribute. + * + * + * @see #isElIgnored() + * @generated + * @ordered + */ + protected static final boolean EL_IGNORED_EDEFAULT = true; + + /** + * The cached value of the '{@link #isElIgnored() El Ignored}' attribute. + * + * + * @see #isElIgnored() + * @generated + * @ordered + */ + protected boolean elIgnored = EL_IGNORED_EDEFAULT; + + /** + * This is true if the El Ignored attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean elIgnoredESet = false; + + /** + * The default value of the '{@link #getPageEncoding() Page Encoding}' attribute. + * + * + * @see #getPageEncoding() + * @generated + * @ordered + */ + protected static final String PAGE_ENCODING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPageEncoding() Page Encoding}' attribute. + * + * + * @see #getPageEncoding() + * @generated + * @ordered + */ + protected String pageEncoding = PAGE_ENCODING_EDEFAULT; + + /** + * The default value of the '{@link #isScriptingInvalid() Scripting Invalid}' attribute. + * + * + * @see #isScriptingInvalid() + * @generated + * @ordered + */ + protected static final boolean SCRIPTING_INVALID_EDEFAULT = true; + + /** + * The cached value of the '{@link #isScriptingInvalid() Scripting Invalid}' attribute. + * + * + * @see #isScriptingInvalid() + * @generated + * @ordered + */ + protected boolean scriptingInvalid = SCRIPTING_INVALID_EDEFAULT; + + /** + * This is true if the Scripting Invalid attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean scriptingInvalidESet = false; + + /** + * The default value of the '{@link #isIsXML() Is XML}' attribute. + * + * + * @see #isIsXML() + * @generated + * @ordered + */ + protected static final boolean IS_XML_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsXML() Is XML}' attribute. + * + * + * @see #isIsXML() + * @generated + * @ordered + */ + protected boolean isXML = IS_XML_EDEFAULT; + + /** + * This is true if the Is XML attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean isXMLESet = false; + + /** + * The cached value of the '{@link #getIncludePreludes() Include Preludes}' attribute list. + * + * + * @see #getIncludePreludes() + * @generated + * @ordered + */ + protected EList includePreludes = null; + + /** + * The cached value of the '{@link #getIncludeCodas() Include Codas}' attribute list. + * + * + * @see #getIncludeCodas() + * @generated + * @ordered + */ + protected EList includeCodas = null; + + /** + * + * + * @generated + */ + protected JSPPropertyGroupImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JspPackage.eINSTANCE.getJSPPropertyGroup(); + } + + /** + * + * + * @generated + */ + public EList getUrlPattern() { + if (urlPattern == null) { + urlPattern = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN); + } + return urlPattern; + } + + /** + * + * + * @generated + */ + public boolean isElIgnored() { + return elIgnored; + } + + /** + * + * + * @generated + */ + public void setElIgnored(boolean newElIgnored) { + boolean oldElIgnored = elIgnored; + elIgnored = newElIgnored; + boolean oldElIgnoredESet = elIgnoredESet; + elIgnoredESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED, oldElIgnored, elIgnored, !oldElIgnoredESet)); + } + + /** + * + * + * @generated + */ + public void unsetElIgnored() { + boolean oldElIgnored = elIgnored; + boolean oldElIgnoredESet = elIgnoredESet; + elIgnored = EL_IGNORED_EDEFAULT; + elIgnoredESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED, oldElIgnored, EL_IGNORED_EDEFAULT, oldElIgnoredESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetElIgnored() { + return elIgnoredESet; + } + + /** + * + * + * @generated + */ + public String getPageEncoding() { + return pageEncoding; + } + + /** + * + * + * @generated + */ + public void setPageEncoding(String newPageEncoding) { + String oldPageEncoding = pageEncoding; + pageEncoding = newPageEncoding; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING, oldPageEncoding, pageEncoding)); + } + + /** + * + * + * @generated + */ + public boolean isScriptingInvalid() { + return scriptingInvalid; + } + + /** + * + * + * @generated + */ + public void setScriptingInvalid(boolean newScriptingInvalid) { + boolean oldScriptingInvalid = scriptingInvalid; + scriptingInvalid = newScriptingInvalid; + boolean oldScriptingInvalidESet = scriptingInvalidESet; + scriptingInvalidESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID, oldScriptingInvalid, scriptingInvalid, !oldScriptingInvalidESet)); + } + + /** + * + * + * @generated + */ + public void unsetScriptingInvalid() { + boolean oldScriptingInvalid = scriptingInvalid; + boolean oldScriptingInvalidESet = scriptingInvalidESet; + scriptingInvalid = SCRIPTING_INVALID_EDEFAULT; + scriptingInvalidESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID, oldScriptingInvalid, SCRIPTING_INVALID_EDEFAULT, oldScriptingInvalidESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetScriptingInvalid() { + return scriptingInvalidESet; + } + + /** + * + * + * @generated + */ + public boolean isIsXML() { + return isXML; + } + + /** + * + * + * @generated + */ + public void setIsXML(boolean newIsXML) { + boolean oldIsXML = isXML; + isXML = newIsXML; + boolean oldIsXMLESet = isXMLESet; + isXMLESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__IS_XML, oldIsXML, isXML, !oldIsXMLESet)); + } + + /** + * + * + * @generated + */ + public void unsetIsXML() { + boolean oldIsXML = isXML; + boolean oldIsXMLESet = isXMLESet; + isXML = IS_XML_EDEFAULT; + isXMLESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__IS_XML, oldIsXML, IS_XML_EDEFAULT, oldIsXMLESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetIsXML() { + return isXMLESet; + } + + /** + * + * + * @generated + */ + public EList getIncludePreludes() { + if (includePreludes == null) { + includePreludes = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES); + } + return includePreludes; + } + + /** + * + * + * @generated + */ + public EList getIncludeCodas() { + if (includeCodas == null) { + includeCodas = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS); + } + return includeCodas; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case JspPackage.JSP_PROPERTY_GROUP__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_PROPERTY_GROUP__ICONS: + return getIcons(); + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: + return getDisplayNames(); + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: + return getDescriptions(); + case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: + return getSmallIcon(); + case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: + return getLargeIcon(); + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: + return getDescription(); + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: + return getDisplayName(); + case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: + return getUrlPattern(); + case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: + return isElIgnored() ? Boolean.TRUE : Boolean.FALSE; + case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: + return getPageEncoding(); + case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: + return isScriptingInvalid() ? Boolean.TRUE : Boolean.FALSE; + case JspPackage.JSP_PROPERTY_GROUP__IS_XML: + return isIsXML() ? Boolean.TRUE : Boolean.FALSE; + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: + return getIncludePreludes(); + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: + return getIncludeCodas(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_PROPERTY_GROUP__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: + setDescription((String)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: + getUrlPattern().clear(); + getUrlPattern().addAll((Collection)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: + setElIgnored(((Boolean)newValue).booleanValue()); + return; + case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: + setPageEncoding((String)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: + setScriptingInvalid(((Boolean)newValue).booleanValue()); + return; + case JspPackage.JSP_PROPERTY_GROUP__IS_XML: + setIsXML(((Boolean)newValue).booleanValue()); + return; + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: + getIncludePreludes().clear(); + getIncludePreludes().addAll((Collection)newValue); + return; + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: + getIncludeCodas().clear(); + getIncludeCodas().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_PROPERTY_GROUP__ICONS: + getIcons().clear(); + return; + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: + getDescriptions().clear(); + return; + case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: + getUrlPattern().clear(); + return; + case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: + unsetElIgnored(); + return; + case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: + setPageEncoding(PAGE_ENCODING_EDEFAULT); + return; + case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: + unsetScriptingInvalid(); + return; + case JspPackage.JSP_PROPERTY_GROUP__IS_XML: + unsetIsXML(); + return; + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: + getIncludePreludes().clear(); + return; + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: + getIncludeCodas().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.JSP_PROPERTY_GROUP__ICONS: + return icons != null && !icons.isEmpty(); + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: + return urlPattern != null && !urlPattern.isEmpty(); + case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: + return isSetElIgnored(); + case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: + return PAGE_ENCODING_EDEFAULT == null ? pageEncoding != null : !PAGE_ENCODING_EDEFAULT.equals(pageEncoding); + case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: + return isSetScriptingInvalid(); + case JspPackage.JSP_PROPERTY_GROUP__IS_XML: + return isSetIsXML(); + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: + return includePreludes != null && !includePreludes.isEmpty(); + case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: + return includeCodas != null && !includeCodas.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (urlPattern: ");//$NON-NLS-1$ + result.append(urlPattern); + result.append(", elIgnored: ");//$NON-NLS-1$ + if (elIgnoredESet) result.append(elIgnored); else result.append("");//$NON-NLS-1$ + result.append(", pageEncoding: ");//$NON-NLS-1$ + result.append(pageEncoding); + result.append(", scriptingInvalid: ");//$NON-NLS-1$ + if (scriptingInvalidESet) result.append(scriptingInvalid); else result.append("");//$NON-NLS-1$ + result.append(", isXML: ");//$NON-NLS-1$ + if (isXMLESet) result.append(isXML); else result.append("");//$NON-NLS-1$ + result.append(", includePreludes: ");//$NON-NLS-1$ + result.append(includePreludes); + result.append(", includeCodas: ");//$NON-NLS-1$ + result.append(includeCodas); + result.append(')'); + return result.toString(); + } + +} //JSPPropertyGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspFactoryImpl.java new file mode 100644 index 000000000..f08a98ece --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspFactoryImpl.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.impl; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspFactory; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; + + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class JspFactoryImpl extends EFactoryImpl implements JspFactory { + /** + * Creates and instance of the factory. + * + * + * @generated + */ + public JspFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case JspPackage.JSP_CONFIG: return createJSPConfig(); + case JspPackage.JSP_PROPERTY_GROUP: return createJSPPropertyGroup(); + case JspPackage.TAG_LIB_REF_TYPE: return createTagLibRefType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public JSPConfig createJSPConfig() { + JSPConfigImpl jspConfig = new JSPConfigImpl(); + return jspConfig; + } + + /** + * + * + * @generated + */ + public JSPPropertyGroup createJSPPropertyGroup() { + JSPPropertyGroupImpl jspPropertyGroup = new JSPPropertyGroupImpl(); + return jspPropertyGroup; + } + + /** + * + * + * @generated + */ + public TagLibRefType createTagLibRefType() { + TagLibRefTypeImpl tagLibRefType = new TagLibRefTypeImpl(); + return tagLibRefType; + } + + /** + * + * + * @generated + */ + public JspPackage getJspPackage() { + return (JspPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + public static JspPackage getPackage() { + return JspPackage.eINSTANCE; + } +} //JspFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspPackageImpl.java new file mode 100644 index 000000000..eb7fb134f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/JspPackageImpl.java @@ -0,0 +1,398 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspFactory; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class JspPackageImpl extends EPackageImpl implements JspPackage { + /** + * + * + * @generated + */ + private EClass jspConfigEClass = null; + + /** + * + * + * @generated + */ + private EClass jspPropertyGroupEClass = null; + + /** + * + * + * @generated + */ + private EClass tagLibRefTypeEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage#eNS_URI + * @see #init() + * @generated + */ + private JspPackageImpl() { + super(eNS_URI, JspFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *

Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *

Invocation of this method will not affect any packages that have + * already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static JspPackage init() { + if (isInited) return (JspPackage)EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI); + + // Obtain or create and register package. + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JspPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + + // Step 1: create meta-model objects + theJspPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + + // Step 2: complete initialization + theJspPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + + return theJspPackage; + } + + /** + * + * + * @generated + */ + public EClass getJSPConfig() { + return jspConfigEClass; + } + + /** + * + * + * @generated + */ + public EReference getJSPConfig_TagLibs() { + return (EReference)jspConfigEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getJSPConfig_PropertyGroups() { + return (EReference)jspConfigEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getJSPPropertyGroup() { + return jspPropertyGroupEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_UrlPattern() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_ElIgnored() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_PageEncoding() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_ScriptingInvalid() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_IsXML() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_IncludePreludes() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPPropertyGroup_IncludeCodas() { + return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getTagLibRefType() { + return tagLibRefTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTagLibRefType_TaglibURI() { + return (EAttribute)tagLibRefTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getTagLibRefType_TaglibLocation() { + return (EAttribute)tagLibRefTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public JspFactory getJspFactory() { + return (JspFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + jspConfigEClass = createEClass(JSP_CONFIG); + createEReference(jspConfigEClass, JSP_CONFIG__TAG_LIBS); + createEReference(jspConfigEClass, JSP_CONFIG__PROPERTY_GROUPS); + + jspPropertyGroupEClass = createEClass(JSP_PROPERTY_GROUP); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__URL_PATTERN); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__EL_IGNORED); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__PAGE_ENCODING); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__SCRIPTING_INVALID); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__IS_XML); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__INCLUDE_PRELUDES); + createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__INCLUDE_CODAS); + + tagLibRefTypeEClass = createEClass(TAG_LIB_REF_TYPE); + createEAttribute(tagLibRefTypeEClass, TAG_LIB_REF_TYPE__TAGLIB_URI); + createEAttribute(tagLibRefTypeEClass, TAG_LIB_REF_TYPE__TAGLIB_LOCATION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Add supertypes to classes + jspPropertyGroupEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(jspConfigEClass, JSPConfig.class, "JSPConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getJSPConfig_TagLibs(), this.getTagLibRefType(), null, "tagLibs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPConfig_PropertyGroups(), this.getJSPPropertyGroup(), null, "propertyGroups", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(jspPropertyGroupEClass, JSPPropertyGroup.class, "JSPPropertyGroup", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getJSPPropertyGroup_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPPropertyGroup_ElIgnored(), ecorePackage.getEBoolean(), "elIgnored", "true", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getJSPPropertyGroup_PageEncoding(), ecorePackage.getEString(), "pageEncoding", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPPropertyGroup_ScriptingInvalid(), ecorePackage.getEBoolean(), "scriptingInvalid", "true", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getJSPPropertyGroup_IsXML(), ecorePackage.getEBoolean(), "isXML", "false", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getJSPPropertyGroup_IncludePreludes(), ecorePackage.getEString(), "includePreludes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPPropertyGroup_IncludeCodas(), ecorePackage.getEString(), "includeCodas", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(tagLibRefTypeEClass, TagLibRefType.class, "TagLibRefType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getTagLibRefType_TaglibURI(), ecorePackage.getEString(), "taglibURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagLibRefType_TaglibLocation(), ecorePackage.getEString(), "taglibLocation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } +} //JspPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/TagLibRefTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/TagLibRefTypeImpl.java new file mode 100644 index 000000000..110e0a0c8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/impl/TagLibRefTypeImpl.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; + + +/** + * + * An implementation of the model object 'Tag Lib Ref Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.TagLibRefTypeImpl#getTaglibURI Taglib URI}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.TagLibRefTypeImpl#getTaglibLocation Taglib Location}
  • + *
+ *

+ * + * @generated + */ +public class TagLibRefTypeImpl extends EObjectImpl implements TagLibRefType { + /** + * The default value of the '{@link #getTaglibURI() Taglib URI}' attribute. + * + * + * @see #getTaglibURI() + * @generated + * @ordered + */ + protected static final String TAGLIB_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTaglibURI() Taglib URI}' attribute. + * + * + * @see #getTaglibURI() + * @generated + * @ordered + */ + protected String taglibURI = TAGLIB_URI_EDEFAULT; + + /** + * The default value of the '{@link #getTaglibLocation() Taglib Location}' attribute. + * + * + * @see #getTaglibLocation() + * @generated + * @ordered + */ + protected static final String TAGLIB_LOCATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTaglibLocation() Taglib Location}' attribute. + * + * + * @see #getTaglibLocation() + * @generated + * @ordered + */ + protected String taglibLocation = TAGLIB_LOCATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected TagLibRefTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return JspPackage.eINSTANCE.getTagLibRefType(); + } + + /** + * + * + * @generated + */ + public String getTaglibURI() { + return taglibURI; + } + + /** + * + * + * @generated + */ + public void setTaglibURI(String newTaglibURI) { + String oldTaglibURI = taglibURI; + taglibURI = newTaglibURI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI, oldTaglibURI, taglibURI)); + } + + /** + * + * + * @generated + */ + public String getTaglibLocation() { + return taglibLocation; + } + + /** + * + * + * @generated + */ + public void setTaglibLocation(String newTaglibLocation) { + String oldTaglibLocation = taglibLocation; + taglibLocation = newTaglibLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION, oldTaglibLocation, taglibLocation)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: + return getTaglibURI(); + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: + return getTaglibLocation(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: + setTaglibURI((String)newValue); + return; + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: + setTaglibLocation((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: + setTaglibURI(TAGLIB_URI_EDEFAULT); + return; + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: + setTaglibLocation(TAGLIB_LOCATION_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: + return TAGLIB_URI_EDEFAULT == null ? taglibURI != null : !TAGLIB_URI_EDEFAULT.equals(taglibURI); + case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: + return TAGLIB_LOCATION_EDEFAULT == null ? taglibLocation != null : !TAGLIB_LOCATION_EDEFAULT.equals(taglibLocation); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (taglibURI: ");//$NON-NLS-1$ + result.append(taglibURI); + result.append(", taglibLocation: ");//$NON-NLS-1$ + result.append(taglibLocation); + result.append(')'); + return result.toString(); + } + +} //TagLibRefTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspAdapterFactory.java new file mode 100644 index 000000000..42fda23bd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspAdapterFactory.java @@ -0,0 +1,196 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; + + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage + * @generated + */ +public class JspAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static JspPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public JspAdapterFactory() { + if (modelPackage == null) { + modelPackage = JspPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected JspSwitch modelSwitch = + new JspSwitch() { + public Object caseJSPConfig(JSPConfig object) { + return createJSPConfigAdapter(); + } + public Object caseJSPPropertyGroup(JSPPropertyGroup object) { + return createJSPPropertyGroupAdapter(); + } + public Object caseTagLibRefType(TagLibRefType object) { + return createTagLibRefTypeAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.JSPConfig JSP Config}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jsp.JSPConfig + * @generated + */ + public Adapter createJSPConfigAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.JSPPropertyGroup JSP Property Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jsp.JSPPropertyGroup + * @generated + */ + public Adapter createJSPPropertyGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.TagLibRefType Tag Lib Ref Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.jsp.TagLibRefType + * @generated + */ + public Adapter createTagLibRefTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //JspAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspSwitch.java new file mode 100644 index 000000000..17b5f5813 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/jsp/util/JspSwitch.java @@ -0,0 +1,184 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.jsp.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage + * @generated + */ +public class JspSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static JspPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public JspSwitch() { + if (modelPackage == null) { + modelPackage = JspPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case JspPackage.JSP_CONFIG: { + JSPConfig jspConfig = (JSPConfig)theEObject; + Object result = caseJSPConfig(jspConfig); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JspPackage.JSP_PROPERTY_GROUP: { + JSPPropertyGroup jspPropertyGroup = (JSPPropertyGroup)theEObject; + Object result = caseJSPPropertyGroup(jspPropertyGroup); + if (result == null) result = caseCompatibilityDescriptionGroup(jspPropertyGroup); + if (result == null) result = caseDescriptionGroup(jspPropertyGroup); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JspPackage.TAG_LIB_REF_TYPE: { + TagLibRefType tagLibRefType = (TagLibRefType)theEObject; + Object result = caseTagLibRefType(tagLibRefType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'JSP Config'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JSP Config'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJSPConfig(JSPConfig object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'JSP Property Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JSP Property Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJSPPropertyGroup(JSPPropertyGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Tag Lib Ref Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Tag Lib Ref Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseTagLibRefType(TagLibRefType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //JspSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/Connector14SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/Connector14SpecificationMigrator.java new file mode 100644 index 000000000..93087a272 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/Connector14SpecificationMigrator.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 31, 2004 + * + * To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package org.eclipse.jst.j2ee.internal.migration; + +import java.util.List; + +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; +import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; +import org.eclipse.jst.j2ee.jca.ConfigProperty; +import org.eclipse.jst.j2ee.jca.ConnectionDefinition; +import org.eclipse.jst.j2ee.jca.Connector; +import org.eclipse.jst.j2ee.jca.JcaFactory; +import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; +import org.eclipse.jst.j2ee.jca.ResourceAdapter; +import org.eclipse.jst.j2ee.jca.SecurityPermission; + + +/** + * To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +public class Connector14SpecificationMigrator { + /** + * @param connector + */ + public J2EEMigrationStatus migrateConnectorTo14(Connector connector) { + migrateResourceAdaptor(connector); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,( + new J2EEMigrationStatus()).format(J2EESpecificationMigrator.DEFAULT_COMPLETED_STATUS_MSG,connector.getDisplayName())); + } + + /** + * @param connector + */ + private void migrateResourceAdaptor(Connector connector) { + ResourceAdapter resAdaptor = connector.getResourceAdapter(); + if(resAdaptor != null) { + OutboundResourceAdapter outboundAdaptor = JcaFactory.eINSTANCE.createOutboundResourceAdapter(); + outboundAdaptor.setReauthenticationSupport(resAdaptor.isReauthenticationSupport()); + outboundAdaptor.setTransactionSupport(resAdaptor.getTransactionSupport()); + + ConnectionDefinition connDefinition = JcaFactory.eINSTANCE.createConnectionDefinition(); + connDefinition.setManagedConnectionFactoryClass(resAdaptor.getManagedConnectionFactoryClass()); + connDefinition.setConnectionFactoryInterface(resAdaptor.getConnectionFactoryInterface()); + connDefinition.setConnectionFactoryImplClass(resAdaptor.getConnectionFactoryImplClass()); + connDefinition.setConnectionInterface(resAdaptor.getConnectionInterface()); + connDefinition.setConnectionImplClass(resAdaptor.getConnectionImplClass()); + + outboundAdaptor.getConnectionDefinitions().add(connDefinition); + + resAdaptor.setOutboundResourceAdapter(outboundAdaptor); + + migrateAuthenticationMechanism(resAdaptor); + + migrateDescriptions(resAdaptor); + + } + } + /** + * @param resAdaptor + */ + private void migrateDescriptions(ResourceAdapter resAdaptor) { + List secPermissions = resAdaptor.getSecurityPermissions(); + if(!secPermissions.isEmpty()) { + for(int i = 0; i < secPermissions.size(); i++) { + SecurityPermission secPerm = (SecurityPermission)secPermissions.get(i); + String secDescription = secPerm.getDescription(); + if(secDescription != null && secDescription.length() > 0) { + Description description = CommonFactory.eINSTANCE.createDescription(); + description.setValue(secDescription); + secPerm.getDescriptions().add(description); + } + + } + } + List authMechanisms = resAdaptor.getAuthenticationMechanisms(); + if(!authMechanisms.isEmpty()) { + for(int i = 0 ; i < authMechanisms.size(); i++) { + AuthenticationMechanism authMech = (AuthenticationMechanism)authMechanisms.get(i); + String authDescrition = authMech.getDescription(); + if(authDescrition != null && authDescrition.length() > 0) { + Description description = CommonFactory.eINSTANCE.createDescription(); + description.setValue(authDescrition); + authMech.getDescriptions().add(description); + } + } + } + List configProps = resAdaptor.getConfigProperties(); + if(!configProps.isEmpty()) { + for(int i = 0; i < configProps.size(); i++) { + ConfigProperty configProp = (ConfigProperty)configProps.get(i); + String configDescription = configProp.getDescription(); + if(configDescription != null && configDescription.length() > 0) { + Description description = CommonFactory.eINSTANCE.createDescription(); + description.setValue(configDescription); + configProp.getDescriptions().add(description); + } + } + } + } + /** + * @param resAdaptor + */ + private void migrateAuthenticationMechanism(ResourceAdapter resAdaptor) { + List authMechanisms = resAdaptor.getAuthenticationMechanisms(); + for (int i = 0; i < authMechanisms.size(); i++) { + AuthenticationMechanism authMech = (AuthenticationMechanism)authMechanisms.get(i); + AuthenticationMechanismType authType = authMech.getAuthenticationMechanismType(); + if(authType != null) { + authMech.setAuthenticationMechanism(authType.getName()); + } else { + String customAuth = authMech.getCustomAuthMechType(); + if(customAuth != null && customAuth.length() > 0) { + authMech.setAuthenticationMechanism(customAuth); + } + } + } + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationMultiStatus.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationMultiStatus.java new file mode 100644 index 000000000..fef91fbfb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationMultiStatus.java @@ -0,0 +1,114 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.migration; + +/** + * @author DABERG + */ +public class J2EEMigrationMultiStatus extends J2EEMigrationStatus { + private J2EEMigrationStatus[] children = new J2EEMigrationStatus[0]; + + public void add(J2EEMigrationStatus status) { + J2EEMigrationStatus[] result = + new J2EEMigrationStatus[children.length + 1]; + System.arraycopy(children, 0, result, 0, children.length); + result[result.length - 1] = status; + children = result; + int newSev = status.getSeverity(); + int currentSev = getSeverity(); + /* If all the statuses are NOT_NEEDED OR NOT_POSSIBLE, you want the combined status to be the highest severity + * however, if all but one status are NOT_NEEDED or NOT_POSSIBLE, and one status completed, then the combined status + * should be OK. If there is a warning or error, then they take precedence + */ + if (children.length == 1) + setSeverity(newSev); + else if (currentSev > COMPLETED_OK && currentSev < WARNING && newSev == COMPLETED_OK) + setSeverity(newSev); + else if (newSev > currentSev && (currentSev != COMPLETED_OK || newSev >= WARNING) ) + setSeverity(newSev); + + } + /** + * Adds all of the children of the given status to this multi-status. + * Does nothing if the given status has no children (which includes + * the case where it is not a multi-status). + * + * @param status the status whose children are to be added to this one + */ + public void addAll(J2EEMigrationStatus status) { + if (status == null) + return; + J2EEMigrationStatus[] statuses = status.getChildren(); + for (int i = 0; i < statuses.length; i++) { + add(statuses[i]); + } + } + + public J2EEMigrationStatus[] getChildren() { + return children; + } + + public boolean isMultiStatus() { + return true; + } + /** + * Merges the given status into this multi-status. + * Equivalent to add(status) if the + * given status is not a multi-status. + * Equivalent to addAll(status) if the + * given status is a multi-status. + * + * @param status the status to merge into this one + * @see #add + * @see #addAll + */ + public void merge(J2EEMigrationStatus status) { + if (status == null) + return; + if (!status.isMultiStatus()) { + add(status); + } else { + addAll(status); + } + } + /** + * Returns a string representation of the status, suitable + * for debugging purposes only. + */ + public String toString() { + StringBuffer buf = new StringBuffer(super.toString()); + buf.append(" children={"); //$NON-NLS-1$ + for (int i = 0; i < children.length; i++) { + if (i != 0) { + buf.append("\n"); //$NON-NLS-1$ + } + buf.append(children[i].toString()); + } + buf.append("}"); //$NON-NLS-1$ + return buf.toString(); + } + + /** + * @see com.ibm.ejs.models.base.extensions.helper.J2EEMigrationStatus#append(J2EEMigrationStatus) + */ + public J2EEMigrationStatus append(J2EEMigrationStatus aStatus) { + if (aStatus != null) + merge(aStatus); + return this; + } + + public boolean isEmpty() { + return children.length == 0; + } + + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationStatus.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationStatus.java new file mode 100644 index 000000000..095edae4f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EEMigrationStatus.java @@ -0,0 +1,232 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.migration; + +import java.text.MessageFormat; + +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.XMLResource; + + +/** + * @author DABERG + * + */ +public class J2EEMigrationStatus implements J2EESpecificationMigrationConstants { + + public static final int COMPLETED_OK = 0; + public static final int NOT_NEEDED = 1; + public static final int NOT_POSSIBLE = 2; + public static final int WARNING = 3; + public static final int ERROR = 4; + + public static final J2EEMigrationStatus OK_STATUS = new J2EEMigrationStatus(COMPLETED_OK, ""); + + private static final J2EEMigrationStatus[] EmptyStatusArray = new J2EEMigrationStatus[0]; + + private int severity; + private String message; + private XMLResource resource; + private EObject targetObject; + + J2EEMigrationStatus() { + } + + public J2EEMigrationStatus(int aSeverity, String aMessage) { + this(aSeverity, (EObject)null, aMessage); + } + public J2EEMigrationStatus(int aSeverity, XMLResource xmlResource) { + this(aSeverity, xmlResource, null); + } + + public J2EEMigrationStatus(int aSeverity, EObject anObject) { + this(aSeverity, anObject, null); + } + + public J2EEMigrationStatus(int aSeverity, XMLResource xmlResource, String aMessage) { + severity = aSeverity; + resource = xmlResource; + message = aMessage; + } + + public J2EEMigrationStatus(int aSeverity, EObject anObject, String aMessage) { + severity = aSeverity; + targetObject = anObject; + message = aMessage; + } + + protected String format(String aPattern, String arg1) { + return MessageFormat.format(aPattern, new String[]{arg1}); + } + + /** + * Returns the message. + * @return String + */ + public String getMessage() { + if (message == null) + message = createDefaultMessage(); + return message; + } + + public String getMessageForDisplay() { + return getSeverityText()+" "+getMessage(); //$NON-NLS-1$ + } + + protected String getSeverityText() { + switch (severity) { + case ERROR: + return ERROR_TEXT; + case WARNING: + return WARNING_TEXT; + case NOT_NEEDED: + case NOT_POSSIBLE: + return INFO_TEXT; + default: + return ""; //$NON-NLS-1$ + } + } + + /** + * Method createDefaultMessage. + * @return String + */ + private String createDefaultMessage() { + String objDesc; + if (getResource() != null) + objDesc = getResource().getURI().toString(); + else if (getTargetObject() != null && getTargetObject() instanceof ENamedElement) + objDesc = ((ENamedElement) getTargetObject()).getName(); + else + return null; + switch (getSeverity()) { + case COMPLETED_OK : + return format(DEFAULT_COMPLETED_STATUS_MSG, objDesc); + case NOT_NEEDED : + return format(DEFAULT_NOT_NEEDED_STATUS_MSG, objDesc); + case NOT_POSSIBLE : + return format(DEFAULT_NOT_POSSIBLE_STATUS_MSG, objDesc); + case ERROR : + return format(DEFAULT_ERROR_STATUS_MSG, objDesc); + } + return null; + } + + + /** + * Sets the message. + * @param message The message to set + */ + public void setMessage(String message) { + this.message = message; + } + + /** + * The migration was completed fine or was not needed. + */ + public boolean isOK() { + return severity == COMPLETED_OK || severity == NOT_NEEDED; + } + + /** + * An error ocurred during migration. + */ + public boolean isError() { + return severity == ERROR; + } + + /** + * A warning ocurred during migration. + */ + public boolean isWarning() { + return severity == WARNING; + } + + /** + * The migration was not required. + */ + public boolean isNotNeeded() { + return severity == NOT_NEEDED; + } + /** + * The migration was not possible. + */ + public boolean isNotPossible() { + return severity == NOT_POSSIBLE; + } + /** + * Returns the severity. + * @return int + */ + public int getSeverity() { + return severity; + } + + /** + * Sets the severity. + * @param severity The severity to set + */ + public void setSeverity(int severity) { + this.severity = severity; + } + + public J2EEMigrationStatus[] getChildren() { + return EmptyStatusArray; + } + + public boolean isMultiStatus() { + return false; + } + public XMLResource getResource() { + return resource; + } + public EObject getTargetObject() { + return targetObject; + } + + public String toString() { + StringBuffer buf = new StringBuffer(); + buf.append("MigrationStatus "); //$NON-NLS-1$ + if (severity == COMPLETED_OK) { + buf.append("Completed OK"); //$NON-NLS-1$ + } else if (severity == ERROR) { + buf.append("ERROR"); //$NON-NLS-1$ + } else if (severity == WARNING) { + buf.append("WARNING"); //$NON-NLS-1$ + } else if (severity == NOT_NEEDED) { + buf.append("Not Needed"); //$NON-NLS-1$ + } else if (severity == NOT_POSSIBLE) { + buf.append("Not Possible"); //$NON-NLS-1$ + } else { + buf.append("severity="); //$NON-NLS-1$ + buf.append(severity); + } + buf.append(' '); + buf.append(message); + return buf.toString(); + } + + /** + * Append the paramater to this status, and return the resultant status; + * clients must be careful to set their cached status to the return value, + * as it may be a new instance. + */ + public J2EEMigrationStatus append(J2EEMigrationStatus aStatus) { + if (aStatus == null) + return this; + J2EEMigrationMultiStatus multi = new J2EEMigrationMultiStatus(); + multi.merge(this); + multi.merge(aStatus); + return multi; + } +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrationConstants.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrationConstants.java new file mode 100644 index 000000000..e351b55a1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrationConstants.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.migration; + +import org.eclipse.jst.j2ee.internal.MOFJ2EEResourceHandler; + + +public interface J2EESpecificationMigrationConstants { + String J2EE_VERSION_1_2 = "J2EE_1.2"; //$NON-NLS-1$ + String J2EE_VERSION_1_3 = "J2EE_1.3"; //$NON-NLS-1$ + String J2EE_VERSION_1_4 = "J2EE_1.4"; //$NON-NLS-1$ + + String DEFAULT_COMPLETED_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_COMPLETED_STATUS_MSG"); //$NON-NLS-1$ + String DEFAULT_NOT_NEEDED_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_NOT_NEEDED_STATUS_MSG"); //$NON-NLS-1$ + String DEFAULT_NOT_POSSIBLE_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_NOT_POSSIBLE_STATUS_MSG"); //$NON-NLS-1$ + String DEFAULT_ERROR_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_ERROR_STATUS_MSG"); //$NON-NLS-1$ + + String REMOVED_LOCAL_CLIENT_MSG = MOFJ2EEResourceHandler.getString("REMOVED_LOCAL_CLIENT_MSG"); //$NON-NLS-1$ + String REMOVED_ACCESS_INTENTS_MSG = MOFJ2EEResourceHandler.getString("REMOVED_ACCESS_INTENTS_MSG"); //$NON-NLS-1$ + String REMOVED_ISOLATION_LEVELS_MSG = MOFJ2EEResourceHandler.getString("REMOVED_ISOLATION_LEVELS_MSG"); //$NON-NLS-1$ + String CONVERTED_FINDER_MSG = MOFJ2EEResourceHandler.getString("CONVERTED_FINDER_MSG"); //$NON-NLS-1$ + String UNNAMED_EJB = MOFJ2EEResourceHandler.getString("UNNAMED_EJB"); //$NON-NLS-1$ + String CONVERTED_QUERY_DESCRIPTION = MOFJ2EEResourceHandler.getString("CONVERTED_QUERY_DESCRIPTION"); //$NON-NLS-1$ + String MIGRATED_DEFAULT_DATASOURCE_JAR_MSG = MOFJ2EEResourceHandler.getString("MIGRATED_DEFAULT_DATASOURCE_JAR_MSG"); //$NON-NLS-1$ + String MIGRATED_DEFAULT_DATASOURCE_MSG = MOFJ2EEResourceHandler.getString("MIGRATED_DEFAULT_DATASOURCE_MSG"); //$NON-NLS-1$ + String ERROR_TEXT = MOFJ2EEResourceHandler.getString("ERROR"); //$NON-NLS-1$ + String WARNING_TEXT = MOFJ2EEResourceHandler.getString("WARNING"); //$NON-NLS-1$ + String INFO_TEXT = MOFJ2EEResourceHandler.getString("INFO"); //$NON-NLS-1$ +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrator.java new file mode 100644 index 000000000..5b94207f0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/J2EESpecificationMigrator.java @@ -0,0 +1,484 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.migration; + +import java.text.MessageFormat; +import java.util.HashMap; +import java.util.List; + +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jem.java.JavaHelpers; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.application.ApplicationResource; +import org.eclipse.jst.j2ee.client.ApplicationClientResource; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; +import org.eclipse.jst.j2ee.ejb.ActivationConfig; +import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; +import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; +import org.eclipse.jst.j2ee.ejb.DestinationType; +import org.eclipse.jst.j2ee.ejb.EJBJar; +import org.eclipse.jst.j2ee.ejb.EJBResource; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; +import org.eclipse.jst.j2ee.ejb.MethodElement; +import org.eclipse.jst.j2ee.ejb.QueryMethod; +import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.jca.ConnectorResource; +import org.eclipse.jst.j2ee.webapplication.WebAppResource; + +import com.ibm.wtp.common.logger.proxy.Logger; + +/** + * @author DABERG + * + * This class is used to migrate J2EE specific objects from one + * J2EE version to another. + */ +public class J2EESpecificationMigrator extends SpecificationMigrator implements J2EEConstants, J2EESpecificationMigrationConstants { + + + /** + * Public constructor for migrating a single ejb + */ + public J2EESpecificationMigrator(String aVersion, boolean complex) { + super(aVersion, complex); + } + + /** + * Public constructor for migrating the entire deployment descriptor + */ + public J2EESpecificationMigrator(XMLResource anXmlResource, String aVersion, boolean complex) { + super(anXmlResource, aVersion, complex); + } + + protected QueryMethod convertMethodElementToQueryMethod(MethodElement me) { + QueryMethod queryMethod = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createQueryMethod(); + queryMethod.setParms(me.getParms()); + queryMethod.setName(me.getName()); + return queryMethod; + } + protected void ensureBeanVersionsSet(EJBJar jar) { + if (jar != null) { + List beans = jar.getEnterpriseBeans(); + int size = beans.size(); + EnterpriseBean bean; + for (int i = 0; i < size; i++) { + bean = (EnterpriseBean) beans.get(i); + if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion1_X()) + ((ContainerManagedEntity)bean).setVersion(ContainerManagedEntity.VERSION_1_X); + } + } + } + protected String format(String aPattern, String arg1) { + return MessageFormat.format(aPattern, new String[]{arg1}); + } + protected String format(String aPattern, String arg1, String arg2) { + return MessageFormat.format(aPattern, new String[]{arg1, arg2}); + } + protected J2EEMigrationStatus getMigrateToLowerLevelStatus(EJBJar ejbJar) { + J2EEMigrationStatus status = null, beanStatus; + if (ejbJar != null) { + List beans = ejbJar.getEnterpriseBeans(); + int size = beans.size(); + EnterpriseBean bean; + for (int i = 0; i < size; i++) { + bean = (EnterpriseBean) beans.get(i); + beanStatus = getMigrateToLowerLevelStatus(bean); + if (status == null) + status = beanStatus; + else + status = status.append(beanStatus); + } + } + return status; + } + protected J2EEMigrationStatus getMigrateToLowerLevelStatus(EnterpriseBean bean) { + if (bean.isMessageDriven() && isVersion1_2()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, bean); + if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion2_X() && isVersion1_2()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, bean); + return null; + } + + protected J2EEMigrationStatus migrate(ContainerManagedEntity aCMP) { + boolean is1_x = aCMP.getVersion().equals(ContainerManagedEntity.VERSION_1_X); + if (isVersion1_2() && !is1_x) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, aCMP); + else if ((isVersion1_4() || isVersion1_3()) && is1_x) { + return migrate1_xCMPFor2_0Target(aCMP); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, aCMP); + } + + protected void migrateDescriptionsTo14(XMLResource resource) { + ((EJBResource)resource).getEJBJar().getDescription(); + + } + + + protected J2EEMigrationStatus migrateTo13(EnterpriseBean anEJB) { + if (anEJB != null && getVersion() != null) { + if (anEJB.isContainerManagedEntity()) + return migrate((ContainerManagedEntity) anEJB); + return migrateBeanInterfaces(anEJB); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); + } + + /** + * Migrate a 1.1 CMP to a 1.1 CMP in a 2.0 EJB project. + * Set the cmp-version to 1.x. + * @param aCMP + * @return J2EEMigrationStatus + */ + protected J2EEMigrationStatus migrate1_xCMPFor2_0Target(ContainerManagedEntity aCMP) { + //This is necessary to force a change in the version so the event is + //not a TOUCH which will do nothing. + aCMP.setVersion(ContainerManagedEntity.VERSION_2_X); + if (!isComplex()) + //reset it if we are not doing full migration + aCMP.setVersion(ContainerManagedEntity.VERSION_1_X); + else + aCMP.setAbstractSchemaName(aCMP.getName()); + + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, aCMP); + } + protected J2EEMigrationStatus migrateBeanInterfaces(EnterpriseBean anEJB) { + if (isVersion1_2() && anEJB.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID && anEJB.hasLocalClient()) { + anEJB.setLocalInterface(null); + anEJB.setLocalHomeInterface(null); + return new J2EEMigrationStatus(J2EEMigrationStatus.WARNING, anEJB, format(REMOVED_LOCAL_CLIENT_MSG, anEJB.getName())); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); + } + + private J2EEMigrationMultiStatus migrateBeans13(EJBJar jar) { + J2EEMigrationMultiStatus status = new J2EEMigrationMultiStatus(); + if (jar != null) { + List beans = jar.getEnterpriseBeans(); + int size = beans.size(); + EnterpriseBean bean; + for (int i = 0; i < size; i++) { + bean = (EnterpriseBean) beans.get(i); + status.merge(migrateTo13(bean)); + } + } + return status; + } + + private J2EEMigrationMultiStatus migrateBeans14(EJBJar jar,HashMap beanMap) { + J2EEMigrationMultiStatus status = new J2EEMigrationMultiStatus(); + if (jar != null) { + List beans = jar.getEnterpriseBeans(); + int size = beans.size(); + EnterpriseBean bean; + for (int i = 0; i < size; i++) { + bean = (EnterpriseBean) beans.get(i); + status.merge(migrateTo14Bean(bean,beanMap)); + } + } + return status; + } + /** + * + */ + private J2EEMigrationStatus migrateMessageDrivenTo14(MessageDriven anEJB) { + + ActivationConfig config = EjbFactoryImpl.getActiveFactory().createActivationConfig(); + ActivationConfigProperty property = null; + AcknowledgeMode ackMode = anEJB.getAcknowledgeMode(); + String ackModeName = ackMode.getName(); + + if(ackModeName != null && ackModeName.length() > 0) { + property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); + property.setName("acknowledgeMode"); property.setValue(ackModeName); //$NON-NLS-1$ + config.getConfigProperties().add(property); + anEJB.setAcknowledgeMode(null); + } + + MessageDrivenDestination destination = anEJB.getDestination(); + if(destination != null) + create14Destination(anEJB,destination,config); + + String messageSelector = anEJB.getMessageSelector(); + + if(messageSelector != null && messageSelector.length() > 0) { + property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); + property.setName("messageSelector"); property.setValue(messageSelector); //$NON-NLS-1$ + config.getConfigProperties().add(property); + anEJB.setMessageSelector(null); + + } + anEJB.setActivationConfig(config); + + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, anEJB); + } + + /** + * + */ + private void create14Destination(MessageDriven bean,MessageDrivenDestination destination,ActivationConfig config ) { + DestinationType type = destination.getType(); + String typeString = null; + if (type != null) { + switch (type.getValue()) { + case DestinationType.QUEUE : + typeString = "javax.jms.Queue"; //$NON-NLS-1$ + break; + case DestinationType.TOPIC : + typeString = "javax.jms.Topic"; //$NON-NLS-1$ + break; + } + } + JavaHelpers helper = JavaRefFactory.eINSTANCE.reflectType(typeString,bean.eContainer()); + if(helper != null) + bean.setMessageDestination(helper.getWrapper()); + + ActivationConfigProperty property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); + property.setName("destinationType"); property.setValue(typeString); //$NON-NLS-1$ + config.getConfigProperties().add(property); + + SubscriptionDurabilityKind durability = destination.getSubscriptionDurability(); + String durabilityName = durability.getName(); + if(durabilityName != null && durabilityName.length() > 0) { + property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); + property.setName("subscriptionDurability"); property.setValue(durabilityName); //$NON-NLS-1$ + config.getConfigProperties().add(property); + bean.getDestination().setSubscriptionDurability(null); + } + } + + + protected J2EEMigrationStatus migrateTo13(ApplicationClientResource appClientResource) { + if (!basicNeedsToMigrate()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appClientResource); + String pubId, sysId; + boolean isVersion1_3 = isVersion1_3(); + pubId = isVersion1_3 ? APP_CLIENT_PUBLICID_1_3 : APP_CLIENT_PUBLICID_1_2; + sysId = isVersion1_3 ? APP_CLIENT_SYSTEMID_1_3 : APP_CLIENT_SYSTEMID_1_2; + appClientResource.setDoctypeValues(pubId, sysId); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appClientResource); + } + + protected J2EEMigrationStatus migrateTo13(ApplicationResource appResource) { + if (!basicNeedsToMigrate()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appResource); + String pubId, sysId; + boolean isVersion1_3 = isVersion1_3(); + pubId = isVersion1_3 ? APPLICATION_PUBLICID_1_3 : APPLICATION_PUBLICID_1_2; + sysId = isVersion1_3 ? APPLICATION_SYSTEMID_1_3 : APPLICATION_SYSTEMID_1_2; + appResource.setDoctypeValues(pubId, sysId); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appResource); + } + + protected J2EEMigrationStatus migrateTo13(EJBResource ejbResource) { + J2EEMigrationStatus status = null; + boolean b = basicNeedsToMigrate(); + String pubId, sysId; + boolean isVersion1_3 = isVersion1_3(); + EJBJar jar = ejbResource.getEJBJar(); + if (b) { + if (!isVersion1_3) { + status = getMigrateToLowerLevelStatus(jar); + if (status != null) + return status; + } + ensureBeanVersionsSet(jar); + pubId = isVersion1_3 ? EJBJAR_PUBLICID_2_0 : EJBJAR_PUBLICID_1_1; + sysId = isVersion1_3 ? EJBJAR_SYSTEMID_2_0 : EJBJAR_SYSTEMID_1_1; + ejbResource.setDoctypeValues(pubId, sysId); + } else { + status = new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, ejbResource); + } + boolean notNeeded = status != null; + status = mergeStatuses(status, migrateBeans13(jar)); + if (!notNeeded) + status = mergeStatuses(status, new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, ejbResource)); + return status; + } + + protected J2EEMigrationStatus migrateTo13(WebAppResource webResource) { + if (!basicNeedsToMigrate()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, webResource); + String pubId, sysId; + boolean isVersion1_3 = isVersion1_3(); + pubId = isVersion1_3 ? WEBAPP_PUBLICID_2_3 : WEBAPP_PUBLICID_2_2; + sysId = isVersion1_3 ? WEBAPP_SYSTEMID_2_3 : WEBAPP_SYSTEMID_2_2; + webResource.setDoctypeValues(pubId, sysId); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, webResource); + } + + protected J2EEMigrationStatus migrateTo14(ApplicationClientResource appClientResource) { + if (!basicNeedsMigrationTo14()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appClientResource); + appClientResource.setModuleVersionID(J2EEVersionConstants.J2EE_1_4_ID); + migrateCompatibilityDescriptionGroup(appClientResource); + EObject rootObject = appClientResource.getRootObject(); + appClientResource.removePreservingIds(rootObject); + appClientResource.getContents().remove(rootObject); + appClientResource.getContents().add(rootObject); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appClientResource); + } + + protected J2EEMigrationStatus migrateTo14(ApplicationResource appResource) { + if (!basicNeedsMigrationTo14()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appResource); + appResource.setJ2EEVersionID(J2EEVersionConstants.J2EE_1_4_ID); + migrateCompatibilityDescriptionGroup(appResource); + EObject rootObject = appResource.getRootObject(); + appResource.removePreservingIds(rootObject); + appResource.getContents().add(rootObject); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appResource); + } + + protected J2EEMigrationStatus migrateTo14(ConnectorResource connectorResource) { + if (!basicNeedsMigrationTo14()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED,connectorResource); + connectorResource.setModuleVersionID(J2EEVersionConstants.JCA_1_5_ID); + EObject rootObject = connectorResource.getRootObject(); + connectorResource.getContents().remove(rootObject); + connectorResource.getContents().add(rootObject); + Connector14SpecificationMigrator migrator = new Connector14SpecificationMigrator(); + J2EEMigrationStatus status = migrator.migrateConnectorTo14(connectorResource.getConnector()); + status = mergeStatuses(status,new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,connectorResource)); + return status; + } + + protected J2EEMigrationStatus migrateTo14(EJBResource ejbResource) { + J2EEMigrationStatus status = null; + boolean b = basicNeedsMigrationTo14(); + boolean isVersion1_4 = isVersion1_4(); + EJBJar jar = ejbResource.getEJBJar(); + HashMap beanCache = new HashMap(); + if(jar.getVersionID() == EJB_1_1_ID) + createBeanCache(jar,beanCache); + if (b) { + if (!isVersion1_4) { + status = getMigrateToLowerLevelStatus(jar); + if (status != null) + return status; + } + ejbResource.setModuleVersionID(J2EEVersionConstants.EJB_2_1_ID); + migrateCompatibilityDescriptionGroup(ejbResource); + EObject rootObject = ejbResource.getRootObject(); + ejbResource.removePreservingIds(rootObject); + ejbResource.getContents().add(rootObject); + + } else { + status = new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, ejbResource); + } + boolean notNeeded = status != null; + status = mergeStatuses(status, migrateBeans14(jar,beanCache)); + if (!notNeeded) + status = mergeStatuses(status, new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, ejbResource)); + return status; + } + + protected void migrateCompatibilityDescriptionGroup(XMLResource resource) { + TreeIterator contents = resource.getAllContents(); + EObject object = null; + while(contents.hasNext()) { + object = (EObject) contents.next(); + migrateCompatibilityDescriptionGroup(object); + } + } + + private static final EClass COMPATIBILITY_DESCRIPTION_GROUP_ECLASS = CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup(); + + protected void migrateCompatibilityDescriptionGroup(EObject eObj) { + if(COMPATIBILITY_DESCRIPTION_GROUP_ECLASS.isInstance(eObj)) { + CompatibilityDescriptionGroupImpl cg = (CompatibilityDescriptionGroupImpl)eObj; + if(cg.getDisplayNameGen() != null) cg.setDisplayName(cg.getDisplayNameGen()); + if(cg.getDescriptionGen() != null) cg.setDescription(cg.getDescriptionGen()); + if(cg.getLargeIconGen() != null) cg.setLargeIcon(cg.getLargeIconGen()); + if(cg.getSmallIconGen() != null) cg.setSmallIcon(cg.getSmallIconGen()); + } + } + + /** + * @param jar + * @param beanCache + */ + private void createBeanCache(EJBJar jar, HashMap beanCache) { + List beans = jar.getEnterpriseBeans(); + EnterpriseBean bean; + for (int i = 0; i < beans.size(); i++) { + bean = (EnterpriseBean) beans.get(i); + if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion1_X()) + beanCache.put(bean,ContainerManagedEntity.VERSION_1_X); + } + } + + protected J2EEMigrationStatus migrateTo14(WebAppResource webResource) { + J2EEMigrationStatus status = null; + try { + if (!basicNeedsMigrationTo14()) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, webResource); + webResource.setModuleVersionID(J2EEVersionConstants.WEB_2_4_ID); + migrateCompatibilityDescriptionGroup(webResource); + EObject rootObject = webResource.getRootObject(); + webResource.removePreservingIds(rootObject); + webResource.getContents().add(rootObject); + webResource.saveIfNecessary(); + War14SpecificationMigrator migrator = new War14SpecificationMigrator(); + status = migrator.migrateWebAppTo14(webResource.getWebApp()); + status = mergeStatuses(status,new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, webResource)); + return status; + } catch (Exception e) { + Logger.getLogger().logError(e); + } + return status; + } + private J2EEMigrationStatus migrateTo14Bean(EnterpriseBean anEJB,HashMap beanMap) { + if(!anEJB.isMessageDriven()) { + if (anEJB != null && getVersion() != null) { + if (anEJB.isContainerManagedEntity()) + return migrate((ContainerManagedEntity)anEJB,beanMap); + return migrateBeanInterfaces(anEJB); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); + } + if(anEJB.isMessageDriven()) { + return migrateMessageDrivenTo14((MessageDriven)anEJB); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED,anEJB); + } + + /** + * @param entity + * @param beanMap + * @return + */ + protected J2EEMigrationStatus migrate(ContainerManagedEntity aCMP, HashMap beanMap) { + String versionString = (String)beanMap.get(aCMP); + boolean is1_x = versionString != null && versionString.equals(ContainerManagedEntity.VERSION_1_X); + if (isVersion1_2() && !is1_x) + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, aCMP); + else if ((isVersion1_4() || isVersion1_3()) && is1_x) { + return migrate1_xCMPFor2_0Target(aCMP); + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, aCMP); + } + +} + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/SpecificationMigrator.java new file mode 100644 index 000000000..dd31b0225 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/SpecificationMigrator.java @@ -0,0 +1,209 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.migration; + +import org.eclipse.jst.j2ee.application.ApplicationResource; +import org.eclipse.jst.j2ee.client.ApplicationClientResource; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.ejb.EJBResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.jca.ConnectorResource; +import org.eclipse.jst.j2ee.webapplication.WebAppResource; + + + +/** + * @author mdelder + * + */ +public class SpecificationMigrator implements J2EEConstants, J2EESpecificationMigrationConstants { + private boolean isComplex; + private String version; + private XMLResource xmlResource; + + /** + * Public constructor for migrating a single ejb + */ + public SpecificationMigrator(String aVersion, boolean complex) { + version = aVersion; + isComplex = complex; + } + + /** + * Public constructor for migrating the entire deployment descriptor + */ + public SpecificationMigrator(XMLResource anXmlResource, String aVersion, boolean complex) { + xmlResource = anXmlResource; + version = aVersion; + isComplex = complex; + } + + + public J2EEMigrationStatus migrateTo13() { + if (xmlResource != null && version != null) { + switch (xmlResource.getType()) { + case XMLResource.APP_CLIENT_TYPE : + return migrateTo13((ApplicationClientResource)xmlResource); + case XMLResource.APPLICATION_TYPE : + return migrateTo13((ApplicationResource)xmlResource); + case XMLResource.EJB_TYPE : + return migrateTo13((EJBResource)xmlResource); + case XMLResource.WEB_APP_TYPE : + return migrateTo13((WebAppResource)xmlResource); + } + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, xmlResource); + } + + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo13(WebAppResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo13(EJBResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo13(ApplicationResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo13(ApplicationClientResource resource) { + return null; + } + + public J2EEMigrationStatus migrateTo14() { + if (xmlResource != null && version != null) { + switch (xmlResource.getType()) { + case XMLResource.APP_CLIENT_TYPE : + return migrateTo14((ApplicationClientResource)xmlResource); + case XMLResource.APPLICATION_TYPE : + return migrateTo14((ApplicationResource)xmlResource); + case XMLResource.EJB_TYPE : + return migrateTo14((EJBResource)xmlResource); + case XMLResource.WEB_APP_TYPE : + return migrateTo14((WebAppResource)xmlResource); + case XMLResource.RAR_TYPE : + return migrateTo14 ((ConnectorResource)xmlResource); + } + } + return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, xmlResource); + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo14(ApplicationClientResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo14(ApplicationResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo14(EJBResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo14(WebAppResource resource) { + return null; + } + + /** + * @param resource + * @return + */ + protected J2EEMigrationStatus migrateTo14(ConnectorResource resource) { + return null; + } + + protected boolean basicNeedsMigrationTo14() { + boolean isResource1_4, isTarget1_4; + isResource1_4 = xmlResource.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID; + isTarget1_4 = isVersion1_4(); + return (isResource1_4 && !isTarget1_4) || (!isResource1_4 && isTarget1_4); + } + + protected boolean basicNeedsToMigrate() { + boolean isResource1_3, isTarget1_3; + isResource1_3 = xmlResource.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID; + isTarget1_3 = isVersion1_3(); + return (isResource1_3 && !isTarget1_3) || (!isResource1_3 && isTarget1_3); + } + + protected J2EEMigrationStatus mergeStatuses(J2EEMigrationStatus status1, J2EEMigrationStatus status2) { + if (status1 != null) + return status1.append(status2); + return status2; + } + + + protected boolean isVersion1_2() { + return version == J2EE_VERSION_1_2; + } + + protected boolean isVersion1_3() { + return version == J2EE_VERSION_1_3; + } + + protected boolean isVersion1_4() { + return version == J2EE_VERSION_1_4; + } + + /** + * @return Returns the isComplex. + */ + protected boolean isComplex() { + return isComplex; + } + /** + * @return Returns the version. + */ + public String getVersion() { + return version; + } + /** + * @return Returns the xmlResource. + */ + public XMLResource getXmlResource() { + return xmlResource; + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/War14SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/War14SpecificationMigrator.java new file mode 100644 index 000000000..6508da831 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/migration/War14SpecificationMigrator.java @@ -0,0 +1,202 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 31, 2004 + * + * To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package org.eclipse.jst.j2ee.internal.migration; + +import java.util.List; + +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.jsp.JspFactory; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.WebApp; + + +/** + * @author vijayb + * + * To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +public class War14SpecificationMigrator { + + /** + * @param app + */ + public J2EEMigrationStatus migrateWebAppTo14(WebApp app) { + migrateTabLibs(app); + migrateContextParam(app); + migrateInitParams(app); + return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,(new J2EEMigrationStatus()).format(J2EESpecificationMigrator.DEFAULT_COMPLETED_STATUS_MSG,app.getDisplayName())); + } + /** + * @param app + */ + private void migrateInitParams(WebApp app) { + migrateServletInitParams(app); + migrateFilterInitParams(app); + } + /** + * @param app + */ + private void migrateFilterInitParams(WebApp app) { + List filters = app.getFilters(); + if(filters != null && !filters.isEmpty()) { + for(int i = 0; i < filters.size(); i++) { + Filter filter = (Filter)filters.get(i); + List initParam = filter.getInitParams(); + for(int j = 0; j < initParam.size(); j++) { + InitParam param = (InitParam)initParam.get(j); + if(param != null) { + ParamValue cParam = createParamValue(param); + List contextParams = filter.getInitParamValues(); + if(!paramValueExist(contextParams,cParam)) + filter.getInitParamValues().add(cParam); + } + } + } + } + } + /** + * @param app + */ + private void migrateServletInitParams(WebApp app) { + List servlets = app.getServlets(); + if(servlets != null && !servlets.isEmpty()) { + for(int i = 0; i < servlets.size(); i++) { + Servlet servlet = (Servlet)servlets.get(i); + List initParam = servlet.getParams(); + for(int j = 0; j < initParam.size(); j++) { + InitParam param = (InitParam)initParam.get(j); + if(param != null) { + ParamValue cParam = createParamValue(param); + List contextParams = servlet.getInitParams(); + if(!paramValueExist(contextParams,cParam)) + servlet.getInitParams().add(cParam); + } + } + } + } + } + /** + * @param param + * @return + */ + private ParamValue createParamValue(InitParam param) { + ParamValue cParam = CommonFactory.eINSTANCE.createParamValue(); + cParam.setName(param.getParamName()); + cParam.setValue(param.getParamValue()); + String desc = param.getDescription(); + if(desc != null && desc.length() > 0) + cParam.getDescriptions().add(createDescription(desc)); + return cParam; + } + /** + * @param desc + * @return + */ + private Object createDescription(String desc) { + Description description = CommonFactory.eINSTANCE.createDescription(); + description.setValue(desc); + return description; + } + /** + * @param contextParam + * @param param + * @return + */ + private boolean paramValueExist(List contextParams, ParamValue param) { + boolean exists = false; + for(int i = 0; i < contextParams.size(); i++) { + ParamValue paramValue = (ParamValue)contextParams.get(i); + if(paramValue.getName().equals(param.getName()) && paramValue.getValue().equals(param.getValue())) { + exists = true; + break; + } + } + return exists; + } + + /** + * @param contextParams + * @param param + * @return + */ + private boolean tagLibURITypeExists(List tagLibsURITypes, TagLibRefType tlut) { + boolean exists = false; + for(int i = 0; i < tagLibsURITypes.size(); i++) { + TagLibRefType tempTlut = (TagLibRefType)tagLibsURITypes.get(i); + if(tempTlut.getTaglibLocation().equals(tlut.getTaglibLocation()) && tempTlut.getTaglibURI().equals(tempTlut.getTaglibURI())) { + exists = true; + break; + } + } + return exists; + } + /** + * @param app + */ + private void migrateContextParam(WebApp app) { + List contexts = app.getContexts(); + if(contexts != null && !contexts.isEmpty()) { + for(int j = 0; j < contexts.size(); j++) { + ContextParam param = (ContextParam)contexts.get(j); + if(param != null) { + ParamValue cParam = CommonFactory.eINSTANCE.createParamValue(); + cParam.setName(param.getParamName()); + cParam.setValue(param.getParamValue()); + cParam.setDescription(param.getDescription()); + List contextParams = app.getContextParams(); + if(!paramValueExist(contextParams,cParam)) + app.getContextParams().add(cParam); + } + } + } + } + + + /** + * @param app + */ + private void migrateTabLibs(WebApp app) { + List tagLibs = app.getTagLibs(); + JSPConfig config = app.getJspConfig(); + if(tagLibs != null && !tagLibs.isEmpty()) { + if(config == null) { + config = JspFactory.eINSTANCE.createJSPConfig(); + app.setJspConfig(config); + config = app.getJspConfig(); + } + for(int i = 0; i < tagLibs.size(); i++) { + TagLibRef tlr = (TagLibRef)tagLibs.get(i); + TagLibRefType tlrt = JspFactory.eINSTANCE.createTagLibRefType(); + tlrt.setTaglibLocation(tlr.getTaglibLocation()); + tlrt.setTaglibURI(tlr.getTaglibURI()); + List tagLibRefTypes = config.getTagLibs(); + if(!tagLibURITypeExists(tagLibRefTypes,tlrt)) + config.getTagLibs().add(tlrt); + } + + } + } +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ExtensibleTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ExtensibleTypeImpl.java new file mode 100644 index 000000000..24947c59e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ExtensibleTypeImpl.java @@ -0,0 +1,164 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.taglib.ExtensibleType; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; + + +/** + * + * An implementation of the model object 'Extensible Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.ExtensibleTypeImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public abstract class ExtensibleTypeImpl extends EObjectImpl implements ExtensibleType { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ExtensibleTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getExtensibleType(); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.EXTENSIBLE_TYPE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.EXTENSIBLE_TYPE__VALUE: + return getValue(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.EXTENSIBLE_TYPE__VALUE: + setValue((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.EXTENSIBLE_TYPE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.EXTENSIBLE_TYPE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: ");//$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} //ExtensibleTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/FunctionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/FunctionImpl.java new file mode 100644 index 000000000..955a11068 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/FunctionImpl.java @@ -0,0 +1,431 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; + + +/** + * + * An implementation of the model object 'Function'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getName Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getSignature Signature}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getExample Example}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getFunctionClass Function Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getFunctionExtensions Function Extensions}
  • + *
+ *

+ * + * @generated + */ +public class FunctionImpl extends DescriptionGroupImpl implements Function { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getSignature() Signature}' attribute. + * + * + * @see #getSignature() + * @generated + * @ordered + */ + protected static final String SIGNATURE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSignature() Signature}' attribute. + * + * + * @see #getSignature() + * @generated + * @ordered + */ + protected String signature = SIGNATURE_EDEFAULT; + + /** + * The default value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected static final String EXAMPLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected String example = EXAMPLE_EDEFAULT; + + /** + * The cached value of the '{@link #getFunctionClass() Function Class}' reference. + * + * + * @see #getFunctionClass() + * @generated + * @ordered + */ + protected JavaClass functionClass = null; + + /** + * The cached value of the '{@link #getFunctionExtensions() Function Extensions}' containment reference list. + * + * + * @see #getFunctionExtensions() + * @generated + * @ordered + */ + protected EList functionExtensions = null; + + /** + * + * + * @generated + */ + protected FunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getFunction(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getSignature() { + return signature; + } + + /** + * + * + * @generated + */ + public void setSignature(String newSignature) { + String oldSignature = signature; + signature = newSignature; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__SIGNATURE, oldSignature, signature)); + } + + /** + * + * + * @generated + */ + public String getExample() { + return example; + } + + /** + * + * + * @generated + */ + public void setExample(String newExample) { + String oldExample = example; + example = newExample; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__EXAMPLE, oldExample, example)); + } + + /** + * + * + * @generated + */ + public JavaClass getFunctionClass() { + if (functionClass != null && functionClass.eIsProxy()) { + JavaClass oldFunctionClass = functionClass; + functionClass = (JavaClass)eResolveProxy((InternalEObject)functionClass); + if (functionClass != oldFunctionClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.FUNCTION__FUNCTION_CLASS, oldFunctionClass, functionClass)); + } + } + return functionClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetFunctionClass() { + return functionClass; + } + + /** + * + * + * @generated + */ + public void setFunctionClass(JavaClass newFunctionClass) { + JavaClass oldFunctionClass = functionClass; + functionClass = newFunctionClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__FUNCTION_CLASS, oldFunctionClass, functionClass)); + } + + /** + * + * + * @generated + */ + public EList getFunctionExtensions() { + if (functionExtensions == null) { + functionExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS); + } + return functionExtensions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.FUNCTION__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case TaglibPackage.FUNCTION__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case TaglibPackage.FUNCTION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: + return ((InternalEList)getFunctionExtensions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.FUNCTION__ICONS: + return getIcons(); + case TaglibPackage.FUNCTION__DISPLAY_NAMES: + return getDisplayNames(); + case TaglibPackage.FUNCTION__DESCRIPTIONS: + return getDescriptions(); + case TaglibPackage.FUNCTION__NAME: + return getName(); + case TaglibPackage.FUNCTION__SIGNATURE: + return getSignature(); + case TaglibPackage.FUNCTION__EXAMPLE: + return getExample(); + case TaglibPackage.FUNCTION__FUNCTION_CLASS: + if (resolve) return getFunctionClass(); + return basicGetFunctionClass(); + case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: + return getFunctionExtensions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.FUNCTION__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case TaglibPackage.FUNCTION__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case TaglibPackage.FUNCTION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case TaglibPackage.FUNCTION__NAME: + setName((String)newValue); + return; + case TaglibPackage.FUNCTION__SIGNATURE: + setSignature((String)newValue); + return; + case TaglibPackage.FUNCTION__EXAMPLE: + setExample((String)newValue); + return; + case TaglibPackage.FUNCTION__FUNCTION_CLASS: + setFunctionClass((JavaClass)newValue); + return; + case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: + getFunctionExtensions().clear(); + getFunctionExtensions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.FUNCTION__ICONS: + getIcons().clear(); + return; + case TaglibPackage.FUNCTION__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case TaglibPackage.FUNCTION__DESCRIPTIONS: + getDescriptions().clear(); + return; + case TaglibPackage.FUNCTION__NAME: + setName(NAME_EDEFAULT); + return; + case TaglibPackage.FUNCTION__SIGNATURE: + setSignature(SIGNATURE_EDEFAULT); + return; + case TaglibPackage.FUNCTION__EXAMPLE: + setExample(EXAMPLE_EDEFAULT); + return; + case TaglibPackage.FUNCTION__FUNCTION_CLASS: + setFunctionClass((JavaClass)null); + return; + case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: + getFunctionExtensions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.FUNCTION__ICONS: + return icons != null && !icons.isEmpty(); + case TaglibPackage.FUNCTION__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case TaglibPackage.FUNCTION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case TaglibPackage.FUNCTION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case TaglibPackage.FUNCTION__SIGNATURE: + return SIGNATURE_EDEFAULT == null ? signature != null : !SIGNATURE_EDEFAULT.equals(signature); + case TaglibPackage.FUNCTION__EXAMPLE: + return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); + case TaglibPackage.FUNCTION__FUNCTION_CLASS: + return functionClass != null; + case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: + return functionExtensions != null && !functionExtensions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: ");//$NON-NLS-1$ + result.append(name); + result.append(", signature: ");//$NON-NLS-1$ + result.append(signature); + result.append(", example: ");//$NON-NLS-1$ + result.append(example); + result.append(')'); + return result.toString(); + } + +} //FunctionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagAttributeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagAttributeImpl.java new file mode 100644 index 000000000..125402a5b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagAttributeImpl.java @@ -0,0 +1,473 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; + + +/** + * The attribute tag defines an attribute for the nesting tag + */ +public class JSPTagAttributeImpl extends EObjectImpl implements JSPTagAttribute, EObject{ + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected static final boolean REQUIRED_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean required = REQUIRED_EDEFAULT; + /** + * This is true if the Required attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean requiredESet = false; + + /** + * The default value of the '{@link #isRtExprValue() Rt Expr Value}' attribute. + * + * + * @see #isRtExprValue() + * @generated + * @ordered + */ + protected static final boolean RT_EXPR_VALUE_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean rtExprValue = RT_EXPR_VALUE_EDEFAULT; + /** + * This is true if the Rt Expr Value attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean rtExprValueESet = false; + + /** + * The default value of the '{@link #isFragment() Fragment}' attribute. + * + * + * @see #isFragment() + * @generated + * @ordered + */ + protected static final boolean FRAGMENT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isFragment() Fragment}' attribute. + * + * + * @see #isFragment() + * @generated + * @ordered + */ + protected boolean fragment = FRAGMENT_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass type = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public JSPTagAttributeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getJSPTagAttribute(); + } + + /** + * @generated This field/method will be replaced during code generation + * Defines the canonical name of a tag or attribute being defined (required). + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + * Defines if the nesting attribute is required or optional. + */ + public boolean isRequired() { + return required; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRequired(boolean newRequired) { + boolean oldRequired = required; + required = newRequired; + boolean oldRequiredESet = requiredESet; + requiredESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED, oldRequired, required, !oldRequiredESet)); + } + + /** + * + * + * @generated + */ + public void unsetRequired() { + boolean oldRequired = required; + boolean oldRequiredESet = requiredESet; + required = REQUIRED_EDEFAULT; + requiredESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED, oldRequired, REQUIRED_EDEFAULT, oldRequiredESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetRequired() { + return requiredESet; + } + + /** + * @generated This field/method will be replaced during code generation + * Defines if the nesting attribute can have scriptlet expressions asa value, i.e + * the value of the attribute may be dynamically calculatedat request time, as + * opposed to a static value determined at translationtime. (optional) + * Default = false + */ + public boolean isRtExprValue() { + return rtExprValue; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRtExprValue(boolean newRtExprValue) { + boolean oldRtExprValue = rtExprValue; + rtExprValue = newRtExprValue; + boolean oldRtExprValueESet = rtExprValueESet; + rtExprValueESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE, oldRtExprValue, rtExprValue, !oldRtExprValueESet)); + } + + /** + * + * + * @generated + */ + public void unsetRtExprValue() { + boolean oldRtExprValue = rtExprValue; + boolean oldRtExprValueESet = rtExprValueESet; + rtExprValue = RT_EXPR_VALUE_EDEFAULT; + rtExprValueESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE, oldRtExprValue, RT_EXPR_VALUE_EDEFAULT, oldRtExprValueESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetRtExprValue() { + return rtExprValueESet; + } + + /** + * + * + * @generated + */ + public boolean isFragment() { + return fragment; + } + + /** + * + * + * @generated + */ + public void setFragment(boolean newFragment) { + boolean oldFragment = fragment; + fragment = newFragment; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT, oldFragment, fragment)); + } + + /** + * @generated This field/method will be replaced during code generation + * The value of the type element describes the Java type of the attributes value. + * For static values (those determined at translation time) the type is always + * java.lang.String. + */ + public JavaClass getType() { + if (type != null && type.eIsProxy()) { + JavaClass oldType = type; + type = (JavaClass)eResolveProxy((InternalEObject)type); + if (type != oldType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE, oldType, type)); + } + } + return type; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetType() { + return type; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setType(JavaClass newType) { + JavaClass oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: + return getName(); + case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: + return isRequired() ? Boolean.TRUE : Boolean.FALSE; + case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: + return isRtExprValue() ? Boolean.TRUE : Boolean.FALSE; + case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: + return isFragment() ? Boolean.TRUE : Boolean.FALSE; + case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: + if (resolve) return getType(); + return basicGetType(); + case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: + return isSetRequired(); + case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: + return isSetRtExprValue(); + case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: + return fragment != FRAGMENT_EDEFAULT; + case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: + return type != null; + case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: + setName((String)newValue); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: + setRequired(((Boolean)newValue).booleanValue()); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: + setRtExprValue(((Boolean)newValue).booleanValue()); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: + setFragment(((Boolean)newValue).booleanValue()); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: + setType((JavaClass)newValue); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: + setName(NAME_EDEFAULT); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: + unsetRequired(); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: + unsetRtExprValue(); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: + setFragment(FRAGMENT_EDEFAULT); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: + setType((JavaClass)null); + return; + case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: ");//$NON-NLS-1$ + result.append(name); + result.append(", required: ");//$NON-NLS-1$ + if (requiredESet) result.append(required); else result.append("");//$NON-NLS-1$ + result.append(", rtExprValue: ");//$NON-NLS-1$ + if (rtExprValueESet) result.append(rtExprValue); else result.append("");//$NON-NLS-1$ + result.append(", fragment: ");//$NON-NLS-1$ + result.append(fragment); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagImpl.java new file mode 100644 index 000000000..bb46a3d06 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPTagImpl.java @@ -0,0 +1,599 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl; +import org.eclipse.jst.j2ee.taglib.BodyContentType; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; + + +/** + * The tag element defines an action in this tag library. The tag element has one attribute, id. + * The tag element may have several subelements defining: + * name -- The unique action name + * tag-class -- The tag handler class implementing javax.servlet.jsp.tagext.Tag + * tei-class -- An optional subclass of javax.servlet.jsp.tagext.TagExtraInfo + * body-content -- The body content type + * display-name -- A short name that is intended to be displayed by tools + * small-icon -- Optional small-icon that can be used by tools + * large-icon -- Optional large-icon that can be used by tools + * description -- Optional tag-specific information + * variable -- Optional scripting variable information + * attribute -- All attributes of this action + * example -- Optional informal description of an example of a use of this action. + + */ +public class JSPTagImpl extends DescriptionGroupImpl implements JSPTag{ + + /** + * The default value of the '{@link #getBodyContent() Body Content}' attribute. + * + * + * @see #getBodyContent() + * @generated + * @ordered + */ + protected static final BodyContentType BODY_CONTENT_EDEFAULT = BodyContentType.TAGDEPENDENT_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected BodyContentType bodyContent = BODY_CONTENT_EDEFAULT; + /** + * This is true if the Body Content attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean bodyContentESet = false; + + /** + * The default value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected static final String EXAMPLE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String example = EXAMPLE_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #isDynamicAttributes() Dynamic Attributes}' attribute. + * + * + * @see #isDynamicAttributes() + * @generated + * @ordered + */ + protected static final boolean DYNAMIC_ATTRIBUTES_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDynamicAttributes() Dynamic Attributes}' attribute. + * + * + * @see #isDynamicAttributes() + * @generated + * @ordered + */ + protected boolean dynamicAttributes = DYNAMIC_ATTRIBUTES_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList attributes = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList variables = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass tagClass = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass teiClass = null; + public JSPTagImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getJSPTag(); + } + + /** + * @generated This field/method will be replaced during code generation + * Provides a hint as to the content of the body of this tag. Primarily intended + * for use by page composition tools.There are currently three values specified: + * + * tagdependent - The body of the tag is interpreted by the tag implementation + * itself, and is most likely in a different "langage", e.g embedded SQL + * statements. + * + * JSP - The body of the tag contains nested JSP syntax + * + * empty - The body must be emptyThe default (if not defined) is JSP#PCDATA ::= + * tagdependent | JSP | empty + */ + public BodyContentType getBodyContent() { + return bodyContent; + } + + /** + * + * + * @generated + */ + public void setBodyContent(BodyContentType newBodyContent) { + BodyContentType oldBodyContent = bodyContent; + bodyContent = newBodyContent == null ? BODY_CONTENT_EDEFAULT : newBodyContent; + boolean oldBodyContentESet = bodyContentESet; + bodyContentESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__BODY_CONTENT, oldBodyContent, bodyContent, !oldBodyContentESet)); + } + + /** + * + * + * @generated + */ + public void unsetBodyContent() { + BodyContentType oldBodyContent = bodyContent; + boolean oldBodyContentESet = bodyContentESet; + bodyContent = BODY_CONTENT_EDEFAULT; + bodyContentESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG__BODY_CONTENT, oldBodyContent, BODY_CONTENT_EDEFAULT, oldBodyContentESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetBodyContent() { + return bodyContentESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The example element provides an informal description of an example of the use + * of a tag. + */ + public String getExample() { + return example; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setExample(String newExample) { + String oldExample = example; + example = newExample; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__EXAMPLE, oldExample, example)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public boolean isDynamicAttributes() { + return dynamicAttributes; + } + + /** + * + * + * @generated + */ + public void setDynamicAttributes(boolean newDynamicAttributes) { + boolean oldDynamicAttributes = dynamicAttributes; + dynamicAttributes = newDynamicAttributes; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES, oldDynamicAttributes, dynamicAttributes)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getAttributes() { + if (attributes == null) { + attributes = new EObjectContainmentEList(JSPTagAttribute.class, this, TaglibPackage.JSP_TAG__ATTRIBUTES); + } + return attributes; + } + + /** + * @generated This field/method will be replaced during code generation + * The variable element provides information on the scripting variables defined by + * this tag. + * It is a (translation time) error for an action that has one or more variable + * subelements to have a TagExtraInfo class that returns a non-null object. + * The subelements of variable are of the form: + * name-given -- The variable name as a constant + * name-from-attribute -- The name of an attribute whose (translation time) value + * will give the name of the variable. One of name-given or namefrom-attribute is + * required. + * variable-class -- Name of the class of the variable. java.lang.String is + * default. + * declare -- Whether the variable is declared or not. True is the default. + * scope -- The scope of the scripting variable defined. NESTED is default. + + */ + public EList getVariables() { + if (variables == null) { + variables = new EObjectContainmentEList(JSPVariable.class, this, TaglibPackage.JSP_TAG__VARIABLES); + } + return variables; + } + + /** + * @generated This field/method will be replaced during code generation + * The tag-class element indicates the subclass of javax.serlvet.jsp.tagext.Tag + * that implements the request time semantics for this tag. This element is + * required. + * @regexp fully qualified Java class name + + */ + public JavaClass getTagClass() { + if (tagClass != null && tagClass.eIsProxy()) { + JavaClass oldTagClass = tagClass; + tagClass = (JavaClass)eResolveProxy((InternalEObject)tagClass); + if (tagClass != oldTagClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG__TAG_CLASS, oldTagClass, tagClass)); + } + } + return tagClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetTagClass() { + return tagClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setTagClass(JavaClass newTagClass) { + JavaClass oldTagClass = tagClass; + tagClass = newTagClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__TAG_CLASS, oldTagClass, tagClass)); + } + + /** + * @generated This field/method will be replaced during code generation + * The tei-class element indicates the subclass of + * javax.servlet.jsp.tagext.TagExtraInfo for this tag. The class is instantiated + * at translation time. This element is optional. + * @regexp fully qualified Java class name + */ + public JavaClass getTeiClass() { + if (teiClass != null && teiClass.eIsProxy()) { + JavaClass oldTeiClass = teiClass; + teiClass = (JavaClass)eResolveProxy((InternalEObject)teiClass); + if (teiClass != oldTeiClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG__TEI_CLASS, oldTeiClass, teiClass)); + } + } + return teiClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetTeiClass() { + return teiClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setTeiClass(JavaClass newTeiClass) { + JavaClass oldTeiClass = teiClass; + teiClass = newTeiClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__TEI_CLASS, oldTeiClass, teiClass)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.JSP_TAG__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case TaglibPackage.JSP_TAG__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case TaglibPackage.JSP_TAG__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case TaglibPackage.JSP_TAG__ATTRIBUTES: + return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); + case TaglibPackage.JSP_TAG__VARIABLES: + return ((InternalEList)getVariables()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG__ICONS: + return getIcons(); + case TaglibPackage.JSP_TAG__DISPLAY_NAMES: + return getDisplayNames(); + case TaglibPackage.JSP_TAG__DESCRIPTIONS: + return getDescriptions(); + case TaglibPackage.JSP_TAG__BODY_CONTENT: + return getBodyContent(); + case TaglibPackage.JSP_TAG__EXAMPLE: + return getExample(); + case TaglibPackage.JSP_TAG__NAME: + return getName(); + case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: + return isDynamicAttributes() ? Boolean.TRUE : Boolean.FALSE; + case TaglibPackage.JSP_TAG__ATTRIBUTES: + return getAttributes(); + case TaglibPackage.JSP_TAG__VARIABLES: + return getVariables(); + case TaglibPackage.JSP_TAG__TAG_CLASS: + if (resolve) return getTagClass(); + return basicGetTagClass(); + case TaglibPackage.JSP_TAG__TEI_CLASS: + if (resolve) return getTeiClass(); + return basicGetTeiClass(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG__ICONS: + return icons != null && !icons.isEmpty(); + case TaglibPackage.JSP_TAG__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case TaglibPackage.JSP_TAG__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case TaglibPackage.JSP_TAG__BODY_CONTENT: + return isSetBodyContent(); + case TaglibPackage.JSP_TAG__EXAMPLE: + return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); + case TaglibPackage.JSP_TAG__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: + return dynamicAttributes != DYNAMIC_ATTRIBUTES_EDEFAULT; + case TaglibPackage.JSP_TAG__ATTRIBUTES: + return attributes != null && !attributes.isEmpty(); + case TaglibPackage.JSP_TAG__VARIABLES: + return variables != null && !variables.isEmpty(); + case TaglibPackage.JSP_TAG__TAG_CLASS: + return tagClass != null; + case TaglibPackage.JSP_TAG__TEI_CLASS: + return teiClass != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case TaglibPackage.JSP_TAG__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case TaglibPackage.JSP_TAG__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case TaglibPackage.JSP_TAG__BODY_CONTENT: + setBodyContent((BodyContentType)newValue); + return; + case TaglibPackage.JSP_TAG__EXAMPLE: + setExample((String)newValue); + return; + case TaglibPackage.JSP_TAG__NAME: + setName((String)newValue); + return; + case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: + setDynamicAttributes(((Boolean)newValue).booleanValue()); + return; + case TaglibPackage.JSP_TAG__ATTRIBUTES: + getAttributes().clear(); + getAttributes().addAll((Collection)newValue); + return; + case TaglibPackage.JSP_TAG__VARIABLES: + getVariables().clear(); + getVariables().addAll((Collection)newValue); + return; + case TaglibPackage.JSP_TAG__TAG_CLASS: + setTagClass((JavaClass)newValue); + return; + case TaglibPackage.JSP_TAG__TEI_CLASS: + setTeiClass((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_TAG__ICONS: + getIcons().clear(); + return; + case TaglibPackage.JSP_TAG__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case TaglibPackage.JSP_TAG__DESCRIPTIONS: + getDescriptions().clear(); + return; + case TaglibPackage.JSP_TAG__BODY_CONTENT: + unsetBodyContent(); + return; + case TaglibPackage.JSP_TAG__EXAMPLE: + setExample(EXAMPLE_EDEFAULT); + return; + case TaglibPackage.JSP_TAG__NAME: + setName(NAME_EDEFAULT); + return; + case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: + setDynamicAttributes(DYNAMIC_ATTRIBUTES_EDEFAULT); + return; + case TaglibPackage.JSP_TAG__ATTRIBUTES: + getAttributes().clear(); + return; + case TaglibPackage.JSP_TAG__VARIABLES: + getVariables().clear(); + return; + case TaglibPackage.JSP_TAG__TAG_CLASS: + setTagClass((JavaClass)null); + return; + case TaglibPackage.JSP_TAG__TEI_CLASS: + setTeiClass((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (bodyContent: ");//$NON-NLS-1$ + if (bodyContentESet) result.append(bodyContent); else result.append("");//$NON-NLS-1$ + result.append(", example: ");//$NON-NLS-1$ + result.append(example); + result.append(", name: ");//$NON-NLS-1$ + result.append(name); + result.append(", dynamicAttributes: ");//$NON-NLS-1$ + result.append(dynamicAttributes); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPVariableImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPVariableImpl.java new file mode 100644 index 000000000..94d4ffacb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/JSPVariableImpl.java @@ -0,0 +1,397 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; + + +/** + * @generated + */ +public class JSPVariableImpl extends EObjectImpl implements JSPVariable{ + + /** + * The default value of the '{@link #getNameGiven() Name Given}' attribute. + * + * + * @see #getNameGiven() + * @generated + * @ordered + */ + protected static final String NAME_GIVEN_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String nameGiven = NAME_GIVEN_EDEFAULT; + /** + * The default value of the '{@link #getNameFromAttribute() Name From Attribute}' attribute. + * + * + * @see #getNameFromAttribute() + * @generated + * @ordered + */ + protected static final String NAME_FROM_ATTRIBUTE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String nameFromAttribute = NAME_FROM_ATTRIBUTE_EDEFAULT; + /** + * The default value of the '{@link #isDeclare() Declare}' attribute. + * + * + * @see #isDeclare() + * @generated + * @ordered + */ + protected static final boolean DECLARE_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean declare = DECLARE_EDEFAULT; + /** + * The default value of the '{@link #getScope() Scope}' attribute. + * + * + * @see #getScope() + * @generated + * @ordered + */ + protected static final JSPScriptingVariableScope SCOPE_EDEFAULT = JSPScriptingVariableScope.NESTED_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected JSPScriptingVariableScope scope = SCOPE_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass variableClass = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public JSPVariableImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getJSPVariable(); + } + + /** + * @generated This field/method will be replaced during code generation + * The name-given element provides the name for the scripting variable. + * + * One of name-given or name-from-attribute is required. + */ + public String getNameGiven() { + return nameGiven; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setNameGiven(String newNameGiven) { + String oldNameGiven = nameGiven; + nameGiven = newNameGiven; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__NAME_GIVEN, oldNameGiven, nameGiven)); + } + + /** + * @generated This field/method will be replaced during code generation + * The name of an attribute whose (translation-time) value will give the name of + * the variable. + */ + public String getNameFromAttribute() { + return nameFromAttribute; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setNameFromAttribute(String newNameFromAttribute) { + String oldNameFromAttribute = nameFromAttribute; + nameFromAttribute = newNameFromAttribute; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE, oldNameFromAttribute, nameFromAttribute)); + } + + /** + * @generated This field/method will be replaced during code generation + * The value of the declare element indicates whether the scripting variable is to + * be defined or not. See TagExtraInfo for details. + * This element is optional and is the default is true. + + */ + public boolean isDeclare() { + return declare; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDeclare(boolean newDeclare) { + boolean oldDeclare = declare; + declare = newDeclare; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__DECLARE, oldDeclare, declare)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JSPScriptingVariableScope getScope() { + return scope; + } + + /** + * + * + * @generated + */ + public void setScope(JSPScriptingVariableScope newScope) { + JSPScriptingVariableScope oldScope = scope; + scope = newScope == null ? SCOPE_EDEFAULT : newScope; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__SCOPE, oldScope, scope)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public JavaClass getVariableClass() { + if (variableClass != null && variableClass.eIsProxy()) { + JavaClass oldVariableClass = variableClass; + variableClass = (JavaClass)eResolveProxy((InternalEObject)variableClass); + if (variableClass != oldVariableClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS, oldVariableClass, variableClass)); + } + } + return variableClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetVariableClass() { + return variableClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setVariableClass(JavaClass newVariableClass) { + JavaClass oldVariableClass = variableClass; + variableClass = newVariableClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS, oldVariableClass, variableClass)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.JSP_VARIABLE__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: + return getNameGiven(); + case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: + return getNameFromAttribute(); + case TaglibPackage.JSP_VARIABLE__DECLARE: + return isDeclare() ? Boolean.TRUE : Boolean.FALSE; + case TaglibPackage.JSP_VARIABLE__SCOPE: + return getScope(); + case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: + if (resolve) return getVariableClass(); + return basicGetVariableClass(); + case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: + return NAME_GIVEN_EDEFAULT == null ? nameGiven != null : !NAME_GIVEN_EDEFAULT.equals(nameGiven); + case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: + return NAME_FROM_ATTRIBUTE_EDEFAULT == null ? nameFromAttribute != null : !NAME_FROM_ATTRIBUTE_EDEFAULT.equals(nameFromAttribute); + case TaglibPackage.JSP_VARIABLE__DECLARE: + return declare != DECLARE_EDEFAULT; + case TaglibPackage.JSP_VARIABLE__SCOPE: + return scope != SCOPE_EDEFAULT; + case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: + return variableClass != null; + case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: + setNameGiven((String)newValue); + return; + case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: + setNameFromAttribute((String)newValue); + return; + case TaglibPackage.JSP_VARIABLE__DECLARE: + setDeclare(((Boolean)newValue).booleanValue()); + return; + case TaglibPackage.JSP_VARIABLE__SCOPE: + setScope((JSPScriptingVariableScope)newValue); + return; + case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: + setVariableClass((JavaClass)newValue); + return; + case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: + setNameGiven(NAME_GIVEN_EDEFAULT); + return; + case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: + setNameFromAttribute(NAME_FROM_ATTRIBUTE_EDEFAULT); + return; + case TaglibPackage.JSP_VARIABLE__DECLARE: + setDeclare(DECLARE_EDEFAULT); + return; + case TaglibPackage.JSP_VARIABLE__SCOPE: + setScope(SCOPE_EDEFAULT); + return; + case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: + setVariableClass((JavaClass)null); + return; + case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (nameGiven: ");//$NON-NLS-1$ + result.append(nameGiven); + result.append(", nameFromAttribute: ");//$NON-NLS-1$ + result.append(nameFromAttribute); + result.append(", declare: ");//$NON-NLS-1$ + result.append(declare); + result.append(", scope: ");//$NON-NLS-1$ + result.append(scope); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagFileImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagFileImpl.java new file mode 100644 index 000000000..30e72fc87 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagFileImpl.java @@ -0,0 +1,370 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.internal.common.impl.DescriptionGroupImpl; +import org.eclipse.jst.j2ee.taglib.TagFile; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; + + +/** + * + * An implementation of the model object 'Tag File'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getName Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getPath Path}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getExample Example}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getTagExtensions Tag Extensions}
  • + *
+ *

+ * + * @generated + */ +public class TagFileImpl extends DescriptionGroupImpl implements TagFile { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The default value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected static final String EXAMPLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected String example = EXAMPLE_EDEFAULT; + + /** + * The cached value of the '{@link #getTagExtensions() Tag Extensions}' containment reference list. + * + * + * @see #getTagExtensions() + * @generated + * @ordered + */ + protected EList tagExtensions = null; + + /** + * + * + * @generated + */ + protected TagFileImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getTagFile(); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + public String getExample() { + return example; + } + + /** + * + * + * @generated + */ + public void setExample(String newExample) { + String oldExample = example; + example = newExample; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__EXAMPLE, oldExample, example)); + } + + /** + * + * + * @generated + */ + public EList getTagExtensions() { + if (tagExtensions == null) { + tagExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.TAG_FILE__TAG_EXTENSIONS); + } + return tagExtensions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.TAG_FILE__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_FILE__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_FILE__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: + return ((InternalEList)getTagExtensions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_FILE__ICONS: + return getIcons(); + case TaglibPackage.TAG_FILE__DISPLAY_NAMES: + return getDisplayNames(); + case TaglibPackage.TAG_FILE__DESCRIPTIONS: + return getDescriptions(); + case TaglibPackage.TAG_FILE__NAME: + return getName(); + case TaglibPackage.TAG_FILE__PATH: + return getPath(); + case TaglibPackage.TAG_FILE__EXAMPLE: + return getExample(); + case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: + return getTagExtensions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_FILE__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_FILE__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_FILE__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_FILE__NAME: + setName((String)newValue); + return; + case TaglibPackage.TAG_FILE__PATH: + setPath((String)newValue); + return; + case TaglibPackage.TAG_FILE__EXAMPLE: + setExample((String)newValue); + return; + case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: + getTagExtensions().clear(); + getTagExtensions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_FILE__ICONS: + getIcons().clear(); + return; + case TaglibPackage.TAG_FILE__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case TaglibPackage.TAG_FILE__DESCRIPTIONS: + getDescriptions().clear(); + return; + case TaglibPackage.TAG_FILE__NAME: + setName(NAME_EDEFAULT); + return; + case TaglibPackage.TAG_FILE__PATH: + setPath(PATH_EDEFAULT); + return; + case TaglibPackage.TAG_FILE__EXAMPLE: + setExample(EXAMPLE_EDEFAULT); + return; + case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: + getTagExtensions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_FILE__ICONS: + return icons != null && !icons.isEmpty(); + case TaglibPackage.TAG_FILE__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case TaglibPackage.TAG_FILE__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case TaglibPackage.TAG_FILE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case TaglibPackage.TAG_FILE__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + case TaglibPackage.TAG_FILE__EXAMPLE: + return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); + case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: + return tagExtensions != null && !tagExtensions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: ");//$NON-NLS-1$ + result.append(name); + result.append(", path: ");//$NON-NLS-1$ + result.append(path); + result.append(", example: ");//$NON-NLS-1$ + result.append(example); + result.append(')'); + return result.toString(); + } + +} //TagFileImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagLibImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagLibImpl.java new file mode 100644 index 000000000..5c80cf652 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TagLibImpl.java @@ -0,0 +1,594 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.TagLib; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; +import org.eclipse.jst.j2ee.taglib.Validator; + + +/** + * The taglib tag is the document root. + + */ +public class TagLibImpl extends CompatibilityDescriptionGroupImpl implements TagLib{ + + /** + * The default value of the '{@link #getTagLibVersion() Tag Lib Version}' attribute. + * + * + * @see #getTagLibVersion() + * @generated + * @ordered + */ + protected static final String TAG_LIB_VERSION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String tagLibVersion = TAG_LIB_VERSION_EDEFAULT; + /** + * The default value of the '{@link #getJspVersion() Jsp Version}' attribute. + * + * + * @see #getJspVersion() + * @generated + * @ordered + */ + protected static final String JSP_VERSION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String jspVersion = JSP_VERSION_EDEFAULT; + /** + * The default value of the '{@link #getShortName() Short Name}' attribute. + * + * + * @see #getShortName() + * @generated + * @ordered + */ + protected static final String SHORT_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String shortName = SHORT_NAME_EDEFAULT; + /** + * The default value of the '{@link #getUri() Uri}' attribute. + * + * + * @see #getUri() + * @generated + * @ordered + */ + protected static final String URI_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String uri = URI_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList tags = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected Validator validator = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList listeners = null; + /** + * The cached value of the '{@link #getFunctions() Functions}' containment reference list. + * + * + * @see #getFunctions() + * @generated + * @ordered + */ + protected EList functions = null; + + /** + * The cached value of the '{@link #getTaglibExtensions() Taglib Extensions}' containment reference list. + * + * + * @see #getTaglibExtensions() + * @generated + * @ordered + */ + protected EList taglibExtensions = null; + + public TagLibImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getTagLib(); + } + + /** + * @generated This field/method will be replaced during code generation + * Describes this version number of the tag library (dewey decimal). + * @regexp [0-9]*{ "."[0-9] }0..3 + */ + public String getTagLibVersion() { + return tagLibVersion; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setTagLibVersion(String newTagLibVersion) { + String oldTagLibVersion = tagLibVersion; + tagLibVersion = newTagLibVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__TAG_LIB_VERSION, oldTagLibVersion, tagLibVersion)); + } + + /** + * @generated This field/method will be replaced during code generation + * Describes the JSP version (number) this tag library requires in order to + * function (dewey decimal). Default is 1.2 + * @regexp [0-9]*{ "."[0-9] }0..3 + */ + public String getJspVersion() { + return jspVersion; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setJspVersion(String newJspVersion) { + String oldJspVersion = jspVersion; + jspVersion = newJspVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__JSP_VERSION, oldJspVersion, jspVersion)); + } + + /** + * @generated This field/method will be replaced during code generation + * The value of the short-name element is a name that could be used by a JSP + * authoring tool to create names with a mnemonic value; for example, it may be + * used as the prefered prefix value in taglib directives. Do not use white space, + * and do not start with digits or underscore. + */ + public String getShortName() { + return shortName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setShortName(String newShortName) { + String oldShortName = shortName; + shortName = newShortName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__SHORT_NAME, oldShortName, shortName)); + } + + /** + * @generated This field/method will be replaced during code generation + * The value of the uri element is a public URI that uniquely identifies the exact + * semantics of this taglibrary. + */ + public String getUri() { + return uri; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUri(String newUri) { + String oldUri = uri; + uri = newUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__URI, oldUri, uri)); + } + + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(displayName); + } + + /** + This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ + public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getModuleVersionID(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getTags() { + if (tags == null) { + tags = new EObjectContainmentEList(JSPTag.class, this, TaglibPackage.TAG_LIB__TAGS); + } + return tags; + } + + /** + * @generated This field/method will be replaced during code generation + * The validator element provides information on an optional validator that can be + * used to validate the conformance of a JSP page to using this tag library. + + */ + public Validator getValidator() { + return validator; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValidator(Validator newValidator, NotificationChain msgs) { + Validator oldValidator = validator; + validator = newValidator; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__VALIDATOR, oldValidator, newValidator); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setValidator(Validator newValidator) { + if (newValidator != validator) { + NotificationChain msgs = null; + if (validator != null) + msgs = ((InternalEObject)validator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaglibPackage.TAG_LIB__VALIDATOR, null, msgs); + if (newValidator != null) + msgs = ((InternalEObject)newValidator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TaglibPackage.TAG_LIB__VALIDATOR, null, msgs); + msgs = basicSetValidator(newValidator, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__VALIDATOR, newValidator, newValidator)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getListeners() { + if (listeners == null) { + listeners = new EObjectContainmentEList(Listener.class, this, TaglibPackage.TAG_LIB__LISTENERS); + } + return listeners; + } + + /** + * + * + * @generated + */ + public EList getFunctions() { + if (functions == null) { + functions = new EObjectContainmentEList(Function.class, this, TaglibPackage.TAG_LIB__FUNCTIONS); + } + return functions; + } + + /** + * + * + * @generated + */ + public EList getTaglibExtensions() { + if (taglibExtensions == null) { + taglibExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS); + } + return taglibExtensions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.TAG_LIB__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__TAGS: + return ((InternalEList)getTags()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__VALIDATOR: + return basicSetValidator(null, msgs); + case TaglibPackage.TAG_LIB__LISTENERS: + return ((InternalEList)getListeners()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__FUNCTIONS: + return ((InternalEList)getFunctions()).basicRemove(otherEnd, msgs); + case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: + return ((InternalEList)getTaglibExtensions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_LIB__ICONS: + return getIcons(); + case TaglibPackage.TAG_LIB__DISPLAY_NAMES: + return getDisplayNames(); + case TaglibPackage.TAG_LIB__DESCRIPTIONS: + return getDescriptions(); + case TaglibPackage.TAG_LIB__SMALL_ICON: + return getSmallIcon(); + case TaglibPackage.TAG_LIB__LARGE_ICON: + return getLargeIcon(); + case TaglibPackage.TAG_LIB__DESCRIPTION: + return getDescription(); + case TaglibPackage.TAG_LIB__DISPLAY_NAME: + return getDisplayName(); + case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: + return getTagLibVersion(); + case TaglibPackage.TAG_LIB__JSP_VERSION: + return getJspVersion(); + case TaglibPackage.TAG_LIB__SHORT_NAME: + return getShortName(); + case TaglibPackage.TAG_LIB__URI: + return getUri(); + case TaglibPackage.TAG_LIB__TAGS: + return getTags(); + case TaglibPackage.TAG_LIB__VALIDATOR: + return getValidator(); + case TaglibPackage.TAG_LIB__LISTENERS: + return getListeners(); + case TaglibPackage.TAG_LIB__FUNCTIONS: + return getFunctions(); + case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: + return getTaglibExtensions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_LIB__ICONS: + return icons != null && !icons.isEmpty(); + case TaglibPackage.TAG_LIB__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case TaglibPackage.TAG_LIB__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case TaglibPackage.TAG_LIB__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case TaglibPackage.TAG_LIB__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case TaglibPackage.TAG_LIB__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case TaglibPackage.TAG_LIB__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: + return TAG_LIB_VERSION_EDEFAULT == null ? tagLibVersion != null : !TAG_LIB_VERSION_EDEFAULT.equals(tagLibVersion); + case TaglibPackage.TAG_LIB__JSP_VERSION: + return JSP_VERSION_EDEFAULT == null ? jspVersion != null : !JSP_VERSION_EDEFAULT.equals(jspVersion); + case TaglibPackage.TAG_LIB__SHORT_NAME: + return SHORT_NAME_EDEFAULT == null ? shortName != null : !SHORT_NAME_EDEFAULT.equals(shortName); + case TaglibPackage.TAG_LIB__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case TaglibPackage.TAG_LIB__TAGS: + return tags != null && !tags.isEmpty(); + case TaglibPackage.TAG_LIB__VALIDATOR: + return validator != null; + case TaglibPackage.TAG_LIB__LISTENERS: + return listeners != null && !listeners.isEmpty(); + case TaglibPackage.TAG_LIB__FUNCTIONS: + return functions != null && !functions.isEmpty(); + case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: + return taglibExtensions != null && !taglibExtensions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_LIB__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case TaglibPackage.TAG_LIB__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case TaglibPackage.TAG_LIB__DESCRIPTION: + setDescription((String)newValue); + return; + case TaglibPackage.TAG_LIB__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: + setTagLibVersion((String)newValue); + return; + case TaglibPackage.TAG_LIB__JSP_VERSION: + setJspVersion((String)newValue); + return; + case TaglibPackage.TAG_LIB__SHORT_NAME: + setShortName((String)newValue); + return; + case TaglibPackage.TAG_LIB__URI: + setUri((String)newValue); + return; + case TaglibPackage.TAG_LIB__TAGS: + getTags().clear(); + getTags().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__VALIDATOR: + setValidator((Validator)newValue); + return; + case TaglibPackage.TAG_LIB__LISTENERS: + getListeners().clear(); + getListeners().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__FUNCTIONS: + getFunctions().clear(); + getFunctions().addAll((Collection)newValue); + return; + case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: + getTaglibExtensions().clear(); + getTaglibExtensions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TAG_LIB__ICONS: + getIcons().clear(); + return; + case TaglibPackage.TAG_LIB__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case TaglibPackage.TAG_LIB__DESCRIPTIONS: + getDescriptions().clear(); + return; + case TaglibPackage.TAG_LIB__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: + setTagLibVersion(TAG_LIB_VERSION_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__JSP_VERSION: + setJspVersion(JSP_VERSION_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__SHORT_NAME: + setShortName(SHORT_NAME_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__URI: + setUri(URI_EDEFAULT); + return; + case TaglibPackage.TAG_LIB__TAGS: + getTags().clear(); + return; + case TaglibPackage.TAG_LIB__VALIDATOR: + setValidator((Validator)null); + return; + case TaglibPackage.TAG_LIB__LISTENERS: + getListeners().clear(); + return; + case TaglibPackage.TAG_LIB__FUNCTIONS: + getFunctions().clear(); + return; + case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: + getTaglibExtensions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (tagLibVersion: ");//$NON-NLS-1$ + result.append(tagLibVersion); + result.append(", jspVersion: ");//$NON-NLS-1$ + result.append(jspVersion); + result.append(", shortName: ");//$NON-NLS-1$ + result.append(shortName); + result.append(", uri: ");//$NON-NLS-1$ + result.append(uri); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibFactoryImpl.java new file mode 100644 index 000000000..3e5b3bcdf --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibFactoryImpl.java @@ -0,0 +1,183 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.taglib.BodyContentType; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TagFile; +import org.eclipse.jst.j2ee.taglib.TagLib; +import org.eclipse.jst.j2ee.taglib.TaglibFactory; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; +import org.eclipse.jst.j2ee.taglib.Validator; + +/** + * @generated + */ +public class TaglibFactoryImpl extends EFactoryImpl implements TaglibFactory{ + + public TaglibFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case TaglibPackage.TAG_LIB: return createTagLib(); + case TaglibPackage.JSP_TAG: return createJSPTag(); + case TaglibPackage.JSP_TAG_ATTRIBUTE: return createJSPTagAttribute(); + case TaglibPackage.VALIDATOR: return createValidator(); + case TaglibPackage.JSP_VARIABLE: return createJSPVariable(); + case TaglibPackage.FUNCTION: return createFunction(); + case TaglibPackage.TAG_FILE: return createTagFile(); + case TaglibPackage.TLD_EXTENSION: return createTldExtension(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case TaglibPackage.BODY_CONTENT_TYPE: + return BodyContentType.get(initialValue); + case TaglibPackage.JSP_SCRIPTING_VARIABLE_SCOPE: + return JSPScriptingVariableScope.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case TaglibPackage.BODY_CONTENT_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case TaglibPackage.JSP_SCRIPTING_VARIABLE_SCOPE: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + +public static TaglibFactory getActiveFactory() { + return (TaglibFactory) getPackage().getEFactoryInstance(); +} + /** + * @generated This field/method will be replaced during code generation. + */ + public TagLib createTagLib() { + TagLibImpl tagLib = new TagLibImpl(); + return tagLib; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Validator createValidator() { + ValidatorImpl validator = new ValidatorImpl(); + return validator; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JSPTag createJSPTag() { + JSPTagImpl jspTag = new JSPTagImpl(); + return jspTag; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JSPTagAttribute createJSPTagAttribute() { + JSPTagAttributeImpl jspTagAttribute = new JSPTagAttributeImpl(); + return jspTagAttribute; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JSPVariable createJSPVariable() { + JSPVariableImpl jspVariable = new JSPVariableImpl(); + return jspVariable; + } + + /** + * + * + * @generated + */ + public Function createFunction() { + FunctionImpl function = new FunctionImpl(); + return function; + } + + /** + * + * + * @generated + */ + public TagFile createTagFile() { + TagFileImpl tagFile = new TagFileImpl(); + return tagFile; + } + + /** + * + * + * @generated + */ + public TldExtension createTldExtension() { + TldExtensionImpl tldExtension = new TldExtensionImpl(); + return tldExtension; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public TaglibPackage getTaglibPackage() { + return (TaglibPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static TaglibPackage getPackage() { + return TaglibPackage.eINSTANCE; + } +} + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibPackageImpl.java new file mode 100644 index 000000000..9c941e597 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TaglibPackageImpl.java @@ -0,0 +1,851 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.BodyContentType; +import org.eclipse.jst.j2ee.taglib.ExtensibleType; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TagFile; +import org.eclipse.jst.j2ee.taglib.TagLib; +import org.eclipse.jst.j2ee.taglib.TaglibFactory; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; +import org.eclipse.jst.j2ee.taglib.Validator; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class TaglibPackageImpl extends EPackageImpl implements TaglibPackage, EPackage { + /** + * + * + * @generated + */ + private EClass tagLibEClass = null; + + /** + * + * + * @generated + */ + private EClass jspTagEClass = null; + + /** + * + * + * @generated + */ + private EClass jspTagAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass validatorEClass = null; + + /** + * + * + * @generated + */ + private EClass jspVariableEClass = null; + + /** + * + * + * @generated + */ + private EClass functionEClass = null; + + /** + * + * + * @generated + */ + private EClass tagFileEClass = null; + + /** + * + * + * @generated + */ + private EClass tldExtensionEClass = null; + + /** + * + * + * @generated + */ + private EClass extensibleTypeEClass = null; + + /** + * + * + * @generated + */ + private EEnum bodyContentTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum jspScriptingVariableScopeEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private TaglibPackageImpl() { + super(eNS_URI, TaglibFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static TaglibPackage init() { + if (isInited) return (TaglibPackage)EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI); + + // Obtain or create and register package. + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new TaglibPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + + // Step 1: create meta-model objects + theTaglibPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + + // Step 2: complete initialization + theTaglibPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + + return theTaglibPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getTagLib() { + return tagLibEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLib_TagLibVersion() { + return (EAttribute)tagLibEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLib_JspVersion() { + return (EAttribute)tagLibEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLib_ShortName() { + return (EAttribute)tagLibEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLib_Uri() { + return (EAttribute)tagLibEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getTagLib_Tags() { + return (EReference)tagLibEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getTagLib_Validator() { + return (EReference)tagLibEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getTagLib_Listeners() { + return (EReference)tagLibEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getTagLib_Functions() { + return (EReference)tagLibEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getTagLib_TaglibExtensions() { + return (EReference)tagLibEClass.getEStructuralFeatures().get(8); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getValidator() { + return validatorEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getValidator_ValidatorClass() { + return (EReference)validatorEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getValidator_InitParams() { + return (EReference)validatorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getValidator_Descriptions() { + return (EReference)validatorEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getJSPTag() { + return jspTagEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPTag_BodyContent() { + return (EAttribute)jspTagEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPTag_Example() { + return (EAttribute)jspTagEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPTag_Name() { + return (EAttribute)jspTagEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPTag_DynamicAttributes() { + return (EAttribute)jspTagEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPTag_Attributes() { + return (EReference)jspTagEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPTag_Variables() { + return (EReference)jspTagEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPTag_TagClass() { + return (EReference)jspTagEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPTag_TeiClass() { + return (EReference)jspTagEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getJSPTagAttribute() { + return jspTagAttributeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPTagAttribute_Name() { + return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPTagAttribute_Required() { + return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPTagAttribute_RtExprValue() { + return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getJSPTagAttribute_Fragment() { + return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPTagAttribute_Type() { + return (EReference)jspTagAttributeEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getJSPTagAttribute_Descriptions() { + return (EReference)jspTagAttributeEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getJSPVariable() { + return jspVariableEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPVariable_NameGiven() { + return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPVariable_NameFromAttribute() { + return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPVariable_Declare() { + return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPVariable_Scope() { + return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getJSPVariable_VariableClass() { + return (EReference)jspVariableEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getJSPVariable_Descriptions() { + return (EReference)jspVariableEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getFunction() { + return functionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunction_Name() { + return (EAttribute)functionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunction_Signature() { + return (EAttribute)functionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getFunction_Example() { + return (EAttribute)functionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getFunction_FunctionClass() { + return (EReference)functionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getFunction_FunctionExtensions() { + return (EReference)functionEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getTagFile() { + return tagFileEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTagFile_Name() { + return (EAttribute)tagFileEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getTagFile_Path() { + return (EAttribute)tagFileEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getTagFile_Example() { + return (EAttribute)tagFileEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getTagFile_TagExtensions() { + return (EReference)tagFileEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getTldExtension() { + return tldExtensionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTldExtension_Namespace() { + return (EAttribute)tldExtensionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTldExtension_ExtensionElements() { + return (EReference)tldExtensionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getExtensibleType() { + return extensibleTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getExtensibleType_Value() { + return (EAttribute)extensibleTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getBodyContentType() { + return bodyContentTypeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getJSPScriptingVariableScope() { + return jspScriptingVariableScopeEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public TaglibFactory getTaglibFactory() { + return (TaglibFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + tagLibEClass = createEClass(TAG_LIB); + createEAttribute(tagLibEClass, TAG_LIB__TAG_LIB_VERSION); + createEAttribute(tagLibEClass, TAG_LIB__JSP_VERSION); + createEAttribute(tagLibEClass, TAG_LIB__SHORT_NAME); + createEAttribute(tagLibEClass, TAG_LIB__URI); + createEReference(tagLibEClass, TAG_LIB__TAGS); + createEReference(tagLibEClass, TAG_LIB__VALIDATOR); + createEReference(tagLibEClass, TAG_LIB__LISTENERS); + createEReference(tagLibEClass, TAG_LIB__FUNCTIONS); + createEReference(tagLibEClass, TAG_LIB__TAGLIB_EXTENSIONS); + + jspTagEClass = createEClass(JSP_TAG); + createEAttribute(jspTagEClass, JSP_TAG__BODY_CONTENT); + createEAttribute(jspTagEClass, JSP_TAG__EXAMPLE); + createEAttribute(jspTagEClass, JSP_TAG__NAME); + createEAttribute(jspTagEClass, JSP_TAG__DYNAMIC_ATTRIBUTES); + createEReference(jspTagEClass, JSP_TAG__ATTRIBUTES); + createEReference(jspTagEClass, JSP_TAG__VARIABLES); + createEReference(jspTagEClass, JSP_TAG__TAG_CLASS); + createEReference(jspTagEClass, JSP_TAG__TEI_CLASS); + + jspTagAttributeEClass = createEClass(JSP_TAG_ATTRIBUTE); + createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__NAME); + createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__REQUIRED); + createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE); + createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__FRAGMENT); + createEReference(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__TYPE); + createEReference(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__DESCRIPTIONS); + + validatorEClass = createEClass(VALIDATOR); + createEReference(validatorEClass, VALIDATOR__VALIDATOR_CLASS); + createEReference(validatorEClass, VALIDATOR__INIT_PARAMS); + createEReference(validatorEClass, VALIDATOR__DESCRIPTIONS); + + jspVariableEClass = createEClass(JSP_VARIABLE); + createEAttribute(jspVariableEClass, JSP_VARIABLE__NAME_GIVEN); + createEAttribute(jspVariableEClass, JSP_VARIABLE__NAME_FROM_ATTRIBUTE); + createEAttribute(jspVariableEClass, JSP_VARIABLE__DECLARE); + createEAttribute(jspVariableEClass, JSP_VARIABLE__SCOPE); + createEReference(jspVariableEClass, JSP_VARIABLE__VARIABLE_CLASS); + createEReference(jspVariableEClass, JSP_VARIABLE__DESCRIPTIONS); + + functionEClass = createEClass(FUNCTION); + createEAttribute(functionEClass, FUNCTION__NAME); + createEAttribute(functionEClass, FUNCTION__SIGNATURE); + createEAttribute(functionEClass, FUNCTION__EXAMPLE); + createEReference(functionEClass, FUNCTION__FUNCTION_CLASS); + createEReference(functionEClass, FUNCTION__FUNCTION_EXTENSIONS); + + tagFileEClass = createEClass(TAG_FILE); + createEAttribute(tagFileEClass, TAG_FILE__NAME); + createEAttribute(tagFileEClass, TAG_FILE__PATH); + createEAttribute(tagFileEClass, TAG_FILE__EXAMPLE); + createEReference(tagFileEClass, TAG_FILE__TAG_EXTENSIONS); + + tldExtensionEClass = createEClass(TLD_EXTENSION); + createEAttribute(tldExtensionEClass, TLD_EXTENSION__NAMESPACE); + createEReference(tldExtensionEClass, TLD_EXTENSION__EXTENSION_ELEMENTS); + + extensibleTypeEClass = createEClass(EXTENSIBLE_TYPE); + createEAttribute(extensibleTypeEClass, EXTENSIBLE_TYPE__VALUE); + + // Create enums + bodyContentTypeEEnum = createEEnum(BODY_CONTENT_TYPE); + jspScriptingVariableScopeEEnum = createEEnum(JSP_SCRIPTING_VARIABLE_SCOPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); + + // Add supertypes to classes + tagLibEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + jspTagEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); + functionEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); + tagFileEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(tagLibEClass, TagLib.class, "TagLib", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getTagLib_TagLibVersion(), ecorePackage.getEString(), "tagLibVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagLib_JspVersion(), ecorePackage.getEString(), "jspVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagLib_ShortName(), ecorePackage.getEString(), "shortName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagLib_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLib_Tags(), this.getJSPTag(), null, "tags", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLib_Validator(), this.getValidator(), null, "validator", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLib_Listeners(), theCommonPackage.getListener(), null, "listeners", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLib_Functions(), this.getFunction(), null, "functions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLib_TaglibExtensions(), this.getTldExtension(), null, "taglibExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(jspTagEClass, JSPTag.class, "JSPTag", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getJSPTag_BodyContent(), this.getBodyContentType(), "bodyContent", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPTag_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPTag_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPTag_DynamicAttributes(), ecorePackage.getEBoolean(), "dynamicAttributes", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTag_Attributes(), this.getJSPTagAttribute(), null, "attributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTag_Variables(), this.getJSPVariable(), null, "variables", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTag_TagClass(), theJavaRefPackage.getJavaClass(), null, "tagClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTag_TeiClass(), theJavaRefPackage.getJavaClass(), null, "teiClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(jspTagAttributeEClass, JSPTagAttribute.class, "JSPTagAttribute", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getJSPTagAttribute_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPTagAttribute_Required(), ecorePackage.getEBoolean(), "required", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPTagAttribute_RtExprValue(), ecorePackage.getEBoolean(), "rtExprValue", "false", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getJSPTagAttribute_Fragment(), ecorePackage.getEBoolean(), "fragment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTagAttribute_Type(), theJavaRefPackage.getJavaClass(), null, "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPTagAttribute_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(validatorEClass, Validator.class, "Validator", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getValidator_ValidatorClass(), theJavaRefPackage.getJavaClass(), null, "validatorClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getValidator_InitParams(), theWebapplicationPackage.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getValidator_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(jspVariableEClass, JSPVariable.class, "JSPVariable", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getJSPVariable_NameGiven(), ecorePackage.getEString(), "nameGiven", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPVariable_NameFromAttribute(), ecorePackage.getEString(), "nameFromAttribute", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPVariable_Declare(), ecorePackage.getEBoolean(), "declare", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getJSPVariable_Scope(), this.getJSPScriptingVariableScope(), "scope", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPVariable_VariableClass(), theJavaRefPackage.getJavaClass(), null, "variableClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getJSPVariable_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(functionEClass, Function.class, "Function", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getFunction_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getFunction_Signature(), ecorePackage.getEString(), "signature", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEAttribute(getFunction_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ + initEReference(getFunction_FunctionClass(), theJavaRefPackage.getJavaClass(), null, "functionClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFunction_FunctionExtensions(), this.getTldExtension(), null, "functionExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(tagFileEClass, TagFile.class, "TagFile", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getTagFile_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagFile_Path(), ecorePackage.getEString(), "path", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagFile_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagFile_TagExtensions(), this.getTldExtension(), null, "tagExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(tldExtensionEClass, TldExtension.class, "TldExtension", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getTldExtension_Namespace(), ecorePackage.getEString(), "namespace", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTldExtension_ExtensionElements(), this.getExtensibleType(), null, "extensionElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(extensibleTypeEClass, ExtensibleType.class, "ExtensibleType", IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getExtensibleType_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(bodyContentTypeEEnum, BodyContentType.class, "BodyContentType");//$NON-NLS-1$ + addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.TAGDEPENDENT_LITERAL);//$NON-NLS-1$ + addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.JSP_LITERAL);//$NON-NLS-1$ + addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.EMPTY_LITERAL);//$NON-NLS-1$ + addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.SCRIPTLESS_LITERAL);//$NON-NLS-1$ + + initEEnum(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.class, "JSPScriptingVariableScope");//$NON-NLS-1$ + addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.NESTED_LITERAL); + addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.AT_BEGIN_LITERAL); + addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.AT_END_LITERAL); + + // Create resource + createResource(eNS_URI); + } +} //TaglibPackageImpl + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TldExtensionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TldExtensionImpl.java new file mode 100644 index 000000000..6078e6598 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/TldExtensionImpl.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.taglib.ExtensibleType; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; + + +/** + * + * An implementation of the model object 'Tld Extension'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TldExtensionImpl#getNamespace Namespace}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TldExtensionImpl#getExtensionElements Extension Elements}
  • + *
+ *

+ * + * @generated + */ +public class TldExtensionImpl extends EObjectImpl implements TldExtension { + /** + * The default value of the '{@link #getNamespace() Namespace}' attribute. + * + * + * @see #getNamespace() + * @generated + * @ordered + */ + protected static final String NAMESPACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNamespace() Namespace}' attribute. + * + * + * @see #getNamespace() + * @generated + * @ordered + */ + protected String namespace = NAMESPACE_EDEFAULT; + + /** + * The cached value of the '{@link #getExtensionElements() Extension Elements}' containment reference list. + * + * + * @see #getExtensionElements() + * @generated + * @ordered + */ + protected EList extensionElements = null; + + /** + * + * + * @generated + */ + protected TldExtensionImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getTldExtension(); + } + + /** + * + * + * @generated + */ + public String getNamespace() { + return namespace; + } + + /** + * + * + * @generated + */ + public void setNamespace(String newNamespace) { + String oldNamespace = namespace; + namespace = newNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TLD_EXTENSION__NAMESPACE, oldNamespace, namespace)); + } + + /** + * + * + * @generated + */ + public EList getExtensionElements() { + if (extensionElements == null) { + extensionElements = new EObjectContainmentEList(ExtensibleType.class, this, TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS); + } + return extensionElements; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: + return ((InternalEList)getExtensionElements()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TLD_EXTENSION__NAMESPACE: + return getNamespace(); + case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: + return getExtensionElements(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TLD_EXTENSION__NAMESPACE: + setNamespace((String)newValue); + return; + case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: + getExtensionElements().clear(); + getExtensionElements().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TLD_EXTENSION__NAMESPACE: + setNamespace(NAMESPACE_EDEFAULT); + return; + case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: + getExtensionElements().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.TLD_EXTENSION__NAMESPACE: + return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace); + case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: + return extensionElements != null && !extensionElements.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (namespace: ");//$NON-NLS-1$ + result.append(namespace); + result.append(')'); + return result.toString(); + } + +} //TldExtensionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ValidatorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ValidatorImpl.java new file mode 100644 index 000000000..74d4ec438 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/impl/ValidatorImpl.java @@ -0,0 +1,245 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.Validator; +import org.eclipse.jst.j2ee.webapplication.InitParam; + + +/** + * The validator element provides information on an optional validator that can be used to validate the conformance of a JSP page to using this tag library. + + */ +public class ValidatorImpl extends EObjectImpl implements Validator, EObject{ + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass validatorClass = null; + public ValidatorImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return TaglibPackage.eINSTANCE.getValidator(); + } + + /** + * + * + * @generated + */ + public JavaClass getValidatorClass() { + if (validatorClass != null && validatorClass.eIsProxy()) { + JavaClass oldValidatorClass = validatorClass; + validatorClass = (JavaClass)eResolveProxy((InternalEObject)validatorClass); + if (validatorClass != oldValidatorClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.VALIDATOR__VALIDATOR_CLASS, oldValidatorClass, validatorClass)); + } + } + return validatorClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetValidatorClass() { + return validatorClass; + } + + /** + * + * + * @generated + */ + public void setValidatorClass(JavaClass newValidatorClass) { + JavaClass oldValidatorClass = validatorClass; + validatorClass = newValidatorClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.VALIDATOR__VALIDATOR_CLASS, oldValidatorClass, validatorClass)); + } + + /** + * + * + * @generated + */ + public EList getInitParams() { + if (initParams == null) { + initParams = new EObjectContainmentEList(InitParam.class, this, TaglibPackage.VALIDATOR__INIT_PARAMS); + } + return initParams; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.VALIDATOR__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case TaglibPackage.VALIDATOR__INIT_PARAMS: + return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); + case TaglibPackage.VALIDATOR__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: + if (resolve) return getValidatorClass(); + return basicGetValidatorClass(); + case TaglibPackage.VALIDATOR__INIT_PARAMS: + return getInitParams(); + case TaglibPackage.VALIDATOR__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: + setValidatorClass((JavaClass)newValue); + return; + case TaglibPackage.VALIDATOR__INIT_PARAMS: + getInitParams().clear(); + getInitParams().addAll((Collection)newValue); + return; + case TaglibPackage.VALIDATOR__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: + setValidatorClass((JavaClass)null); + return; + case TaglibPackage.VALIDATOR__INIT_PARAMS: + getInitParams().clear(); + return; + case TaglibPackage.VALIDATOR__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: + return validatorClass != null; + case TaglibPackage.VALIDATOR__INIT_PARAMS: + return initParams != null && !initParams.isEmpty(); + case TaglibPackage.VALIDATOR__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + protected EList initParams=null; + + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + protected boolean setValidatorClass=false; + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibAdapterFactory.java new file mode 100644 index 000000000..8eca8856e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibAdapterFactory.java @@ -0,0 +1,303 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.taglib.ExtensibleType; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TagFile; +import org.eclipse.jst.j2ee.taglib.TagLib; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; +import org.eclipse.jst.j2ee.taglib.Validator; + + + +public class TaglibAdapterFactory extends AdapterFactoryImpl { + protected static TaglibPackage modelPackage; + + public TaglibAdapterFactory() { + if (modelPackage == null) { + modelPackage = (TaglibPackage)EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + protected TaglibSwitch sw = new TaglibSwitch() { + public Object caseTagLib(TagLib object) { + return createTagLibAdapter(); + } + public Object caseValidator(Validator object) { + return createValidatorAdapter(); + } + public Object caseJSPTag(JSPTag object) { + return createJSPTagAdapter(); + } + public Object caseJSPTagAttribute(JSPTagAttribute object) { + return createJSPTagAttributeAdapter(); + } + public Object caseJSPVariable(JSPVariable object) { + return createJSPVariableAdapter(); + } + }; + + public Adapter createAdapter(Notifier target) { + return (Adapter)sw.doSwitch((EObject)target); + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createTagLibAdapter() { + return null; + } + + public Adapter createValidatorAdapter() { + return null; + } + + public Adapter createJSPTagAdapter() { + return null; + } + + public Adapter createJSPTagAttributeAdapter() { + return null; + } + + public Adapter createJSPVariableAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected TaglibSwitch modelSwitch = + new TaglibSwitch() { + public Object caseTagLib(TagLib object) { + return createTagLibAdapter(); + } + public Object caseJSPTag(JSPTag object) { + return createJSPTagAdapter(); + } + public Object caseJSPTagAttribute(JSPTagAttribute object) { + return createJSPTagAttributeAdapter(); + } + public Object caseValidator(Validator object) { + return createValidatorAdapter(); + } + public Object caseJSPVariable(JSPVariable object) { + return createJSPVariableAdapter(); + } + public Object caseFunction(Function object) { + return createFunctionAdapter(); + } + public Object caseTagFile(TagFile object) { + return createTagFileAdapter(); + } + public Object caseTldExtension(TldExtension object) { + return createTldExtensionAdapter(); + } + public Object caseExtensibleType(ExtensibleType object) { + return createExtensibleTypeAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createTagLibAdapterGen() { + + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createValidatorAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createJSPTagAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createJSPTagAttributeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createJSPVariableAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.Function Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.taglib.Function + * @generated + */ + public Adapter createFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.TagFile Tag File}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.taglib.TagFile + * @generated + */ + public Adapter createTagFileAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.TldExtension Tld Extension}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.taglib.TldExtension + * @generated + */ + public Adapter createTldExtensionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.ExtensibleType Extensible Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.taglib.ExtensibleType + * @generated + */ + public Adapter createExtensibleTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //TaglibAdapterFactory + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibSwitch.java new file mode 100644 index 000000000..66ac95e4a --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/taglib/util/TaglibSwitch.java @@ -0,0 +1,318 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.taglib.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibFactoryImpl; +import org.eclipse.jst.j2ee.taglib.ExtensibleType; +import org.eclipse.jst.j2ee.taglib.Function; +import org.eclipse.jst.j2ee.taglib.JSPTag; +import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; +import org.eclipse.jst.j2ee.taglib.JSPVariable; +import org.eclipse.jst.j2ee.taglib.TagFile; +import org.eclipse.jst.j2ee.taglib.TagLib; +import org.eclipse.jst.j2ee.taglib.TaglibFactory; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.taglib.TldExtension; +import org.eclipse.jst.j2ee.taglib.Validator; + +public class TaglibSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static TaglibPackage modelPackage; + + protected static TaglibFactory factory; + + public TaglibSwitch() { + factory = (TaglibFactory)TaglibFactoryImpl.getPackage().getEFactoryInstance(); + modelPackage = TaglibFactoryImpl.getPackage(); + } + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() != modelPackage) return defaultCase(theEObject); + + switch (theEClass.getClassifierID()) { + case TaglibPackage.TAG_LIB: + { + TagLib castedObject = (TagLib)theEObject; + Object result = caseTagLib(castedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.VALIDATOR: + { + Validator castedObject = (Validator)theEObject; + Object result = caseValidator(castedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_TAG: + { + JSPTag castedObject = (JSPTag)theEObject; + Object result = caseJSPTag(castedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_TAG_ATTRIBUTE: + { + JSPTagAttribute castedObject = (JSPTagAttribute)theEObject; + Object result = caseJSPTagAttribute(castedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_VARIABLE: + { + JSPVariable castedObject = (JSPVariable)theEObject; + Object result = caseJSPVariable(castedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } // doSwitch + + public Object caseTagLib(TagLib object) { + return null; + } + + public Object caseValidator(Validator object) { + return null; + } + + public Object caseJSPTag(JSPTag object) { + return null; + } + + public Object caseJSPTagAttribute(JSPTagAttribute object) { + return null; + } + + public Object caseJSPVariable(JSPVariable object) { + return null; + } + + public Object defaultCase(EObject object) { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Object doSwitchGen(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case TaglibPackage.TAG_LIB: { + TagLib tagLib = (TagLib)theEObject; + Object result = caseTagLib(tagLib); + if (result == null) result = caseCompatibilityDescriptionGroup(tagLib); + if (result == null) result = caseDescriptionGroup(tagLib); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_TAG: { + JSPTag jspTag = (JSPTag)theEObject; + Object result = caseJSPTag(jspTag); + if (result == null) result = caseDescriptionGroup(jspTag); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_TAG_ATTRIBUTE: { + JSPTagAttribute jspTagAttribute = (JSPTagAttribute)theEObject; + Object result = caseJSPTagAttribute(jspTagAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.VALIDATOR: { + Validator validator = (Validator)theEObject; + Object result = caseValidator(validator); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.JSP_VARIABLE: { + JSPVariable jspVariable = (JSPVariable)theEObject; + Object result = caseJSPVariable(jspVariable); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.FUNCTION: { + Function function = (Function)theEObject; + Object result = caseFunction(function); + if (result == null) result = caseDescriptionGroup(function); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.TAG_FILE: { + TagFile tagFile = (TagFile)theEObject; + Object result = caseTagFile(tagFile); + if (result == null) result = caseDescriptionGroup(tagFile); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TaglibPackage.TLD_EXTENSION: { + TldExtension tldExtension = (TldExtension)theEObject; + Object result = caseTldExtension(tldExtension); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object caseTagLibGen(TagLib object) { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object caseValidatorGen(Validator object) { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object caseJSPTagGen(JSPTag object) { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object caseJSPTagAttributeGen(JSPTagAttribute object) { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object caseJSPVariableGen(JSPVariable object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseFunction(Function object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Tag File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Tag File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseTagFile(TagFile object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Tld Extension'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Tld Extension'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseTldExtension(TldExtension object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Extensible Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Extensible Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseExtensibleType(ExtensibleType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Object defaultCaseGen(EObject object) { + return null; + } + +} //TaglibSwitch + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/AuthConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/AuthConstraintImpl.java new file mode 100644 index 000000000..a4fe4f07f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/AuthConstraintImpl.java @@ -0,0 +1,318 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * The auth-constraint element indicates the user roles that should be permitted access to this resource collection. The role used here must appear in a security-role-ref element. + */ +public class AuthConstraintImpl extends EObjectImpl implements AuthConstraint, EObject { + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList roles = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public AuthConstraintImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getAuthConstraint(); + } + + /** + * @generated This field/method will be replaced during code generation + * A description of the auth constraint. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * A list of role names for the auth constraint. Each element specifies the name + * of a security role (a String). + + */ + public EList getRoles() { + if (roles == null) { + roles = new EDataTypeUniqueEList(String.class, this, WebapplicationPackage.AUTH_CONSTRAINT__ROLES); + } + return roles; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public SecurityConstraint getSecConstraint() { + if (eContainerFeatureID != WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT) return null; + return (SecurityConstraint)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSecConstraint(SecurityConstraint newSecConstraint) { + if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT && newSecConstraint != null)) { + if (EcoreUtil.isAncestor(this, newSecConstraint)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newSecConstraint != null) + msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, SecurityConstraint.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + return eBasicSetContainer(null, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, SecurityConstraint.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: + return getRoles(); + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + return getSecConstraint(); + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: + return roles != null && !roles.isEmpty(); + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + return getSecConstraint() != null; + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: + getRoles().clear(); + getRoles().addAll((Collection)newValue); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)newValue); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: + getRoles().clear(); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)null); + return; + case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", roles: ");//$NON-NLS-1$ + result.append(roles); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ContextParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ContextParamImpl.java new file mode 100644 index 000000000..f25460440 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ContextParamImpl.java @@ -0,0 +1,332 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The context-param element contains the declaration of a web application's servlet context initialization parameters. + */ +public class ContextParamImpl extends EObjectImpl implements ContextParam, EObject { + + /** + * The default value of the '{@link #getParamName() Param Name}' attribute. + * + * + * @see #getParamName() + * @generated + * @ordered + */ + protected static final String PARAM_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String paramName = PARAM_NAME_EDEFAULT; + /** + * The default value of the '{@link #getParamValue() Param Value}' attribute. + * + * + * @see #getParamValue() + * @generated + * @ordered + */ + protected static final String PARAM_VALUE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String paramValue = PARAM_VALUE_EDEFAULT; + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + public ContextParamImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getContextParam(); + } + + /** + * @generated This field/method will be replaced during code generation + * The param-name element contains the name of a parameter. + */ + public String getParamName() { + return paramName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setParamName(String newParamName) { + String oldParamName = paramName; + paramName = newParamName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME, oldParamName, paramName)); + } + + /** + * @generated This field/method will be replaced during code generation + * The param-value element contains the value of a parameter. + */ + public String getParamValue() { + return paramValue; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setParamValue(String newParamValue) { + String oldParamValue = paramValue; + paramValue = newParamValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.CONTEXT_PARAM__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.CONTEXT_PARAM__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__CONTEXTS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, newWebApp, newWebApp)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__CONTEXTS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: + return getParamName(); + case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: + return getParamValue(); + case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + return getWebApp(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: + return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); + case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: + return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); + case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + return getWebApp() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: + setParamName((String)newValue); + return; + case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: + setParamValue((String)newValue); + return; + case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + setWebApp((WebApp)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: + setParamName(PARAM_NAME_EDEFAULT); + return; + case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: + setParamValue(PARAM_VALUE_EDEFAULT); + return; + case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: + setWebApp((WebApp)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (paramName: "); //$NON-NLS-1$ + result.append(paramName); + result.append(", paramValue: "); //$NON-NLS-1$ + result.append(paramValue); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorCodeErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorCodeErrorPageImpl.java new file mode 100644 index 000000000..c3219f0cc --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorCodeErrorPageImpl.java @@ -0,0 +1,233 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * @generated + */ +public class ErrorCodeErrorPageImpl extends ErrorPageImpl implements ErrorCodeErrorPage { + + /** + * The default value of the '{@link #getErrorCode() Error Code}' attribute. + * + * + * @see #getErrorCode() + * @generated + * @ordered + */ + protected static final String ERROR_CODE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String errorCode = ERROR_CODE_EDEFAULT; + public ErrorCodeErrorPageImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getErrorCodeErrorPage(); + } + +/** + * isErrorCode method comment. + */ +public boolean isErrorCode() { + return true; +} + /** + * @generated This field/method will be replaced during code generation + * The error-code contains an HTTP error code, ex: 404 + + */ + public String getErrorCode() { + return errorCode; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setErrorCode(String newErrorCode) { + String oldErrorCode = errorCode; + errorCode = newErrorCode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE, oldErrorCode, errorCode)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: + return getLocation(); + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + return getWebApp(); + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: + return getErrorCode(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: + return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: + return ERROR_CODE_EDEFAULT == null ? errorCode != null : !ERROR_CODE_EDEFAULT.equals(errorCode); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: + setLocation((String)newValue); + return; + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: + setErrorCode((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: + setLocation(LOCATION_EDEFAULT); + return; + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: + setErrorCode(ERROR_CODE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (errorCode: ");//$NON-NLS-1$ + result.append(errorCode); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorPageImpl.java new file mode 100644 index 000000000..f6dc339b1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ErrorPageImpl.java @@ -0,0 +1,258 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The error-page element contains a mapping between an error code or exception type to the path of a resource in the web application + */ +public class ErrorPageImpl extends EObjectImpl implements ErrorPage, EObject { + + /** + * The default value of the '{@link #getLocation() Location}' attribute. + * + * + * @see #getLocation() + * @generated + * @ordered + */ + protected static final String LOCATION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String location = LOCATION_EDEFAULT; + public ErrorPageImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getErrorPage(); + } + +/** + * isErrorCode method comment. + */ +public boolean isErrorCode() { + return false; +} +/** + * isExceptionType method comment. + */ +public boolean isExceptionType() { + return false; +} + /** + * @generated This field/method will be replaced during code generation + * The location element contains the location of the resource in the web + * application + */ + public String getLocation() { + return location; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLocation(String newLocation) { + String oldLocation = location; + location = newLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_PAGE__LOCATION, oldLocation, location)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.ERROR_PAGE__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.ERROR_PAGE__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_PAGE__WEB_APP, newWebApp, newWebApp)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_PAGE__LOCATION: + return getLocation(); + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + return getWebApp(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_PAGE__LOCATION: + return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + return getWebApp() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_PAGE__LOCATION: + setLocation((String)newValue); + return; + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + setWebApp((WebApp)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ERROR_PAGE__LOCATION: + setLocation(LOCATION_EDEFAULT); + return; + case WebapplicationPackage.ERROR_PAGE__WEB_APP: + setWebApp((WebApp)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (location: ");//$NON-NLS-1$ + result.append(location); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ExceptionTypeErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ExceptionTypeErrorPageImpl.java new file mode 100644 index 000000000..ed53adb25 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ExceptionTypeErrorPageImpl.java @@ -0,0 +1,248 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * @generated + */ +public class ExceptionTypeErrorPageImpl extends ErrorPageImpl implements ExceptionTypeErrorPage { + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass exceptionType = null; + public ExceptionTypeErrorPageImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getExceptionTypeErrorPage(); + } + +/** + * Helper method to set the ExceptionType to a JavaClass having a fully qualified + * name specified by the parameter + */ +public String getExceptionTypeName() { + getExceptionType(); + return exceptionType == null ? null : exceptionType.getQualifiedName(); +}/** + * Helper method to set the ExceptionType to a JavaClass having a fully qualified + * name specified by the parameter + */ +public boolean isExceptionType() { + return true; +} +public void setExceptionTypeName(String exceptionTypeName) { + setExceptionType(JavaRefFactory.eINSTANCE.createClassRef(exceptionTypeName)); +} +/** + * @deprecated Use @link{#setExceptionTypeName(String)} + */ +public void setExceptionTypeName(String exceptionTypeName, ResourceSet context) { + setExceptionTypeName(exceptionTypeName); +} + /** + * @generated This field/method will be replaced during code generation + * The exception type contains a fully qualified class name of a Java exception type. + */ + public JavaClass getExceptionType() { + if (exceptionType != null && exceptionType.eIsProxy()) { + JavaClass oldExceptionType = exceptionType; + exceptionType = (JavaClass)eResolveProxy((InternalEObject)exceptionType); + if (exceptionType != oldExceptionType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE, oldExceptionType, exceptionType)); + } + } + return exceptionType; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetExceptionType() { + return exceptionType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setExceptionType(JavaClass newExceptionType) { + JavaClass oldExceptionType = exceptionType; + exceptionType = newExceptionType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE, oldExceptionType, exceptionType)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: + return getLocation(); + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + return getWebApp(); + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: + if (resolve) return getExceptionType(); + return basicGetExceptionType(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: + return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: + return exceptionType != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: + setLocation((String)newValue); + return; + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: + setExceptionType((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: + setLocation(LOCATION_EDEFAULT); + return; + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: + setExceptionType((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + +} + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterImpl.java new file mode 100644 index 000000000..9c6eb932c --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterImpl.java @@ -0,0 +1,387 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * Declares a filter in the web application application. The filter is mapped to either a servlet or a URL pattern in the filter-mapping element, using the filter-name value to reference. Filters can access the initialization parameters declared in the deployment descriptor at runtime via the FilterConfig interface. + + */ +public class FilterImpl extends CompatibilityDescriptionGroupImpl implements Filter { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String name = NAME_EDEFAULT; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList initParams = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected JavaClass filterClass = null; + /** + * The cached value of the '{@link #getInitParamValues() Init Param Values}' containment reference list. + * + * + * @see #getInitParamValues() + * @generated + * @ordered + */ + protected EList initParamValues = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected FilterImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getFilter(); + } + + /** + * @generated This field/method will be replaced during code generation + * The logical name of the filter. This name is used to map the filter. + */ + public String getName() { + return name; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER__NAME, oldName, name)); + } + + + /** + * + * getInitParams() is used for J2EE1.3 + * + * @generated This field/method will be replaced during code generation + * The init-params contain a name//value pairs as initialization params for the + * filter + + */ + public EList getInitParams() { + if (initParams == null) { + initParams = new EObjectContainmentEList(InitParam.class, this, WebapplicationPackage.FILTER__INIT_PARAMS); + } + return initParams; + } + + /** + * @generated This field/method will be replaced during code generation + * The fully qualified classname of the filter. + */ + public JavaClass getFilterClass() { + if (filterClass != null && filterClass.eIsProxy()) { + JavaClass oldFilterClass = filterClass; + filterClass = (JavaClass)eResolveProxy((InternalEObject)filterClass); + if (filterClass != oldFilterClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER__FILTER_CLASS, oldFilterClass, filterClass)); + } + } + return filterClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetFilterClass() { + return filterClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFilterClass(JavaClass newFilterClass) { + JavaClass oldFilterClass = filterClass; + filterClass = newFilterClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER__FILTER_CLASS, oldFilterClass, filterClass)); + } + + /** + * + * getInitParamValues() is used for J2EE1.4 + * + * @generated + */ + public EList getInitParamValues() { + if (initParamValues == null) { + initParamValues = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.FILTER__INIT_PARAM_VALUES); + } + return initParamValues; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.FILTER__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.FILTER__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.FILTER__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.FILTER__INIT_PARAMS: + return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: + return ((InternalEList)getInitParamValues()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER__ICONS: + return getIcons(); + case WebapplicationPackage.FILTER__DISPLAY_NAMES: + return getDisplayNames(); + case WebapplicationPackage.FILTER__DESCRIPTIONS: + return getDescriptions(); + case WebapplicationPackage.FILTER__SMALL_ICON: + return getSmallIcon(); + case WebapplicationPackage.FILTER__LARGE_ICON: + return getLargeIcon(); + case WebapplicationPackage.FILTER__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.FILTER__DISPLAY_NAME: + return getDisplayName(); + case WebapplicationPackage.FILTER__NAME: + return getName(); + case WebapplicationPackage.FILTER__INIT_PARAMS: + return getInitParams(); + case WebapplicationPackage.FILTER__FILTER_CLASS: + if (resolve) return getFilterClass(); + return basicGetFilterClass(); + case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: + return getInitParamValues(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER__ICONS: + return icons != null && !icons.isEmpty(); + case WebapplicationPackage.FILTER__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case WebapplicationPackage.FILTER__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WebapplicationPackage.FILTER__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WebapplicationPackage.FILTER__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WebapplicationPackage.FILTER__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.FILTER__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WebapplicationPackage.FILTER__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case WebapplicationPackage.FILTER__INIT_PARAMS: + return initParams != null && !initParams.isEmpty(); + case WebapplicationPackage.FILTER__FILTER_CLASS: + return filterClass != null; + case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: + return initParamValues != null && !initParamValues.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case WebapplicationPackage.FILTER__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case WebapplicationPackage.FILTER__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WebapplicationPackage.FILTER__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WebapplicationPackage.FILTER__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WebapplicationPackage.FILTER__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.FILTER__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WebapplicationPackage.FILTER__NAME: + setName((String)newValue); + return; + case WebapplicationPackage.FILTER__INIT_PARAMS: + getInitParams().clear(); + getInitParams().addAll((Collection)newValue); + return; + case WebapplicationPackage.FILTER__FILTER_CLASS: + setFilterClass((JavaClass)newValue); + return; + case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: + getInitParamValues().clear(); + getInitParamValues().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER__ICONS: + getIcons().clear(); + return; + case WebapplicationPackage.FILTER__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case WebapplicationPackage.FILTER__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WebapplicationPackage.FILTER__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WebapplicationPackage.FILTER__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WebapplicationPackage.FILTER__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.FILTER__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WebapplicationPackage.FILTER__NAME: + setName(NAME_EDEFAULT); + return; + case WebapplicationPackage.FILTER__INIT_PARAMS: + getInitParams().clear(); + return; + case WebapplicationPackage.FILTER__FILTER_CLASS: + setFilterClass((JavaClass)null); + return; + case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: + getInitParamValues().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: ");//$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +public JavaClass createClassRef(String targetName) { + return JavaRefFactory.eINSTANCE.createClassRef(targetName); +} + + +public String getFilterClassName() { + getFilterClass(); + return (filterClass == null) ? null : filterClass.getQualifiedName(); +} +public void setFilterClassName(String filterClassName) { + eSet(WebapplicationPackage.eINSTANCE.getFilter_FilterClass(), createClassRef(filterClassName)); +} +} //FilterImpl + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterMappingImpl.java new file mode 100644 index 000000000..052a20df7 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FilterMappingImpl.java @@ -0,0 +1,341 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.jst.j2ee.webapplication.DispatcherType; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * Declaration of the filter mappings in this web application. The container uses the filter-mapping declarations to decide which filters to apply to a request, and in what order. The container matches the request URI to a Servlet in the normal way. To determine which filters to apply it matches filter-mapping declarations either on servlet-name, or on url-pattern for each filter-mapping element, depending on which style is used. The order in which filters are invoked is the order in which filter-mapping declarations that match a request URI for a servlet appear in the list of filter-mapping elements.The filter-name value must be the value of the sub-elements of one of the declarations in the deployment descriptor. + * + * @invariant The filter-name value must be the value of the Filter::name of one of the Filter declarations in the deployment descriptor. + + */ +public class FilterMappingImpl extends EObjectImpl implements FilterMapping, EObject{ + + /** + * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. + * + * + * @see #getUrlPattern() + * @generated + * @ordered + */ + protected static final String URL_PATTERN_EDEFAULT = null; + + protected transient String servletName; + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String urlPattern = URL_PATTERN_EDEFAULT; + /** + * The cached value of the '{@link #getDispatcherType() Dispatcher Type}' attribute list. + * + * + * @see #getDispatcherType() + * @generated + * @ordered + */ + protected EList dispatcherType = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected Filter filter = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected Servlet servlet = null; + public FilterMappingImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getFilterMapping(); + } + +/** + * Returns the name of the servlet that this mapping applies to. + */ + public Servlet getServlet(){ + Servlet lservlet = this.getServletGen(); + if (lservlet == null && servletName != null){ + WebApp webapp = (WebApp)eContainer(); + if (webapp != null){ + lservlet=webapp.getServletNamed(servletName); + if (lservlet != null) + setServlet(lservlet); + } + } + return lservlet; +} +/** + * Returns the name of the servlet that this mapping applies to. + */ +public String getServletName(){ + String ret = null; + if (servletName != null) + ret = servletName; + + Servlet lservlet = getServlet(); + if (lservlet != null) + ret = lservlet.getServletName(); + return ret; +} +/** + * Sets the name of the servlet that this mapping applies to. + */ +public void setServletName(String servletName){ + this.servletName = servletName; +} + /** + * @generated This field/method will be replaced during code generation + * The url-pattern element contains the url pattern of the mapping. Must follow + * the rules specified in Section 10 of the Servlet API Specification. + */ + public String getUrlPattern() { + return urlPattern; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUrlPattern(String newUrlPattern) { + String oldUrlPattern = urlPattern; + urlPattern = newUrlPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__URL_PATTERN, oldUrlPattern, urlPattern)); + } + + /** + * + * + * @generated + */ + public EList getDispatcherType() { + if (dispatcherType == null) { + dispatcherType = new EDataTypeUniqueEList(DispatcherType.class, this, WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE); + } + return dispatcherType; + } + + /** + * @generated This field/method will be replaced during code generation + * The filter being mapped + */ + public Filter getFilter() { + if (filter != null && filter.eIsProxy()) { + Filter oldFilter = filter; + filter = (Filter)eResolveProxy((InternalEObject)filter); + if (filter != oldFilter) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER_MAPPING__FILTER, oldFilter, filter)); + } + } + return filter; + } + + /** + * + * + * @generated + */ + public Filter basicGetFilter() { + return filter; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFilter(Filter newFilter) { + Filter oldFilter = filter; + filter = newFilter; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__FILTER, oldFilter, filter)); + } + + public void setServlet(Servlet l) { + servletName = null; + setServletGen(l); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setServletGen(Servlet newServlet) { + Servlet oldServlet = servlet; + servlet = newServlet; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__SERVLET, oldServlet, servlet)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: + return getUrlPattern(); + case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: + return getDispatcherType(); + case WebapplicationPackage.FILTER_MAPPING__FILTER: + if (resolve) return getFilter(); + return basicGetFilter(); + case WebapplicationPackage.FILTER_MAPPING__SERVLET: + if (resolve) return getServlet(); + return basicGetServlet(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: + return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); + case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: + return dispatcherType != null && !dispatcherType.isEmpty(); + case WebapplicationPackage.FILTER_MAPPING__FILTER: + return filter != null; + case WebapplicationPackage.FILTER_MAPPING__SERVLET: + return servlet != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: + setUrlPattern((String)newValue); + return; + case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: + getDispatcherType().clear(); + getDispatcherType().addAll((Collection)newValue); + return; + case WebapplicationPackage.FILTER_MAPPING__FILTER: + setFilter((Filter)newValue); + return; + case WebapplicationPackage.FILTER_MAPPING__SERVLET: + if(newValue instanceof String) + setServletName((String)newValue); + else + setServlet((Servlet)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: + setUrlPattern(URL_PATTERN_EDEFAULT); + return; + case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: + getDispatcherType().clear(); + return; + case WebapplicationPackage.FILTER_MAPPING__FILTER: + setFilter((Filter)null); + return; + case WebapplicationPackage.FILTER_MAPPING__SERVLET: + setServlet((Servlet)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (urlPattern: ");//$NON-NLS-1$ + result.append(urlPattern); + result.append(", dispatcherType: ");//$NON-NLS-1$ + result.append(dispatcherType); + result.append(')'); + return result.toString(); + } + + /** + * @generated This field/method will be replaced during code generation + * An optional servlet that is mapped by a filter mapping. servletName is used to resolve the servlet reference. + */ + public Servlet getServletGen() { + if (servlet != null && servlet.eIsProxy()) { + Servlet oldServlet = servlet; + servlet = (Servlet)eResolveProxy((InternalEObject)servlet); + if (servlet != oldServlet) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER_MAPPING__SERVLET, oldServlet, servlet)); + } + } + return servlet; + } + + /** + * + * + * @generated + */ + public Servlet basicGetServlet() { + return servlet; + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FormLoginConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FormLoginConfigImpl.java new file mode 100644 index 000000000..3f5198f0e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/FormLoginConfigImpl.java @@ -0,0 +1,291 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The form-login-config element specifies the login and error pages that should be used in form based login. If form based authentication is not used, these elements are ignored. + */ +public class FormLoginConfigImpl extends EObjectImpl implements FormLoginConfig, EObject { + + /** + * The default value of the '{@link #getFormLoginPage() Form Login Page}' attribute. + * + * + * @see #getFormLoginPage() + * @generated + * @ordered + */ + protected static final String FORM_LOGIN_PAGE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String formLoginPage = FORM_LOGIN_PAGE_EDEFAULT; + /** + * The default value of the '{@link #getFormErrorPage() Form Error Page}' attribute. + * + * + * @see #getFormErrorPage() + * @generated + * @ordered + */ + protected static final String FORM_ERROR_PAGE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String formErrorPage = FORM_ERROR_PAGE_EDEFAULT; + public FormLoginConfigImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getFormLoginConfig(); + } + + /** + * @generated This field/method will be replaced during code generation + * The form-login-page element defines the location in the web app where the page + * that can be used for login can be found + */ + public String getFormLoginPage() { + return formLoginPage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFormLoginPage(String newFormLoginPage) { + String oldFormLoginPage = formLoginPage; + formLoginPage = newFormLoginPage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE, oldFormLoginPage, formLoginPage)); + } + + /** + * @generated This field/method will be replaced during code generation + * The form-error-page element defines the location in the web app where the error + * page that is displayed when login is not successful can be found + */ + public String getFormErrorPage() { + return formErrorPage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFormErrorPage(String newFormErrorPage) { + String oldFormErrorPage = formErrorPage; + formErrorPage = newFormErrorPage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE, oldFormErrorPage, formErrorPage)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public LoginConfig getLoginConfig() { + if (eContainerFeatureID != WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG) return null; + return (LoginConfig)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLoginConfig(LoginConfig newLoginConfig) { + if (newLoginConfig != eContainer || (eContainerFeatureID != WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG && newLoginConfig != null)) { + if (EcoreUtil.isAncestor(this, newLoginConfig)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newLoginConfig != null) + msgs = ((InternalEObject)newLoginConfig).eInverseAdd(this, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, LoginConfig.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newLoginConfig, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, newLoginConfig, newLoginConfig)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + return eBasicSetContainer(null, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + return eContainer.eInverseRemove(this, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, LoginConfig.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: + return getFormLoginPage(); + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: + return getFormErrorPage(); + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + return getLoginConfig(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: + return FORM_LOGIN_PAGE_EDEFAULT == null ? formLoginPage != null : !FORM_LOGIN_PAGE_EDEFAULT.equals(formLoginPage); + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: + return FORM_ERROR_PAGE_EDEFAULT == null ? formErrorPage != null : !FORM_ERROR_PAGE_EDEFAULT.equals(formErrorPage); + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + return getLoginConfig() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: + setFormLoginPage((String)newValue); + return; + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: + setFormErrorPage((String)newValue); + return; + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + setLoginConfig((LoginConfig)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: + setFormLoginPage(FORM_LOGIN_PAGE_EDEFAULT); + return; + case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: + setFormErrorPage(FORM_ERROR_PAGE_EDEFAULT); + return; + case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: + setLoginConfig((LoginConfig)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (formLoginPage: ");//$NON-NLS-1$ + result.append(formLoginPage); + result.append(", formErrorPage: ");//$NON-NLS-1$ + result.append(formErrorPage); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/HTTPMethodTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/HTTPMethodTypeImpl.java new file mode 100644 index 000000000..abee6418f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/HTTPMethodTypeImpl.java @@ -0,0 +1,164 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * + * An implementation of the model object 'HTTP Method Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.HTTPMethodTypeImpl#getHttpMethod Http Method}
  • + *
+ *

+ * + * @generated + */ +public class HTTPMethodTypeImpl extends EObjectImpl implements HTTPMethodType { + /** + * The default value of the '{@link #getHttpMethod() Http Method}' attribute. + * + * + * @see #getHttpMethod() + * @generated + * @ordered + */ + protected static final String HTTP_METHOD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHttpMethod() Http Method}' attribute. + * + * + * @see #getHttpMethod() + * @generated + * @ordered + */ + protected String httpMethod = HTTP_METHOD_EDEFAULT; + + /** + * + * + * @generated + */ + protected HTTPMethodTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getHTTPMethodType(); + } + + /** + * + * + * @generated + */ + public String getHttpMethod() { + return httpMethod; + } + + /** + * + * + * @generated + */ + public void setHttpMethod(String newHttpMethod) { + String oldHttpMethod = httpMethod; + httpMethod = newHttpMethod; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD, oldHttpMethod, httpMethod)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: + return getHttpMethod(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: + setHttpMethod((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: + setHttpMethod(HTTP_METHOD_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: + return HTTP_METHOD_EDEFAULT == null ? httpMethod != null : !HTTP_METHOD_EDEFAULT.equals(httpMethod); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (httpMethod: ");//$NON-NLS-1$ + result.append(httpMethod); + result.append(')'); + return result.toString(); + } + +} //HTTPMethodTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/InitParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/InitParamImpl.java new file mode 100644 index 000000000..fbdc250b5 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/InitParamImpl.java @@ -0,0 +1,237 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The init-param element contains a name//value pair as an initialization param of the servlet + */ +public class InitParamImpl extends EObjectImpl implements InitParam, EObject { + + /** + * The default value of the '{@link #getParamName() Param Name}' attribute. + * + * + * @see #getParamName() + * @generated + * @ordered + */ + protected static final String PARAM_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String paramName = PARAM_NAME_EDEFAULT; + /** + * The default value of the '{@link #getParamValue() Param Value}' attribute. + * + * + * @see #getParamValue() + * @generated + * @ordered + */ + protected static final String PARAM_VALUE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String paramValue = PARAM_VALUE_EDEFAULT; + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + public InitParamImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getInitParam(); + } + + /** + * @generated This field/method will be replaced during code generation + * + * + + */ + public String getParamName() { + return paramName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setParamName(String newParamName) { + String oldParamName = paramName; + paramName = newParamName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__PARAM_NAME, oldParamName, paramName)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getParamValue() { + return paramValue; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setParamValue(String newParamValue) { + String oldParamValue = paramValue; + paramValue = newParamValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.INIT_PARAM__PARAM_NAME: + return getParamName(); + case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: + return getParamValue(); + case WebapplicationPackage.INIT_PARAM__DESCRIPTION: + return getDescription(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.INIT_PARAM__PARAM_NAME: + return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); + case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: + return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); + case WebapplicationPackage.INIT_PARAM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.INIT_PARAM__PARAM_NAME: + setParamName((String)newValue); + return; + case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: + setParamValue((String)newValue); + return; + case WebapplicationPackage.INIT_PARAM__DESCRIPTION: + setDescription((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.INIT_PARAM__PARAM_NAME: + setParamName(PARAM_NAME_EDEFAULT); + return; + case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: + setParamValue(PARAM_VALUE_EDEFAULT); + return; + case WebapplicationPackage.INIT_PARAM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (paramName: ");//$NON-NLS-1$ + result.append(paramName); + result.append(", paramValue: ");//$NON-NLS-1$ + result.append(paramValue); + result.append(", description: ");//$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/JSPTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/JSPTypeImpl.java new file mode 100644 index 000000000..535fb478d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/JSPTypeImpl.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * @generated + */ +public class JSPTypeImpl extends WebTypeImpl implements JSPType { + + /** + * The default value of the '{@link #getJspFile() Jsp File}' attribute. + * + * + * @see #getJspFile() + * @generated + * @ordered + */ + protected static final String JSP_FILE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String jspFile = JSP_FILE_EDEFAULT; + public JSPTypeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getJSPType(); + } + +public boolean isJspType() { + return true; +} + /** + * @generated This field/method will be replaced during code generation + * The jsp-file element contains the full path to a JSP file within the web + * application. + + */ + public String getJspFile() { + return jspFile; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setJspFile(String newJspFile) { + String oldJspFile = jspFile; + jspFile = newJspFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.JSP_TYPE__JSP_FILE, oldJspFile, jspFile)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.JSP_TYPE__JSP_FILE: + return getJspFile(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.JSP_TYPE__JSP_FILE: + return JSP_FILE_EDEFAULT == null ? jspFile != null : !JSP_FILE_EDEFAULT.equals(jspFile); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.JSP_TYPE__JSP_FILE: + setJspFile((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.JSP_TYPE__JSP_FILE: + setJspFile(JSP_FILE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jspFile: ");//$NON-NLS-1$ + result.append(jspFile); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingImpl.java new file mode 100644 index 000000000..7a8a35da0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingImpl.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * + * An implementation of the model object 'Local Encoding Mapping'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingImpl#getLocale Locale}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingImpl#getEncoding Encoding}
  • + *
+ *

+ * + * @generated + */ +public class LocalEncodingMappingImpl extends EObjectImpl implements LocalEncodingMapping { + /** + * The default value of the '{@link #getLocale() Locale}' attribute. + * + * + * @see #getLocale() + * @generated + * @ordered + */ + protected static final String LOCALE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocale() Locale}' attribute. + * + * + * @see #getLocale() + * @generated + * @ordered + */ + protected String locale = LOCALE_EDEFAULT; + + /** + * The default value of the '{@link #getEncoding() Encoding}' attribute. + * + * + * @see #getEncoding() + * @generated + * @ordered + */ + protected static final String ENCODING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEncoding() Encoding}' attribute. + * + * + * @see #getEncoding() + * @generated + * @ordered + */ + protected String encoding = ENCODING_EDEFAULT; + + /** + * + * + * @generated + */ + protected LocalEncodingMappingImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getLocalEncodingMapping(); + } + + /** + * + * + * @generated + */ + public String getLocale() { + return locale; + } + + /** + * + * + * @generated + */ + public void setLocale(String newLocale) { + String oldLocale = locale; + locale = newLocale; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE, oldLocale, locale)); + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encoding; + } + + /** + * + * + * @generated + */ + public void setEncoding(String newEncoding) { + String oldEncoding = encoding; + encoding = newEncoding; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING, oldEncoding, encoding)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: + return getLocale(); + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: + return getEncoding(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: + setLocale((String)newValue); + return; + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: + setEncoding((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: + setLocale(LOCALE_EDEFAULT); + return; + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: + setEncoding(ENCODING_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: + return LOCALE_EDEFAULT == null ? locale != null : !LOCALE_EDEFAULT.equals(locale); + case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: + return ENCODING_EDEFAULT == null ? encoding != null : !ENCODING_EDEFAULT.equals(encoding); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (locale: ");//$NON-NLS-1$ + result.append(locale); + result.append(", encoding: ");//$NON-NLS-1$ + result.append(encoding); + result.append(')'); + return result.toString(); + } + +} //LocalEncodingMappingImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingListImpl.java new file mode 100644 index 000000000..16483b4bb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LocalEncodingMappingListImpl.java @@ -0,0 +1,154 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * + * An implementation of the model object 'Local Encoding Mapping List'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingListImpl#getLocalEncodingMappings Local Encoding Mappings}
  • + *
+ *

+ * + * @generated + */ +public class LocalEncodingMappingListImpl extends EObjectImpl implements LocalEncodingMappingList { + /** + * The cached value of the '{@link #getLocalEncodingMappings() Local Encoding Mappings}' containment reference list. + * + * + * @see #getLocalEncodingMappings() + * @generated + * @ordered + */ + protected EList localEncodingMappings = null; + + /** + * + * + * @generated + */ + protected LocalEncodingMappingListImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getLocalEncodingMappingList(); + } + + /** + * + * + * @generated + */ + public EList getLocalEncodingMappings() { + if (localEncodingMappings == null) { + localEncodingMappings = new EObjectContainmentEList(LocalEncodingMapping.class, this, WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS); + } + return localEncodingMappings; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: + return ((InternalEList)getLocalEncodingMappings()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: + return getLocalEncodingMappings(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: + getLocalEncodingMappings().clear(); + getLocalEncodingMappings().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: + getLocalEncodingMappings().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: + return localEncodingMappings != null && !localEncodingMappings.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //LocalEncodingMappingListImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LoginConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LoginConfigImpl.java new file mode 100644 index 000000000..78b760893 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/LoginConfigImpl.java @@ -0,0 +1,445 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The login-config element is used to configure the authentication method that should be used, the realm name that should be used for this application, and the attributes that are needed by the form login + * mechanism. + */ +public class LoginConfigImpl extends EObjectImpl implements LoginConfig, EObject { + + /** + * The default value of the '{@link #getAuthMethod() Auth Method}' attribute. + * + * + * @see #getAuthMethod() + * @generated + * @ordered + */ + protected static final AuthMethodKind AUTH_METHOD_EDEFAULT = AuthMethodKind.UNSPECIFIED_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected AuthMethodKind authMethod = AUTH_METHOD_EDEFAULT; + /** + * This is true if the Auth Method attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean authMethodESet = false; + + /** + * The default value of the '{@link #getRealmName() Realm Name}' attribute. + * + * + * @see #getRealmName() + * @generated + * @ordered + */ + protected static final String REALM_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String realmName = REALM_NAME_EDEFAULT; + /** + * The default value of the '{@link #getAuthorizationMethod() Authorization Method}' attribute. + * + * + * @see #getAuthorizationMethod() + * @generated + * @ordered + */ + protected static final String AUTHORIZATION_METHOD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAuthorizationMethod() Authorization Method}' attribute. + * + * + * @see #getAuthorizationMethod() + * @generated + * @ordered + */ + protected String authorizationMethod = AUTHORIZATION_METHOD_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected FormLoginConfig formLoginConfig = null; + public LoginConfigImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getLoginConfig(); + } + + /** + * @generated This field/method will be replaced during code generation + * The auth-method element is used to configure the authentication mechanism for + * the web application. As a prerequisite to gaining access to any web resources + * which are protected by an authorization constraint, a user must have + * authenticated using the configured mechanism. Legal values for this element are + * "BASIC", "DIGEST", "FORM", or "CLIENT-CERT". + */ + public AuthMethodKind getAuthMethod() { + return authMethod; + } + + /** + * + * + * @generated + */ + public void setAuthMethod(AuthMethodKind newAuthMethod) { + AuthMethodKind oldAuthMethod = authMethod; + authMethod = newAuthMethod == null ? AUTH_METHOD_EDEFAULT : newAuthMethod; + boolean oldAuthMethodESet = authMethodESet; + authMethodESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD, oldAuthMethod, authMethod, !oldAuthMethodESet)); + } + + /** + * + * + * @generated + */ + public void unsetAuthMethod() { + AuthMethodKind oldAuthMethod = authMethod; + boolean oldAuthMethodESet = authMethodESet; + authMethod = AUTH_METHOD_EDEFAULT; + authMethodESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD, oldAuthMethod, AUTH_METHOD_EDEFAULT, oldAuthMethodESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetAuthMethod() { + return authMethodESet; + } + + /** + * @generated This field/method will be replaced during code generation + * The realm name element specifies the realm name to use in HTTP Basic + * authorization + */ + public String getRealmName() { + return realmName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRealmName(String newRealmName) { + String oldRealmName = realmName; + realmName = newRealmName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__REALM_NAME, oldRealmName, realmName)); + } + + /** + * + * + * @generated + */ + public String getAuthorizationMethod() { + return authorizationMethod; + } + + /** + * + * + * @generated + */ + public void setAuthorizationMethod(String newAuthorizationMethod) { + String oldAuthorizationMethod = authorizationMethod; + authorizationMethod = newAuthorizationMethod; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD, oldAuthorizationMethod, authorizationMethod)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.LOGIN_CONFIG__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.LOGIN_CONFIG__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, newWebApp, newWebApp)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public FormLoginConfig getFormLoginConfig() { + return formLoginConfig; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFormLoginConfig(FormLoginConfig newFormLoginConfig, NotificationChain msgs) { + FormLoginConfig oldFormLoginConfig = formLoginConfig; + formLoginConfig = newFormLoginConfig; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, oldFormLoginConfig, newFormLoginConfig); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFormLoginConfig(FormLoginConfig newFormLoginConfig) { + if (newFormLoginConfig != formLoginConfig) { + NotificationChain msgs = null; + if (formLoginConfig != null) + msgs = ((InternalEObject)formLoginConfig).eInverseRemove(this, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, FormLoginConfig.class, msgs); + if (newFormLoginConfig != null) + msgs = ((InternalEObject)newFormLoginConfig).eInverseAdd(this, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, FormLoginConfig.class, msgs); + msgs = basicSetFormLoginConfig(newFormLoginConfig, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, newFormLoginConfig, newFormLoginConfig)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + if (formLoginConfig != null) + msgs = ((InternalEObject)formLoginConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, null, msgs); + return basicSetFormLoginConfig((FormLoginConfig)otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + return basicSetFormLoginConfig(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: + return getAuthMethod(); + case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: + return getRealmName(); + case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: + return getAuthorizationMethod(); + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + return getWebApp(); + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + return getFormLoginConfig(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: + return isSetAuthMethod(); + case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: + return REALM_NAME_EDEFAULT == null ? realmName != null : !REALM_NAME_EDEFAULT.equals(realmName); + case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: + return AUTHORIZATION_METHOD_EDEFAULT == null ? authorizationMethod != null : !AUTHORIZATION_METHOD_EDEFAULT.equals(authorizationMethod); + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + return formLoginConfig != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: + setAuthMethod((AuthMethodKind)newValue); + return; + case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: + setRealmName((String)newValue); + return; + case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: + setAuthorizationMethod((String)newValue); + return; + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + setFormLoginConfig((FormLoginConfig)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: + unsetAuthMethod(); + return; + case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: + setRealmName(REALM_NAME_EDEFAULT); + return; + case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: + setAuthorizationMethod(AUTHORIZATION_METHOD_EDEFAULT); + return; + case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: + setFormLoginConfig((FormLoginConfig)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (authMethod: ");//$NON-NLS-1$ + if (authMethodESet) result.append(authMethod); else result.append("");//$NON-NLS-1$ + result.append(", realmName: ");//$NON-NLS-1$ + result.append(realmName); + result.append(", authorizationMethod: ");//$NON-NLS-1$ + result.append(authorizationMethod); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/MimeMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/MimeMappingImpl.java new file mode 100644 index 000000000..4d1cb5e52 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/MimeMappingImpl.java @@ -0,0 +1,290 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The mime-mapping element defines a mapping between an extension and a mime type. + + */ +public class MimeMappingImpl extends EObjectImpl implements MimeMapping, EObject { + + /** + * The default value of the '{@link #getExtension() Extension}' attribute. + * + * + * @see #getExtension() + * @generated + * @ordered + */ + protected static final String EXTENSION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String extension = EXTENSION_EDEFAULT; + /** + * The default value of the '{@link #getMimeType() Mime Type}' attribute. + * + * + * @see #getMimeType() + * @generated + * @ordered + */ + protected static final String MIME_TYPE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String mimeType = MIME_TYPE_EDEFAULT; + public MimeMappingImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getMimeMapping(); + } + + /** + * @generated This field/method will be replaced during code generation + * The extension element contains a string describing an extension. example: "txt" + */ + public String getExtension() { + return extension; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setExtension(String newExtension) { + String oldExtension = extension; + extension = newExtension; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__EXTENSION, oldExtension, extension)); + } + + /** + * @generated This field/method will be replaced during code generation + * The mime-type element contains a defined mime type. example: "text//plain" + */ + public String getMimeType() { + return mimeType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setMimeType(String newMimeType) { + String oldMimeType = mimeType; + mimeType = newMimeType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__MIME_TYPE, oldMimeType, mimeType)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.MIME_MAPPING__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.MIME_MAPPING__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__WEB_APP, newWebApp, newWebApp)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.MIME_MAPPING__EXTENSION: + return getExtension(); + case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: + return getMimeType(); + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + return getWebApp(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.MIME_MAPPING__EXTENSION: + return EXTENSION_EDEFAULT == null ? extension != null : !EXTENSION_EDEFAULT.equals(extension); + case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: + return MIME_TYPE_EDEFAULT == null ? mimeType != null : !MIME_TYPE_EDEFAULT.equals(mimeType); + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + return getWebApp() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.MIME_MAPPING__EXTENSION: + setExtension((String)newValue); + return; + case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: + setMimeType((String)newValue); + return; + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + setWebApp((WebApp)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.MIME_MAPPING__EXTENSION: + setExtension(EXTENSION_EDEFAULT); + return; + case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: + setMimeType(MIME_TYPE_EDEFAULT); + return; + case WebapplicationPackage.MIME_MAPPING__WEB_APP: + setWebApp((WebApp)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (extension: ");//$NON-NLS-1$ + result.append(extension); + result.append(", mimeType: ");//$NON-NLS-1$ + result.append(mimeType); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/RoleNameTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/RoleNameTypeImpl.java new file mode 100644 index 000000000..de6b1237d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/RoleNameTypeImpl.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webapplication.RoleNameType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * @generated + */ +public class RoleNameTypeImpl extends EObjectImpl implements RoleNameType { + + /** + * The default value of the '{@link #getRoleName() Role Name}' attribute. + * + * + * @see #getRoleName() + * @generated + * @ordered + */ + protected static final String ROLE_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String roleName = ROLE_NAME_EDEFAULT; + public RoleNameTypeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getRoleNameType(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getRoleName() { + return roleName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRoleName(String newRoleName) { + String oldRoleName = roleName; + roleName = newRoleName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME, oldRoleName, roleName)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: + return getRoleName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: + return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: + setRoleName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: + setRoleName(ROLE_NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (roleName: ");//$NON-NLS-1$ + result.append(roleName); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SecurityConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SecurityConstraintImpl.java new file mode 100644 index 000000000..c85189130 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SecurityConstraintImpl.java @@ -0,0 +1,449 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * The security-constraint element is used to associate security constraints with one or more web resource collections + */ +public class SecurityConstraintImpl extends EObjectImpl implements SecurityConstraint, EObject { + + /** + * The default value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected static final String DISPLAY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected String displayName = DISPLAY_NAME_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList webResourceCollections = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected AuthConstraint authConstraint = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected UserDataConstraint userDataConstraint = null; + /** + * The cached value of the '{@link #getDisplayNames() Display Names}' containment reference list. + * + * + * @see #getDisplayNames() + * @generated + * @ordered + */ + protected EList displayNames = null; + + public SecurityConstraintImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getSecurityConstraint(); + } + + /** + * + * + * @generated + */ + public String getDisplayName() { + return displayName; + } + + /** + * + * + * @generated + */ + public void setDisplayName(String newDisplayName) { + String oldDisplayName = displayName; + displayName = newDisplayName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME, oldDisplayName, displayName)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, newWebApp, newWebApp)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getWebResourceCollections() { + if (webResourceCollections == null) { + webResourceCollections = new EObjectContainmentWithInverseEList(WebResourceCollection.class, this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT); + } + return webResourceCollections; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public AuthConstraint getAuthConstraint() { + return authConstraint; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAuthConstraint(AuthConstraint newAuthConstraint, NotificationChain msgs) { + AuthConstraint oldAuthConstraint = authConstraint; + authConstraint = newAuthConstraint; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, oldAuthConstraint, newAuthConstraint); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setAuthConstraint(AuthConstraint newAuthConstraint) { + if (newAuthConstraint != authConstraint) { + NotificationChain msgs = null; + if (authConstraint != null) + msgs = ((InternalEObject)authConstraint).eInverseRemove(this, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, AuthConstraint.class, msgs); + if (newAuthConstraint != null) + msgs = ((InternalEObject)newAuthConstraint).eInverseAdd(this, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, AuthConstraint.class, msgs); + msgs = basicSetAuthConstraint(newAuthConstraint, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, newAuthConstraint, newAuthConstraint)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public UserDataConstraint getUserDataConstraint() { + return userDataConstraint; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetUserDataConstraint(UserDataConstraint newUserDataConstraint, NotificationChain msgs) { + UserDataConstraint oldUserDataConstraint = userDataConstraint; + userDataConstraint = newUserDataConstraint; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, oldUserDataConstraint, newUserDataConstraint); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUserDataConstraint(UserDataConstraint newUserDataConstraint) { + if (newUserDataConstraint != userDataConstraint) { + NotificationChain msgs = null; + if (userDataConstraint != null) + msgs = ((InternalEObject)userDataConstraint).eInverseRemove(this, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, UserDataConstraint.class, msgs); + if (newUserDataConstraint != null) + msgs = ((InternalEObject)newUserDataConstraint).eInverseAdd(this, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, UserDataConstraint.class, msgs); + msgs = basicSetUserDataConstraint(newUserDataConstraint, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, newUserDataConstraint, newUserDataConstraint)); + } + + /** + * + * + * @generated + */ + public EList getDisplayNames() { + if (displayNames == null) { + displayNames = new EObjectContainmentEList(DisplayName.class, this, WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES); + } + return displayNames; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + return ((InternalEList)getWebResourceCollections()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + if (authConstraint != null) + msgs = ((InternalEObject)authConstraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, null, msgs); + return basicSetAuthConstraint((AuthConstraint)otherEnd, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + if (userDataConstraint != null) + msgs = ((InternalEObject)userDataConstraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, null, msgs); + return basicSetUserDataConstraint((UserDataConstraint)otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + return ((InternalEList)getWebResourceCollections()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + return basicSetAuthConstraint(null, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + return basicSetUserDataConstraint(null, msgs); + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: + return getDisplayName(); + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + return getWebApp(); + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + return getWebResourceCollections(); + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + return getAuthConstraint(); + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + return getUserDataConstraint(); + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: + return getDisplayNames(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + return webResourceCollections != null && !webResourceCollections.isEmpty(); + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + return authConstraint != null; + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + return userDataConstraint != null; + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (displayName: ");//$NON-NLS-1$ + result.append(displayName); + result.append(')'); + return result.toString(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + getWebResourceCollections().clear(); + getWebResourceCollections().addAll((Collection)newValue); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + setAuthConstraint((AuthConstraint)newValue); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + setUserDataConstraint((UserDataConstraint)newValue); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: + getWebResourceCollections().clear(); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: + setAuthConstraint((AuthConstraint)null); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: + setUserDataConstraint((UserDataConstraint)null); + return; + case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + } + eDynamicUnset(eFeature); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletImpl.java new file mode 100644 index 000000000..16645475b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletImpl.java @@ -0,0 +1,699 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; +import java.util.Vector; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jem.java.JavaRefFactory; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; +import org.eclipse.jst.j2ee.common.SecurityRoleRef; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * The servlet element contains the declarative data of a servlet. If a jsp-file is specified and the load-on-startup element is present, then the JSP should be precompiled and loaded. + */ +public class ServletImpl extends CompatibilityDescriptionGroupImpl implements Servlet { + + /** + * The default value of the '{@link #getServletName() Servlet Name}' attribute. + * + * + * @see #getServletName() + * @generated + * @ordered + */ + protected static final String SERVLET_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String servletName = SERVLET_NAME_EDEFAULT; + /** + * The default value of the '{@link #getLoadOnStartup() Load On Startup}' attribute. + * + * + * @see #getLoadOnStartup() + * @generated + * @ordered + */ + protected static final Integer LOAD_ON_STARTUP_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected Integer loadOnStartup = LOAD_ON_STARTUP_EDEFAULT; + /** + * This is true if the Load On Startup attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean loadOnStartupESet = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected WebType webType = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList params = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityRoleRefs = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected RunAsSpecifiedIdentity runAs = null; + /** + * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. + * + * + * @see #getInitParams() + * @generated + * @ordered + */ + protected EList initParams = null; + + public ServletImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getServlet(); + } + +/** + * Returns an unmodifiable list of the mappings that this + * servlet participates in. Since servletMappings is not + * a bi-directional attribute, if you want to add or delete a + * mapping, this must be done in the web-app. + * @return java.util.List + */ +public List getMappings() { + WebApp webApp = (WebApp) eContainer(); + if (webApp == null) return new BasicEList(0); + + EList allMappings = webApp.getServletMappings(); + Iterator i = allMappings.iterator(); + List mappings = new Vector(); + while (i.hasNext()) { + ServletMapping mapping = (ServletMapping) i.next(); + if (mapping.getServlet() == this) + mappings.add(mapping); + } + return mappings; +} +/** + * getParamsAsProperties method comment. + */ +public Properties getParamsAsProperties() { + Properties props = new Properties(); + List lparams = getParams(); + InitParam param; + for (int i = 0; i < lparams.size(); i++) { + param = (InitParam) lparams.get(i); + props.setProperty(param.getParamName(), param.getParamValue()); + } + return props; +} +/** + * @see Servlet + */ +public void reSyncSecurityRoleRef(java.lang.String existingRoleName, java.lang.String newRoleName) { + List roleRefs = getSecurityRoleRefs(); + for (int i = 0; i < roleRefs.size(); i++) { + SecurityRoleRef roleRef = (SecurityRoleRef) roleRefs.get(i); + if (roleRef.getLink() != null && roleRef.getLink().equals(existingRoleName)) + roleRef.setLink(newRoleName); + } +} + /** + * @generated This field/method will be replaced during code generation + * The servlet-name element contains the canonical name of the servlet. + */ + public String getServletName() { + return servletName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setServletName(String newServletName) { + String oldServletName = servletName; + servletName = newServletName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__SERVLET_NAME, oldServletName, servletName)); + } + + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * @generated This field/method will be replaced during code generation + * The load-on-startup element indicates that this servlet should be loaded on the startup of the web application. The optional contents of these element must be a positive integer indicating the order in which the servlet should be loaded. Lower integers are loaded before higher integers. If no value is specified, or if the value specified is not a positive integer, the container is free to load it at any time in the startup sequence. + + */ + public Integer getLoadOnStartup() { + return loadOnStartup; + } + + /** + * + * + * @generated + */ + public void setLoadOnStartup(Integer newLoadOnStartup) { + Integer oldLoadOnStartup = loadOnStartup; + loadOnStartup = newLoadOnStartup; + boolean oldLoadOnStartupESet = loadOnStartupESet; + loadOnStartupESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__LOAD_ON_STARTUP, oldLoadOnStartup, loadOnStartup, !oldLoadOnStartupESet)); + } + + /** + * + * + * @generated + */ + public void unsetLoadOnStartup() { + Integer oldLoadOnStartup = loadOnStartup; + boolean oldLoadOnStartupESet = loadOnStartupESet; + loadOnStartup = LOAD_ON_STARTUP_EDEFAULT; + loadOnStartupESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.SERVLET__LOAD_ON_STARTUP, oldLoadOnStartup, LOAD_ON_STARTUP_EDEFAULT, oldLoadOnStartupESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetLoadOnStartup() { + return loadOnStartupESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.SERVLET__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SERVLET__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SERVLETS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SERVLET__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_APP, newWebApp, newWebApp)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebType getWebType() { + return webType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetWebType(WebType newWebType, NotificationChain msgs) { + WebType oldWebType = webType; + webType = newWebType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_TYPE, oldWebType, newWebType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebType(WebType newWebType) { + if (newWebType != webType) { + NotificationChain msgs = null; + if (webType != null) + msgs = ((InternalEObject)webType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__WEB_TYPE, null, msgs); + if (newWebType != null) + msgs = ((InternalEObject)newWebType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__WEB_TYPE, null, msgs); + msgs = basicSetWebType(newWebType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_TYPE, newWebType, newWebType)); + } + + /** + * + * getParams() is used for J2EE1.4 + * + * @generated This field/method will be replaced during code generation + */ + public EList getParams() { + if (params == null) { + params = new EObjectContainmentEList(InitParam.class, this, WebapplicationPackage.SERVLET__PARAMS); + } + return params; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getSecurityRoleRefs() { + if (securityRoleRefs == null) { + securityRoleRefs = new EObjectContainmentEList(SecurityRoleRef.class, this, WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS); + } + return securityRoleRefs; + } + + /** + * @generated This field/method will be replaced during code generation + * If defined for a servlet, overrides the security identity used to call an EJB by that servlet in this web application. The role-name is one of the security roles already defined for this web application. + */ + public RunAsSpecifiedIdentity getRunAs() { + return runAs; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRunAs(RunAsSpecifiedIdentity newRunAs, NotificationChain msgs) { + RunAsSpecifiedIdentity oldRunAs = runAs; + runAs = newRunAs; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__RUN_AS, oldRunAs, newRunAs); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setRunAs(RunAsSpecifiedIdentity newRunAs) { + if (newRunAs != runAs) { + NotificationChain msgs = null; + if (runAs != null) + msgs = ((InternalEObject)runAs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__RUN_AS, null, msgs); + if (newRunAs != null) + msgs = ((InternalEObject)newRunAs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__RUN_AS, null, msgs); + msgs = basicSetRunAs(newRunAs, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__RUN_AS, newRunAs, newRunAs)); + } + + /** + * + * getInitParams() is used for J2EE1.3 + * + * @generated + */ + public EList getInitParams() { + if (initParams == null) { + initParams = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.SERVLET__INIT_PARAMS); + } + return initParams; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SERVLET__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.SERVLET__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SERVLET__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SERVLET__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SERVLET__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SERVLET__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.SERVLET__WEB_APP, msgs); + case WebapplicationPackage.SERVLET__WEB_TYPE: + return basicSetWebType(null, msgs); + case WebapplicationPackage.SERVLET__PARAMS: + return ((InternalEList)getParams()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: + return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.SERVLET__RUN_AS: + return basicSetRunAs(null, msgs); + case WebapplicationPackage.SERVLET__INIT_PARAMS: + return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.SERVLET__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SERVLETS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET__ICONS: + return getIcons(); + case WebapplicationPackage.SERVLET__DISPLAY_NAMES: + return getDisplayNames(); + case WebapplicationPackage.SERVLET__DESCRIPTIONS: + return getDescriptions(); + case WebapplicationPackage.SERVLET__SMALL_ICON: + return getSmallIcon(); + case WebapplicationPackage.SERVLET__LARGE_ICON: + return getLargeIcon(); + case WebapplicationPackage.SERVLET__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.SERVLET__DISPLAY_NAME: + return getDisplayName(); + case WebapplicationPackage.SERVLET__SERVLET_NAME: + return getServletName(); + case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: + return getLoadOnStartup(); + case WebapplicationPackage.SERVLET__WEB_APP: + return getWebApp(); + case WebapplicationPackage.SERVLET__WEB_TYPE: + return getWebType(); + case WebapplicationPackage.SERVLET__PARAMS: + return getParams(); + case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: + return getSecurityRoleRefs(); + case WebapplicationPackage.SERVLET__RUN_AS: + return getRunAs(); + case WebapplicationPackage.SERVLET__INIT_PARAMS: + return getInitParams(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET__ICONS: + return icons != null && !icons.isEmpty(); + case WebapplicationPackage.SERVLET__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case WebapplicationPackage.SERVLET__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WebapplicationPackage.SERVLET__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WebapplicationPackage.SERVLET__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WebapplicationPackage.SERVLET__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.SERVLET__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WebapplicationPackage.SERVLET__SERVLET_NAME: + return SERVLET_NAME_EDEFAULT == null ? servletName != null : !SERVLET_NAME_EDEFAULT.equals(servletName); + case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: + return isSetLoadOnStartup(); + case WebapplicationPackage.SERVLET__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.SERVLET__WEB_TYPE: + return webType != null; + case WebapplicationPackage.SERVLET__PARAMS: + return params != null && !params.isEmpty(); + case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: + return securityRoleRefs != null && !securityRoleRefs.isEmpty(); + case WebapplicationPackage.SERVLET__RUN_AS: + return runAs != null; + case WebapplicationPackage.SERVLET__INIT_PARAMS: + return initParams != null && !initParams.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case WebapplicationPackage.SERVLET__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case WebapplicationPackage.SERVLET__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WebapplicationPackage.SERVLET__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WebapplicationPackage.SERVLET__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WebapplicationPackage.SERVLET__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.SERVLET__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WebapplicationPackage.SERVLET__SERVLET_NAME: + setServletName((String)newValue); + return; + case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: + setLoadOnStartup((Integer)newValue); + return; + case WebapplicationPackage.SERVLET__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.SERVLET__WEB_TYPE: + setWebType((WebType)newValue); + return; + case WebapplicationPackage.SERVLET__PARAMS: + getParams().clear(); + getParams().addAll((Collection)newValue); + return; + case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + getSecurityRoleRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.SERVLET__RUN_AS: + setRunAs((RunAsSpecifiedIdentity)newValue); + return; + case WebapplicationPackage.SERVLET__INIT_PARAMS: + getInitParams().clear(); + getInitParams().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET__ICONS: + getIcons().clear(); + return; + case WebapplicationPackage.SERVLET__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case WebapplicationPackage.SERVLET__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WebapplicationPackage.SERVLET__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WebapplicationPackage.SERVLET__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WebapplicationPackage.SERVLET__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.SERVLET__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WebapplicationPackage.SERVLET__SERVLET_NAME: + setServletName(SERVLET_NAME_EDEFAULT); + return; + case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: + unsetLoadOnStartup(); + return; + case WebapplicationPackage.SERVLET__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.SERVLET__WEB_TYPE: + setWebType((WebType)null); + return; + case WebapplicationPackage.SERVLET__PARAMS: + getParams().clear(); + return; + case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: + getSecurityRoleRefs().clear(); + return; + case WebapplicationPackage.SERVLET__RUN_AS: + setRunAs((RunAsSpecifiedIdentity)null); + return; + case WebapplicationPackage.SERVLET__INIT_PARAMS: + getInitParams().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servletName: ");//$NON-NLS-1$ + result.append(servletName); + result.append(", loadOnStartup: ");//$NON-NLS-1$ + if (loadOnStartupESet) result.append(loadOnStartup); else result.append("");//$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + + /** + * return the java servlet class for this servlet + */ + public JavaClass getServletClass() { + JavaClass javaClass = null; + String javaClassName = null; + // Handle servlet case + if (getWebType().isServletType()) + javaClassName = ((ServletType)getWebType()).getClassName(); + //Handle the JSP case + else { + String relPath = ((JSPType)getWebType()).getJspFile(); + URI webAppURI = getWebApp().eResource().getURI(); + javaClassName = webAppURI.segment(1)+"/"+webAppURI.segment(2)+relPath;//$NON-NLS-1$ + } + javaClass = (JavaClass) JavaRefFactory.eINSTANCE.reflectType(javaClassName,this); + return javaClass; + } + +} + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletMappingImpl.java new file mode 100644 index 000000000..e3ca38b8a --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletMappingImpl.java @@ -0,0 +1,349 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The servlet-mapping element defines a mapping between a servlet and a url pattern + */ +public class ServletMappingImpl extends EObjectImpl implements ServletMapping, EObject { + + /** + * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. + * + * + * @see #getUrlPattern() + * @generated + * @ordered + */ + protected static final String URL_PATTERN_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String urlPattern = URL_PATTERN_EDEFAULT; + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected Servlet servlet = null; + public ServletMappingImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getServletMapping(); + } + + /** + * @generated This field/method will be replaced during code generation + * The url-pattern element contains the url pattern of the mapping. Must follow + * the rules specified in Section 10 of the Servlet API Specification. + */ + public String getUrlPattern() { + return urlPattern; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUrlPattern(String newUrlPattern) { + String oldUrlPattern = urlPattern; + urlPattern = newUrlPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN, oldUrlPattern, urlPattern)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__NAME, oldName, name)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.SERVLET_MAPPING__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SERVLET_MAPPING__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, newWebApp, newWebApp)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public Servlet getServlet() { + if (servlet != null && servlet.eIsProxy()) { + Servlet oldServlet = servlet; + servlet = (Servlet)eResolveProxy((InternalEObject)servlet); + if (servlet != oldServlet) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.SERVLET_MAPPING__SERVLET, oldServlet, servlet)); + } + } + return servlet; + } + + /** + * + * + * @generated + */ + public Servlet basicGetServlet() { + return servlet; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setServlet(Servlet newServlet) { + Servlet oldServlet = servlet; + servlet = newServlet; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__SERVLET, oldServlet, servlet)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: + return getUrlPattern(); + case WebapplicationPackage.SERVLET_MAPPING__NAME: + return getName(); + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + return getWebApp(); + case WebapplicationPackage.SERVLET_MAPPING__SERVLET: + if (resolve) return getServlet(); + return basicGetServlet(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: + return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); + case WebapplicationPackage.SERVLET_MAPPING__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.SERVLET_MAPPING__SERVLET: + return servlet != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: + setUrlPattern((String)newValue); + return; + case WebapplicationPackage.SERVLET_MAPPING__NAME: + setName((String)newValue); + return; + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.SERVLET_MAPPING__SERVLET: + setServlet((Servlet)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: + setUrlPattern(URL_PATTERN_EDEFAULT); + return; + case WebapplicationPackage.SERVLET_MAPPING__NAME: + setName(NAME_EDEFAULT); + return; + case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.SERVLET_MAPPING__SERVLET: + setServlet((Servlet)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (urlPattern: ");//$NON-NLS-1$ + result.append(urlPattern); + result.append(", name: ");//$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletTypeImpl.java new file mode 100644 index 000000000..d43708bc9 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/ServletTypeImpl.java @@ -0,0 +1,150 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * @generated + */ +public class ServletTypeImpl extends WebTypeImpl implements ServletType { + + /** + * The default value of the '{@link #getClassName() Class Name}' attribute. + * + * + * @see #getClassName() + * @generated + * @ordered + */ + protected static final String CLASS_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String className = CLASS_NAME_EDEFAULT; + public ServletTypeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getServletType(); + } + +public boolean isServletType() { + return true; +} + /** + * @generated This field/method will be replaced during code generation + */ + public String getClassName() { + return className; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setClassName(String newClassName) { + String oldClassName = className; + className = newClassName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_TYPE__CLASS_NAME, oldClassName, className)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: + return getClassName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: + return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: + setClassName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: + setClassName(CLASS_NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (className: ");//$NON-NLS-1$ + result.append(className); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SessionConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SessionConfigImpl.java new file mode 100644 index 000000000..71bbc9eeb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/SessionConfigImpl.java @@ -0,0 +1,281 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The session-config element defines the session parameters for this web application. + */ +public class SessionConfigImpl extends EObjectImpl implements SessionConfig, EObject { + + /** + * The default value of the '{@link #getSessionTimeout() Session Timeout}' attribute. + * + * + * @see #getSessionTimeout() + * @generated + * @ordered + */ + protected static final int SESSION_TIMEOUT_EDEFAULT = 0; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected int sessionTimeout = SESSION_TIMEOUT_EDEFAULT; + /** + * This is true if the Session Timeout attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean sessionTimeoutESet = false; + + public SessionConfigImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getSessionConfig(); + } + + /** + * @generated This field/method will be replaced during code generation + * The session-timeout element defines the default session timeout interval for + * all sessions created in this web application. The specified timeout must be + * expressed in a whole number of minutes. + */ + public int getSessionTimeout() { + return sessionTimeout; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSessionTimeout(int newSessionTimeout) { + int oldSessionTimeout = sessionTimeout; + sessionTimeout = newSessionTimeout; + boolean oldSessionTimeoutESet = sessionTimeoutESet; + sessionTimeoutESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT, oldSessionTimeout, sessionTimeout, !oldSessionTimeoutESet)); + } + + /** + * + * + * @generated + */ + public void unsetSessionTimeout() { + int oldSessionTimeout = sessionTimeout; + boolean oldSessionTimeoutESet = sessionTimeoutESet; + sessionTimeout = SESSION_TIMEOUT_EDEFAULT; + sessionTimeoutESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT, oldSessionTimeout, SESSION_TIMEOUT_EDEFAULT, oldSessionTimeoutESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetSessionTimeout() { + return sessionTimeoutESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.SESSION_CONFIG__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SESSION_CONFIG__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SESSION_CONFIG, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SESSION_CONFIG__WEB_APP, newWebApp, newWebApp)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SESSION_CONFIG, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: + return new Integer(getSessionTimeout()); + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + return getWebApp(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: + return isSetSessionTimeout(); + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + return getWebApp() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: + setSessionTimeout(((Integer)newValue).intValue()); + return; + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + setWebApp((WebApp)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: + unsetSessionTimeout(); + return; + case WebapplicationPackage.SESSION_CONFIG__WEB_APP: + setWebApp((WebApp)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (sessionTimeout: ");//$NON-NLS-1$ + if (sessionTimeoutESet) result.append(sessionTimeout); else result.append("");//$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/TagLibRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/TagLibRefImpl.java new file mode 100644 index 000000000..41251c0f0 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/TagLibRefImpl.java @@ -0,0 +1,296 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * The taglib element is used to describe a JSP tag library. + */ +public class TagLibRefImpl extends EObjectImpl implements TagLibRef, EObject{ + + /** + * The default value of the '{@link #getTaglibURI() Taglib URI}' attribute. + * + * + * @see #getTaglibURI() + * @generated + * @ordered + */ + protected static final String TAGLIB_URI_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String taglibURI = TAGLIB_URI_EDEFAULT; + /** + * The default value of the '{@link #getTaglibLocation() Taglib Location}' attribute. + * + * + * @see #getTaglibLocation() + * @generated + * @ordered + */ + protected static final String TAGLIB_LOCATION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String taglibLocation = TAGLIB_LOCATION_EDEFAULT; + public TagLibRefImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getTagLibRef(); + } + + /** + * @generated This field/method will be replaced during code generation + * The taglib-uri element describes a URI, relative to the location of the web.xml + * document, identifying a Tag Library used in the Web Application. + */ + public String getTaglibURI() { + return taglibURI; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setTaglibURI(String newTaglibURI) { + String oldTaglibURI = taglibURI; + taglibURI = newTaglibURI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI, oldTaglibURI, taglibURI)); + } + + /** + * @generated This field/method will be replaced during code generation + * The taglib-location element contains the location (as a resource relative to + * the root of the web application) where to find the Tag Libary Description file + * for the tag library. + */ + public String getTaglibLocation() { + return taglibLocation; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setTaglibLocation(String newTaglibLocation) { + String oldTaglibLocation = taglibLocation; + taglibLocation = newTaglibLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION, oldTaglibLocation, taglibLocation)); + } + + /** + * + * + * @generated + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.TAG_LIB_REF__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * + * + * @generated + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.TAG_LIB_REF__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__WEB_APP, newWebApp, newWebApp)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: + return getTaglibURI(); + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: + return getTaglibLocation(); + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + return getWebApp(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: + return TAGLIB_URI_EDEFAULT == null ? taglibURI != null : !TAGLIB_URI_EDEFAULT.equals(taglibURI); + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: + return TAGLIB_LOCATION_EDEFAULT == null ? taglibLocation != null : !TAGLIB_LOCATION_EDEFAULT.equals(taglibLocation); + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + return getWebApp() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: + setTaglibURI((String)newValue); + return; + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: + setTaglibLocation((String)newValue); + return; + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + setWebApp((WebApp)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: + setTaglibURI(TAGLIB_URI_EDEFAULT); + return; + case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: + setTaglibLocation(TAGLIB_LOCATION_EDEFAULT); + return; + case WebapplicationPackage.TAG_LIB_REF__WEB_APP: + setWebApp((WebApp)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (taglibURI: ");//$NON-NLS-1$ + result.append(taglibURI); + result.append(", taglibLocation: ");//$NON-NLS-1$ + result.append(taglibLocation); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/URLPatternTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/URLPatternTypeImpl.java new file mode 100644 index 000000000..bcc7dcd5e --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/URLPatternTypeImpl.java @@ -0,0 +1,243 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * @generated + */ +public class URLPatternTypeImpl extends EObjectImpl implements URLPatternType { + + /** + * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. + * + * + * @see #getUrlPattern() + * @generated + * @ordered + */ + protected static final String URL_PATTERN_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String urlPattern = URL_PATTERN_EDEFAULT; + public URLPatternTypeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getURLPatternType(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getUrlPattern() { + return urlPattern; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setUrlPattern(String newUrlPattern) { + String oldUrlPattern = urlPattern; + urlPattern = newUrlPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN, oldUrlPattern, urlPattern)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WebResourceCollection getResCollection() { + if (eContainerFeatureID != WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION) return null; + return (WebResourceCollection)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setResCollection(WebResourceCollection newResCollection) { + if (newResCollection != eContainer || (eContainerFeatureID != WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION && newResCollection != null)) { + if (EcoreUtil.isAncestor(this, newResCollection)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newResCollection != null) + msgs = ((InternalEObject)newResCollection).eInverseAdd(this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebResourceCollection.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newResCollection, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, newResCollection, newResCollection)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + return eBasicSetContainer(null, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebResourceCollection.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: + return getUrlPattern(); + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + return getResCollection(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: + return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + return getResCollection() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: + setUrlPattern((String)newValue); + return; + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + setResCollection((WebResourceCollection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: + setUrlPattern(URL_PATTERN_EDEFAULT); + return; + case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: + setResCollection((WebResourceCollection)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (urlPattern: ");//$NON-NLS-1$ + result.append(urlPattern); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/UserDataConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/UserDataConstraintImpl.java new file mode 100644 index 000000000..14ad46827 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/UserDataConstraintImpl.java @@ -0,0 +1,376 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * The user-data-constraint element is used to indicate how data communicated between the client and container should be protected + */ +public class UserDataConstraintImpl extends EObjectImpl implements UserDataConstraint, EObject { + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The default value of the '{@link #getTransportGuarantee() Transport Guarantee}' attribute. + * + * + * @see #getTransportGuarantee() + * @generated + * @ordered + */ + protected static final TransportGuaranteeType TRANSPORT_GUARANTEE_EDEFAULT = TransportGuaranteeType.NONE_LITERAL; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected TransportGuaranteeType transportGuarantee = TRANSPORT_GUARANTEE_EDEFAULT; + /** + * This is true if the Transport Guarantee attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean transportGuaranteeESet = false; + + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + public UserDataConstraintImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getUserDataConstraint(); + } + + /** + * @generated This field/method will be replaced during code generation + * A description for the user data constraint. + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION, oldDescription, description)); + } + + /** + * @generated This field/method will be replaced during code generation + * The transport-guarantee element specifies that the communication between client + * and server should be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the + * application does not require any + * transport guarantees. A value of INTEGRAL means that the application requires + * that the data sent between the client and server be sent in such a way that it + * can't be changed in transit. CONFIDENTIAL means that the application requires + * that the data be transmitted in a fashion that prevents other entities from + * observing the contents of the transmission. In most cases, the presence of the + * INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is required. + */ + public TransportGuaranteeType getTransportGuarantee() { + return transportGuarantee; + } + + /** + * + * + * @generated + */ + public void setTransportGuarantee(TransportGuaranteeType newTransportGuarantee) { + TransportGuaranteeType oldTransportGuarantee = transportGuarantee; + transportGuarantee = newTransportGuarantee == null ? TRANSPORT_GUARANTEE_EDEFAULT : newTransportGuarantee; + boolean oldTransportGuaranteeESet = transportGuaranteeESet; + transportGuaranteeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE, oldTransportGuarantee, transportGuarantee, !oldTransportGuaranteeESet)); + } + + /** + * + * + * @generated + */ + public void unsetTransportGuarantee() { + TransportGuaranteeType oldTransportGuarantee = transportGuarantee; + boolean oldTransportGuaranteeESet = transportGuaranteeESet; + transportGuarantee = TRANSPORT_GUARANTEE_EDEFAULT; + transportGuaranteeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE, oldTransportGuarantee, TRANSPORT_GUARANTEE_EDEFAULT, oldTransportGuaranteeESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetTransportGuarantee() { + return transportGuaranteeESet; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public SecurityConstraint getSecConstraint() { + if (eContainerFeatureID != WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT) return null; + return (SecurityConstraint)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSecConstraint(SecurityConstraint newSecConstraint) { + if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT && newSecConstraint != null)) { + if (EcoreUtil.isAncestor(this, newSecConstraint)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newSecConstraint != null) + msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, SecurityConstraint.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + return eBasicSetContainer(null, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, SecurityConstraint.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: + return getTransportGuarantee(); + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + return getSecConstraint(); + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: + return getDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: + return isSetTransportGuarantee(); + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + return getSecConstraint() != null; + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: + setTransportGuarantee((TransportGuaranteeType)newValue); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)newValue); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: + unsetTransportGuarantee(); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)null); + return; + case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: + getDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: ");//$NON-NLS-1$ + result.append(description); + result.append(", transportGuarantee: ");//$NON-NLS-1$ + if (transportGuaranteeESet) result.append(transportGuarantee); else result.append("");//$NON-NLS-1$ + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppImpl.java new file mode 100644 index 000000000..666cc0de8 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppImpl.java @@ -0,0 +1,1399 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.common.MessageDestination; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.SecurityRole; +import org.eclipse.jst.j2ee.common.XMLResource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.JNDIEnvRefsGroupImpl; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; +import org.eclipse.jst.j2ee.jsp.JSPConfig; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + + +/** + * The web-app element is the root of the deployment descriptor for + * a web application. + */ +public class WebAppImpl extends JNDIEnvRefsGroupImpl implements WebApp { + + /** + * The default value of the '{@link #isDistributable() Distributable}' attribute. + * + * + * @see #isDistributable() + * @generated + * @ordered + */ + protected static final boolean DISTRIBUTABLE_EDEFAULT = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected boolean distributable = DISTRIBUTABLE_EDEFAULT; + /** + * This is true if the Distributable attribute has been set. + * + * + * @generated + * @ordered + */ + protected boolean distributableESet = false; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList contexts = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList errorPages = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected WelcomeFileList fileList = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList tagLibs = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList constraints = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected LoginConfig loginConfig = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList mimeMappings = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected SessionConfig sessionConfig = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList servletMappings = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList servlets = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList securityRoles = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList filters = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList filterMappings = null; + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList listeners = null; + /** + * The cached value of the '{@link #getContextParams() Context Params}' containment reference list. + * + * + * @see #getContextParams() + * @generated + * @ordered + */ + protected EList contextParams = null; + + /** + * The cached value of the '{@link #getJspConfig() Jsp Config}' containment reference. + * + * + * @see #getJspConfig() + * @generated + * @ordered + */ + protected JSPConfig jspConfig = null; + + /** + * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. + * + * + * @see #getMessageDestinations() + * @generated + * @ordered + */ + protected EList messageDestinations = null; + + /** + * The cached value of the '{@link #getLocalEncodingMappingList() Local Encoding Mapping List}' containment reference. + * + * + * @see #getLocalEncodingMappingList() + * @generated + * @ordered + */ + protected LocalEncodingMappingList localEncodingMappingList = null; + + public WebAppImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getWebApp(); + } + +/** + * @see org.eclipse.jst.j2ee.internal.webapplication.WebApp + */ +public boolean containsSecurityRole(java.lang.String name) { + return getSecurityRoleNamed(name) != null; +} +public ErrorPage getErrorPageByCode(Integer code) { + List lerrorPages = getErrorPages(); + String codeString = code.toString(); + Iterator ie = lerrorPages.iterator(); + while (ie.hasNext()) { + ErrorPage ep = (ErrorPage) ie.next(); + if (ep.isErrorCode()) { + ErrorCodeErrorPage ecep = (ErrorCodeErrorPage) ep; + if (codeString.equals(ecep.getErrorCode())) + return ecep; + } + } + return null; +} +public ErrorPage getErrorPageByExceptionType(String exceptionType) { + if (exceptionType != null) { + List lerrorPages = getErrorPages(); + Iterator ie = lerrorPages.iterator(); + while (ie.hasNext()) { + ErrorPage ep = (ErrorPage) ie.next(); + if (ep.isExceptionType()) { + ExceptionTypeErrorPage etep = (ExceptionTypeErrorPage) ep; + if (exceptionType.equals(etep.getExceptionTypeName())) + return etep; + } + } + } + return null; +} +/** + * Finds a filter mapping for a specified filter. + * @param filter The filter to find the mapping for. + * @return The first filter mapping found for the specified filter, or null if no + * mapping exists for the filter. + */ +public FilterMapping getFilterMapping( + Filter aFilter) { + if (aFilter != null) { + List mappings = getFilterMappings(); + FilterMapping mapping; + for (int i = 0; i < mappings.size(); i++) { + mapping = (FilterMapping) mappings.get(i); + if (aFilter.equals(mapping.getFilter())) + return mapping; + } + } + return null; +} +/** + * getFilterNamed method comment. + */ +public Filter getFilterNamed(java.lang.String name) { + List lfilters = getFilters(); + if (lfilters == null || lfilters.size() == 0) { + return null; + } + Filter next; + for (int i = 0; i < lfilters.size(); i++) { + next = (Filter) lfilters.get(i); + if (next.getName().equals(name)) { + return next; + } + } + return null; +} +public List getFilterNames() { + List names, lfilters = getFilters(); + names = new ArrayList(lfilters.size()); + Filter next; + for (int i = 0; i < lfilters.size(); i++) { + next = (Filter) lfilters.get(i); + names.add(next.getName()); + } + return names; +} +/** + * Returns the mime type for the specified extension + * @param An extension to find the mime type for. + */ +public java.lang.String getMimeType(java.lang.String extension) { + if (extension != null) { + List mappings = getMimeMappings(); + MimeMapping mapping; + for (int i = 0; i < mappings.size(); i++) { + mapping = (MimeMapping) mappings.get(i); + if (extension.equals(mapping.getExtension())) + return mapping.getMimeType(); + } + } + return null; +} +public SecurityRole getSecurityRoleNamed(String roleName) { + java.util.List tempRoles = getSecurityRoles(); + SecurityRole role; + for (int i = 0; i < tempRoles.size(); i++) { + role = (SecurityRole) tempRoles.get(i); + if (role.getRoleName().equals(roleName)) + return role; + } + return null; +} +/** + * Finds a servlet mapping for a specified servlet. + * @param servlet The servlet to find the mappings for. + * @return The servlet mapping for the specified servlet, or null if no + * mapping exists for the servlet. + */ +public ServletMapping getServletMapping( + Servlet aServlet) { + if (aServlet != null) { + List mappings = getServletMappings(); + ServletMapping mapping; + for (int i = 0; i < mappings.size(); i++) { + mapping = (ServletMapping) mappings.get(i); + if (aServlet.equals(mapping.getServlet())) + return mapping; + } + } + return null; +} +/** + * getServletNamed method comment. + */ +public Servlet getServletNamed(java.lang.String name) { + List lservlets = getServlets(); + if (lservlets == null || lservlets.size() == 0) { + return null; + } + Servlet next; + String nextName; + for (int i = 0; i < lservlets.size(); i++) { + next = (Servlet) lservlets.get(i); + nextName = next.getServletName(); + if (nextName != null && nextName.equals(name)) { + return next; + } + } + return null; +} +public List getServletNames() { + List names, lservlets = getServlets(); + names = new ArrayList(lservlets.size()); + Servlet next; + for (int i = 0; i < lservlets.size(); i++) { + next = (Servlet) lservlets.get(i); + names.add(next.getServletName()); + } + return names; +} +/** + * Return boolean indicating if this Web App was populated from an Servlet2.2 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion2_2Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.WEBAPP_SYSTEMID_2_2); +} +/** + * Return boolean indicating if this Web App was populated from an Servlet2.3 compliant descriptor + * @return boolean + * @deprecated Use getVersionID() to determine module level + */ +public boolean isVersion2_3Descriptor() { + CommonUtil.checkDDObjectForVersion(this); + String systemId = ((XMLResource)eResource()).getSystemId(); + return systemId == null ? false : systemId.equals(J2EEConstants.WEBAPP_SYSTEMID_2_3); +} +/** + * @see org.eclipse.jst.j2ee.internal.webapplication.WebApp + */ +public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { + SecurityRole role = getSecurityRoleNamed(existingRoleName); + if (role != null) + role.setRoleName(newRoleName); + List theServlets = getServlets(); + for (int i = 0; i < theServlets.size(); i++){ + Servlet servlet = (Servlet)theServlets.get(i); + servlet.reSyncSecurityRoleRef(existingRoleName, newRoleName); + } +} + /** + * @generated This field/method will be replaced during code generation + * The distributable element, by its presence in a web application deployment + * descriptor, indicates that this web application is programmed appropriately to + * be deployed into a distributed servlet container + */ + public boolean isDistributable() { + return distributable; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDistributable(boolean newDistributable) { + boolean oldDistributable = distributable; + distributable = newDistributable; + boolean oldDistributableESet = distributableESet; + distributableESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__DISTRIBUTABLE, oldDistributable, distributable, !oldDistributableESet)); + } + + /** + * + * + * @generated + */ + public void unsetDistributable() { + boolean oldDistributable = distributable; + boolean oldDistributableESet = distributableESet; + distributable = DISTRIBUTABLE_EDEFAULT; + distributableESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.WEB_APP__DISTRIBUTABLE, oldDistributable, DISTRIBUTABLE_EDEFAULT, oldDistributableESet)); + } + + /** + * + * + * @generated + */ + public boolean isSetDistributable() { + return distributableESet; + } + + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__VERSION, oldVersion, version)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getContexts() { + if (contexts == null) { + contexts = new EObjectContainmentWithInverseEList(ContextParam.class, this, WebapplicationPackage.WEB_APP__CONTEXTS, WebapplicationPackage.CONTEXT_PARAM__WEB_APP); + } + return contexts; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getErrorPages() { + if (errorPages == null) { + errorPages = new EObjectContainmentWithInverseEList(ErrorPage.class, this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebapplicationPackage.ERROR_PAGE__WEB_APP); + } + return errorPages; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WelcomeFileList getFileList() { + return fileList; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFileList(WelcomeFileList newFileList, NotificationChain msgs) { + WelcomeFileList oldFileList = fileList; + fileList = newFileList; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__FILE_LIST, oldFileList, newFileList); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFileList(WelcomeFileList newFileList) { + if (newFileList != fileList) { + NotificationChain msgs = null; + if (fileList != null) + msgs = ((InternalEObject)fileList).eInverseRemove(this, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, WelcomeFileList.class, msgs); + if (newFileList != null) + msgs = ((InternalEObject)newFileList).eInverseAdd(this, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, WelcomeFileList.class, msgs); + msgs = basicSetFileList(newFileList, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__FILE_LIST, newFileList, newFileList)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getTagLibs() { + if (tagLibs == null) { + tagLibs = new EObjectContainmentWithInverseEList(TagLibRef.class, this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebapplicationPackage.TAG_LIB_REF__WEB_APP); + } + return tagLibs; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getConstraints() { + if (constraints == null) { + constraints = new EObjectContainmentWithInverseEList(SecurityConstraint.class, this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP); + } + return constraints; + } + + /** + * This returns the module version id. Compare with J2EEVersionConstants to determine module level + */ + + public int getVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) { + // fix defect 3276, when resource is unloaded + if (version == null) + throw new IllegalStateException(); + + if (version.equals("2.4"))//$NON-NLS-1$ + return J2EEVersionConstants.WEB_2_4_ID; + if (version.equals("2.3"))//$NON-NLS-1$ + return J2EEVersionConstants.WEB_2_3_ID; + if (version.equals("2.2"))//$NON-NLS-1$ + return J2EEVersionConstants.WEB_2_2_ID; + + } + return res.getModuleVersionID(); + } + + /** + *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level + */ + public int getJ2EEVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) throw new IllegalStateException(); + return res.getJ2EEVersionID(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public LoginConfig getLoginConfig() { + return loginConfig; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLoginConfig(LoginConfig newLoginConfig, NotificationChain msgs) { + LoginConfig oldLoginConfig = loginConfig; + loginConfig = newLoginConfig; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, oldLoginConfig, newLoginConfig); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setLoginConfig(LoginConfig newLoginConfig) { + if (newLoginConfig != loginConfig) { + NotificationChain msgs = null; + if (loginConfig != null) + msgs = ((InternalEObject)loginConfig).eInverseRemove(this, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, LoginConfig.class, msgs); + if (newLoginConfig != null) + msgs = ((InternalEObject)newLoginConfig).eInverseAdd(this, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, LoginConfig.class, msgs); + msgs = basicSetLoginConfig(newLoginConfig, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, newLoginConfig, newLoginConfig)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getMimeMappings() { + if (mimeMappings == null) { + mimeMappings = new EObjectContainmentWithInverseEList(MimeMapping.class, this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebapplicationPackage.MIME_MAPPING__WEB_APP); + } + return mimeMappings; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public SessionConfig getSessionConfig() { + return sessionConfig; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSessionConfig(SessionConfig newSessionConfig, NotificationChain msgs) { + SessionConfig oldSessionConfig = sessionConfig; + sessionConfig = newSessionConfig; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__SESSION_CONFIG, oldSessionConfig, newSessionConfig); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSessionConfig(SessionConfig newSessionConfig) { + if (newSessionConfig != sessionConfig) { + NotificationChain msgs = null; + if (sessionConfig != null) + msgs = ((InternalEObject)sessionConfig).eInverseRemove(this, WebapplicationPackage.SESSION_CONFIG__WEB_APP, SessionConfig.class, msgs); + if (newSessionConfig != null) + msgs = ((InternalEObject)newSessionConfig).eInverseAdd(this, WebapplicationPackage.SESSION_CONFIG__WEB_APP, SessionConfig.class, msgs); + msgs = basicSetSessionConfig(newSessionConfig, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__SESSION_CONFIG, newSessionConfig, newSessionConfig)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getServletMappings() { + if (servletMappings == null) { + servletMappings = new EObjectContainmentWithInverseEList(ServletMapping.class, this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebapplicationPackage.SERVLET_MAPPING__WEB_APP); + } + return servletMappings; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getServlets() { + if (servlets == null) { + servlets = new EObjectContainmentWithInverseEList(Servlet.class, this, WebapplicationPackage.WEB_APP__SERVLETS, WebapplicationPackage.SERVLET__WEB_APP); + } + return servlets; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getSecurityRoles() { + if (securityRoles == null) { + securityRoles = new EObjectContainmentEList(SecurityRole.class, this, WebapplicationPackage.WEB_APP__SECURITY_ROLES); + } + return securityRoles; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getFilters() { + if (filters == null) { + filters = new EObjectContainmentEList(Filter.class, this, WebapplicationPackage.WEB_APP__FILTERS); + } + return filters; + } + + /** + * @generated This field/method will be replaced during code generation + * Filter mappings defined for the web app + */ + public EList getFilterMappings() { + if (filterMappings == null) { + filterMappings = new EObjectContainmentEList(FilterMapping.class, this, WebapplicationPackage.WEB_APP__FILTER_MAPPINGS); + } + return filterMappings; + } + + /** + * @generated This field/method will be replaced during code generation + * The listeners collection contains deployment properties for a web application + * listener beans in the web app. + */ + public EList getListeners() { + if (listeners == null) { + listeners = new EObjectContainmentEList(Listener.class, this, WebapplicationPackage.WEB_APP__LISTENERS); + } + return listeners; + } + + /** + * + * + * @generated + */ + public EList getContextParams() { + if (contextParams == null) { + contextParams = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.WEB_APP__CONTEXT_PARAMS); + } + return contextParams; + } + + /** + * @deprecated: Use getEnvironmentProperties() + */ + public EList getEnvEntries() { + + return getEnvironmentProperties(); + } + + /** + * + * + * @generated + */ + public JSPConfig getJspConfig() { + return jspConfig; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetJspConfig(JSPConfig newJspConfig, NotificationChain msgs) { + JSPConfig oldJspConfig = jspConfig; + jspConfig = newJspConfig; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__JSP_CONFIG, oldJspConfig, newJspConfig); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setJspConfig(JSPConfig newJspConfig) { + if (newJspConfig != jspConfig) { + NotificationChain msgs = null; + if (jspConfig != null) + msgs = ((InternalEObject)jspConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__JSP_CONFIG, null, msgs); + if (newJspConfig != null) + msgs = ((InternalEObject)newJspConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__JSP_CONFIG, null, msgs); + msgs = basicSetJspConfig(newJspConfig, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__JSP_CONFIG, newJspConfig, newJspConfig)); + } + + /** + * + * + * @generated + */ + public EList getMessageDestinations() { + if (messageDestinations == null) { + messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS); + } + return messageDestinations; + } + + /** + * + * + * @generated + */ + public LocalEncodingMappingList getLocalEncodingMappingList() { + return localEncodingMappingList; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLocalEncodingMappingList(LocalEncodingMappingList newLocalEncodingMappingList, NotificationChain msgs) { + LocalEncodingMappingList oldLocalEncodingMappingList = localEncodingMappingList; + localEncodingMappingList = newLocalEncodingMappingList; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, oldLocalEncodingMappingList, newLocalEncodingMappingList); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLocalEncodingMappingList(LocalEncodingMappingList newLocalEncodingMappingList) { + if (newLocalEncodingMappingList != localEncodingMappingList) { + NotificationChain msgs = null; + if (localEncodingMappingList != null) + msgs = ((InternalEObject)localEncodingMappingList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, null, msgs); + if (newLocalEncodingMappingList != null) + msgs = ((InternalEObject)newLocalEncodingMappingList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, null, msgs); + msgs = basicSetLocalEncodingMappingList(newLocalEncodingMappingList, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, newLocalEncodingMappingList, newLocalEncodingMappingList)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WEB_APP__CONTEXTS: + return ((InternalEList)getContexts()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + return ((InternalEList)getErrorPages()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__FILE_LIST: + if (fileList != null) + msgs = ((InternalEObject)fileList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__FILE_LIST, null, msgs); + return basicSetFileList((WelcomeFileList)otherEnd, msgs); + case WebapplicationPackage.WEB_APP__TAG_LIBS: + return ((InternalEList)getTagLibs()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + return ((InternalEList)getConstraints()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + if (loginConfig != null) + msgs = ((InternalEObject)loginConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOGIN_CONFIG, null, msgs); + return basicSetLoginConfig((LoginConfig)otherEnd, msgs); + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + return ((InternalEList)getMimeMappings()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + if (sessionConfig != null) + msgs = ((InternalEObject)sessionConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__SESSION_CONFIG, null, msgs); + return basicSetSessionConfig((SessionConfig)otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + return ((InternalEList)getServletMappings()).basicAdd(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SERVLETS: + return ((InternalEList)getServlets()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WEB_APP__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: + return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__RESOURCE_REFS: + return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__EJB_REFS: + return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: + return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: + return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: + return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__CONTEXTS: + return ((InternalEList)getContexts()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + return ((InternalEList)getErrorPages()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__FILE_LIST: + return basicSetFileList(null, msgs); + case WebapplicationPackage.WEB_APP__TAG_LIBS: + return ((InternalEList)getTagLibs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + return ((InternalEList)getConstraints()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + return basicSetLoginConfig(null, msgs); + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + return ((InternalEList)getMimeMappings()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + return basicSetSessionConfig(null, msgs); + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + return ((InternalEList)getServletMappings()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SERVLETS: + return ((InternalEList)getServlets()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__SECURITY_ROLES: + return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__FILTERS: + return ((InternalEList)getFilters()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: + return ((InternalEList)getFilterMappings()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__LISTENERS: + return ((InternalEList)getListeners()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: + return ((InternalEList)getContextParams()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__JSP_CONFIG: + return basicSetJspConfig(null, msgs); + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: + return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: + return basicSetLocalEncodingMappingList(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_APP__ICONS: + return getIcons(); + case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: + return getDisplayNames(); + case WebapplicationPackage.WEB_APP__DESCRIPTIONS: + return getDescriptions(); + case WebapplicationPackage.WEB_APP__SMALL_ICON: + return getSmallIcon(); + case WebapplicationPackage.WEB_APP__LARGE_ICON: + return getLargeIcon(); + case WebapplicationPackage.WEB_APP__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.WEB_APP__DISPLAY_NAME: + return getDisplayName(); + case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: + return getEnvironmentProperties(); + case WebapplicationPackage.WEB_APP__RESOURCE_REFS: + return getResourceRefs(); + case WebapplicationPackage.WEB_APP__EJB_REFS: + return getEjbRefs(); + case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: + return getResourceEnvRefs(); + case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: + return getEjbLocalRefs(); + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: + return getMessageDestinationRefs(); + case WebapplicationPackage.WEB_APP__SERVICE_REFS: + return getServiceRefs(); + case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: + return isDistributable() ? Boolean.TRUE : Boolean.FALSE; + case WebapplicationPackage.WEB_APP__VERSION: + return getVersion(); + case WebapplicationPackage.WEB_APP__CONTEXTS: + return getContexts(); + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + return getErrorPages(); + case WebapplicationPackage.WEB_APP__FILE_LIST: + return getFileList(); + case WebapplicationPackage.WEB_APP__TAG_LIBS: + return getTagLibs(); + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + return getConstraints(); + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + return getLoginConfig(); + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + return getMimeMappings(); + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + return getSessionConfig(); + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + return getServletMappings(); + case WebapplicationPackage.WEB_APP__SERVLETS: + return getServlets(); + case WebapplicationPackage.WEB_APP__SECURITY_ROLES: + return getSecurityRoles(); + case WebapplicationPackage.WEB_APP__FILTERS: + return getFilters(); + case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: + return getFilterMappings(); + case WebapplicationPackage.WEB_APP__LISTENERS: + return getListeners(); + case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: + return getContextParams(); + case WebapplicationPackage.WEB_APP__JSP_CONFIG: + return getJspConfig(); + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: + return getMessageDestinations(); + case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: + return getLocalEncodingMappingList(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_APP__ICONS: + return icons != null && !icons.isEmpty(); + case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case WebapplicationPackage.WEB_APP__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WebapplicationPackage.WEB_APP__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WebapplicationPackage.WEB_APP__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WebapplicationPackage.WEB_APP__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.WEB_APP__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: + return environmentProperties != null && !environmentProperties.isEmpty(); + case WebapplicationPackage.WEB_APP__RESOURCE_REFS: + return resourceRefs != null && !resourceRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__EJB_REFS: + return ejbRefs != null && !ejbRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: + return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: + return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: + return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: + return isSetDistributable(); + case WebapplicationPackage.WEB_APP__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case WebapplicationPackage.WEB_APP__CONTEXTS: + return contexts != null && !contexts.isEmpty(); + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + return errorPages != null && !errorPages.isEmpty(); + case WebapplicationPackage.WEB_APP__FILE_LIST: + return fileList != null; + case WebapplicationPackage.WEB_APP__TAG_LIBS: + return tagLibs != null && !tagLibs.isEmpty(); + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + return constraints != null && !constraints.isEmpty(); + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + return loginConfig != null; + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + return mimeMappings != null && !mimeMappings.isEmpty(); + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + return sessionConfig != null; + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + return servletMappings != null && !servletMappings.isEmpty(); + case WebapplicationPackage.WEB_APP__SERVLETS: + return servlets != null && !servlets.isEmpty(); + case WebapplicationPackage.WEB_APP__SECURITY_ROLES: + return securityRoles != null && !securityRoles.isEmpty(); + case WebapplicationPackage.WEB_APP__FILTERS: + return filters != null && !filters.isEmpty(); + case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: + return filterMappings != null && !filterMappings.isEmpty(); + case WebapplicationPackage.WEB_APP__LISTENERS: + return listeners != null && !listeners.isEmpty(); + case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: + return contextParams != null && !contextParams.isEmpty(); + case WebapplicationPackage.WEB_APP__JSP_CONFIG: + return jspConfig != null; + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: + return messageDestinations != null && !messageDestinations.isEmpty(); + case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: + return localEncodingMappingList != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_APP__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WebapplicationPackage.WEB_APP__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WebapplicationPackage.WEB_APP__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.WEB_APP__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + getEnvironmentProperties().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__RESOURCE_REFS: + getResourceRefs().clear(); + getResourceRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__EJB_REFS: + getEjbRefs().clear(); + getEjbRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + getResourceEnvRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + getEjbLocalRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + getMessageDestinationRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: + setDistributable(((Boolean)newValue).booleanValue()); + return; + case WebapplicationPackage.WEB_APP__VERSION: + setVersion((String)newValue); + return; + case WebapplicationPackage.WEB_APP__CONTEXTS: + getContexts().clear(); + getContexts().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + getErrorPages().clear(); + getErrorPages().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__FILE_LIST: + setFileList((WelcomeFileList)newValue); + return; + case WebapplicationPackage.WEB_APP__TAG_LIBS: + getTagLibs().clear(); + getTagLibs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + getConstraints().clear(); + getConstraints().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + setLoginConfig((LoginConfig)newValue); + return; + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + getMimeMappings().clear(); + getMimeMappings().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + setSessionConfig((SessionConfig)newValue); + return; + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + getServletMappings().clear(); + getServletMappings().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__SERVLETS: + getServlets().clear(); + getServlets().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__SECURITY_ROLES: + getSecurityRoles().clear(); + getSecurityRoles().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__FILTERS: + getFilters().clear(); + getFilters().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: + getFilterMappings().clear(); + getFilterMappings().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__LISTENERS: + getListeners().clear(); + getListeners().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: + getContextParams().clear(); + getContextParams().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__JSP_CONFIG: + setJspConfig((JSPConfig)newValue); + return; + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + getMessageDestinations().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: + setLocalEncodingMappingList((LocalEncodingMappingList)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_APP__ICONS: + getIcons().clear(); + return; + case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case WebapplicationPackage.WEB_APP__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WebapplicationPackage.WEB_APP__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WebapplicationPackage.WEB_APP__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WebapplicationPackage.WEB_APP__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.WEB_APP__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: + getEnvironmentProperties().clear(); + return; + case WebapplicationPackage.WEB_APP__RESOURCE_REFS: + getResourceRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__EJB_REFS: + getEjbRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: + getResourceEnvRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: + getEjbLocalRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: + getMessageDestinationRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__SERVICE_REFS: + getServiceRefs().clear(); + return; + case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: + unsetDistributable(); + return; + case WebapplicationPackage.WEB_APP__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case WebapplicationPackage.WEB_APP__CONTEXTS: + getContexts().clear(); + return; + case WebapplicationPackage.WEB_APP__ERROR_PAGES: + getErrorPages().clear(); + return; + case WebapplicationPackage.WEB_APP__FILE_LIST: + setFileList((WelcomeFileList)null); + return; + case WebapplicationPackage.WEB_APP__TAG_LIBS: + getTagLibs().clear(); + return; + case WebapplicationPackage.WEB_APP__CONSTRAINTS: + getConstraints().clear(); + return; + case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: + setLoginConfig((LoginConfig)null); + return; + case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: + getMimeMappings().clear(); + return; + case WebapplicationPackage.WEB_APP__SESSION_CONFIG: + setSessionConfig((SessionConfig)null); + return; + case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: + getServletMappings().clear(); + return; + case WebapplicationPackage.WEB_APP__SERVLETS: + getServlets().clear(); + return; + case WebapplicationPackage.WEB_APP__SECURITY_ROLES: + getSecurityRoles().clear(); + return; + case WebapplicationPackage.WEB_APP__FILTERS: + getFilters().clear(); + return; + case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: + getFilterMappings().clear(); + return; + case WebapplicationPackage.WEB_APP__LISTENERS: + getListeners().clear(); + return; + case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: + getContextParams().clear(); + return; + case WebapplicationPackage.WEB_APP__JSP_CONFIG: + setJspConfig((JSPConfig)null); + return; + case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: + getMessageDestinations().clear(); + return; + case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: + setLocalEncodingMappingList((LocalEncodingMappingList)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (distributable: ");//$NON-NLS-1$ + if (distributableESet) result.append(distributable); else result.append("");//$NON-NLS-1$ + result.append(", version: ");//$NON-NLS-1$ + result.append(version); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceFactory.java new file mode 100644 index 000000000..7a82d1b56 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceFactory.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 18, 2003 + * + * To change this generated comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +/** + * @author schacher + * + * To change this generated comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class WebAppResourceFactory extends TranslatorResourceFactory { + + /** + * Method registerDtds. + */ + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_SYSTEMID_2_2, "web-app_2_2.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_ALT_SYSTEMID_2_2, "web-app_2.2.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_SYSTEMID_2_3, "web-app_2_3.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_APP_SCHEMA_LOC_2_4, "web-app_2_4.xsd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.JSP_SCHEMA_LOC_2_0, "jsp_2_0.xsd"); //$NON-NLS-1$ + } + + /** + * @param aRendererFactory + */ + public WebAppResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) + */ + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new WebAppResourceImpl(uri, aRenderer); + } + + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(aRendererFactory)); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register(FileNameResourceFactoryRegistry aRegistry) { + aRegistry.registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(RendererFactory.getDefaultRendererFactory())); + } + + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.WEBAPP_DD_URI_OBJ); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceImpl.java new file mode 100644 index 000000000..280197008 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebAppResourceImpl.java @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Mar 18, 2003 + * + * To change this generated comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.webapplication.WebAppTranslator; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebAppResource; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + +/** + * @author schacher + * + * To change this generated comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class WebAppResourceImpl extends XMLResourceImpl implements WebAppResource { + + + public WebAppResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + public WebAppResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + + public WebApp getWebApp() { + return (WebApp) getRootObject(); + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.WEBAPP_PUBLICID_2_2; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.WEBAPP_SYSTEMID_2_2; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.WEBAPP_PUBLICID_2_3; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.WEBAPP_SYSTEMID_2_3; + } + + /* + * @see WebAppResource#isWeb2_2() + * @deprecated - use getModuleVersionID() and J2EEVersionConstants + */ + public boolean isWeb2_2() { + return getModuleVersionID() == WEB_2_2_ID; + } + /* + * @see WebAppResource#isWeb2_3() + * @deprecated - use getModuleVersionID() and J2EEVersionConstants + */ + public boolean isWeb2_3() { + return getModuleVersionID() == WEB_2_3_ID; + } + /* + * @see WebAppResource#isWeb2_4() + * @deprecated - use getModuleVersionID() and J2EEVersionConstants + */ + public boolean isWeb2_4() { + return getModuleVersionID() == WEB_2_4_ID; + } + + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() + */ + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.WEBAPP_DOCTYPE; + default : + return null; + } + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResource#getType() + */ + public int getType() { + return WEB_APP_TYPE; + } + + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return WebAppTranslator.INSTANCE; + } + /* Return J2EE version based on module version + */ + public int getJ2EEVersionID() { + switch (getModuleVersionID()) { + case J2EEVersionConstants.WEB_2_2_ID : + return J2EEVersionConstants.J2EE_1_2_ID; + case J2EEVersionConstants.WEB_2_3_ID : + return J2EEVersionConstants.J2EE_1_3_ID; + case J2EEVersionConstants.WEB_2_4_ID : + return J2EEVersionConstants.J2EE_1_4_ID; + default : + return J2EEVersionConstants.J2EE_1_4_ID; + } + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (WEB_2_4_ID) : + super.setDoctypeValues(null, null); + break; + case (WEB_2_3_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + case (WEB_2_2_ID) : + super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version + */ + public void setJ2EEVersionID(int id) { + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + primSetVersionID(WEB_2_4_ID); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + primSetVersionID(WEB_2_3_ID); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + primSetVersionID(WEB_2_2_ID); + } + syncVersionOfRootObject(); + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return WEB_2_4_ID; + } + + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + WebApp app = getWebApp(); + if (app == null) + return; + + String version = app.getVersion(); + String newVersion = getModuleVersionString(); + if (!newVersion.equals(version)) + app.setVersion(newVersion); + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebResourceCollectionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebResourceCollectionImpl.java new file mode 100644 index 000000000..30fb86a8f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebResourceCollectionImpl.java @@ -0,0 +1,499 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + + +/** + * The web-resource-collection element is used to identify a subset of the resources and HTTP methods on those resources within a web application to which a security constraint applies. If no HTTP methods are specified, then the security constraint applies to all HTTP methods. + + */ +public class WebResourceCollectionImpl extends EObjectImpl implements WebResourceCollection, EObject { + + /** + * The default value of the '{@link #getWebResourceName() Web Resource Name}' attribute. + * + * + * @see #getWebResourceName() + * @generated + * @ordered + */ + protected static final String WEB_RESOURCE_NAME_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String webResourceName = WEB_RESOURCE_NAME_EDEFAULT; + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected String description = DESCRIPTION_EDEFAULT; + /** + * The cached value of the '{@link #getUrlPattern() Url Pattern}' attribute list. + * + * + * @see #getUrlPattern() + * @generated + * @ordered + */ + protected EList urlPattern = null; + + /** + * The cached value of the '{@link #getHttpMethod() Http Method}' attribute list. + * + * + * @see #getHttpMethod() + * @generated + * @ordered + */ + protected EList httpMethod = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList urLs = null; + /** + * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. + * + * + * @see #getDescriptions() + * @generated + * @ordered + */ + protected EList descriptions = null; + + /** + * The cached value of the '{@link #getHTTPs() HTT Ps}' containment reference list. + * + * + * @see #getHTTPs() + * @generated + * @ordered + */ + protected EList httPs = null; + + public WebResourceCollectionImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getWebResourceCollection(); + } + +/** + * addHTTP method comment. + */ +public void addHTTP(java.lang.String ahttpMethod) { + HTTPMethodType http = getFactory().createHTTPMethodType(); + http.setHttpMethod(ahttpMethod); + getHTTPs().add(http); +} +/** + * addURL method comment. + */ +public void addURL(java.lang.String aurlPattern) { + URLPatternType url = getFactory().createURLPatternType(); + url.setUrlPattern(aurlPattern); + getURLs().add(url); +} +public WebapplicationFactory getFactory() { + return ((WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI)).getWebapplicationFactory(); +} + /** + * @generated This field/method will be replaced during code generation + * The web-resource-name contains the name of this web resource collection + */ + public String getWebResourceName() { + return webResourceName; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebResourceName(String newWebResourceName) { + String oldWebResourceName = webResourceName; + webResourceName = newWebResourceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME, oldWebResourceName, webResourceName)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getDescription() { + return description; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * Added for 1.4 + * @generated + */ + public EList getUrlPattern() { + if (urlPattern == null) { + urlPattern = new EDataTypeEList(String.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN); + } + return urlPattern; + } + + /** + * + * + * Added for 1.4 + * @generated + */ + public EList getHttpMethod() { + if (httpMethod == null) { + httpMethod = new EDataTypeUniqueEList(HTTPMethodTypeEnum.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD); + } + return httpMethod; + } + + /** + * @generated This field/method will be replaced during code generation + */ + public SecurityConstraint getSecConstraint() { + if (eContainerFeatureID != WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT) return null; + return (SecurityConstraint)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setSecConstraint(SecurityConstraint newSecConstraint) { + if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT && newSecConstraint != null)) { + if (EcoreUtil.isAncestor(this, newSecConstraint)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newSecConstraint != null) + msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, SecurityConstraint.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); + } + + /** + * @generated This field/method will be replaced during code generation + * + * @since J2EE1.4 deprecated, use getUrlPattern() + * + * + */ + public EList getURLs() { + if (urLs == null) { + urLs = new EObjectContainmentWithInverseEList(URLPatternType.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION); + } + return urLs; + } + + /** + * + * + * @generated + */ + public EList getDescriptions() { + if (descriptions == null) { + descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS); + } + return descriptions; + } + + /** + * + * @since J2EE1.4 deprecated, use getHttpMethods() + * + * @generated + */ + public EList getHTTPs() { + if (httPs == null) { + httPs = new EObjectContainmentEList(HTTPMethodType.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS); + } + return httPs; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + return ((InternalEList)getURLs()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + return eBasicSetContainer(null, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + return ((InternalEList)getURLs()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: + return ((InternalEList)getHTTPs()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, SecurityConstraint.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: + return getWebResourceName(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: + return getDescription(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: + return getUrlPattern(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: + return getHttpMethod(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + return getSecConstraint(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + return getURLs(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: + return getDescriptions(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: + return getHTTPs(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: + return WEB_RESOURCE_NAME_EDEFAULT == null ? webResourceName != null : !WEB_RESOURCE_NAME_EDEFAULT.equals(webResourceName); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: + return urlPattern != null && !urlPattern.isEmpty(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: + return httpMethod != null && !httpMethod.isEmpty(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + return getSecConstraint() != null; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + return urLs != null && !urLs.isEmpty(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: + return httPs != null && !httPs.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: + setWebResourceName((String)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: + setDescription((String)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: + getUrlPattern().clear(); + getUrlPattern().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: + getHttpMethod().clear(); + getHttpMethod().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + getURLs().clear(); + getURLs().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: + getHTTPs().clear(); + getHTTPs().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: + setWebResourceName(WEB_RESOURCE_NAME_EDEFAULT); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: + getUrlPattern().clear(); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: + getHttpMethod().clear(); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: + setSecConstraint((SecurityConstraint)null); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: + getURLs().clear(); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: + getHTTPs().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (webResourceName: ");//$NON-NLS-1$ + result.append(webResourceName); + result.append(", description: ");//$NON-NLS-1$ + result.append(description); + result.append(", urlPattern: ");//$NON-NLS-1$ + result.append(urlPattern); + result.append(", httpMethod: ");//$NON-NLS-1$ + result.append(httpMethod); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebTypeImpl.java new file mode 100644 index 000000000..8862ead59 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebTypeImpl.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webapplication.WebType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; + +/** + * @generated + */ +public abstract class WebTypeImpl extends EObjectImpl implements WebType { + + public WebTypeImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getWebType(); + } + +/** + * isJspType method comment. + */ +public boolean isJspType() { + return false; +} +/** + * isServletType method comment. + */ +public boolean isServletType() { + return false; +} +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationFactoryImpl.java new file mode 100644 index 000000000..82f4460d9 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationFactoryImpl.java @@ -0,0 +1,402 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.DispatcherType; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.ResAuthServletType; +import org.eclipse.jst.j2ee.webapplication.RoleNameType; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + +/** + * @generated + */ +public class WebapplicationFactoryImpl extends EFactoryImpl implements WebapplicationFactory{ + + public static final String MM_VERSION = "1.1";//$NON-NLS-1$ + + public WebapplicationFactoryImpl() { + super(); + } + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case WebapplicationPackage.WEB_APP: return createWebApp(); + case WebapplicationPackage.CONTEXT_PARAM: return createContextParam(); + case WebapplicationPackage.SERVLET: return createServlet(); + case WebapplicationPackage.SERVLET_MAPPING: return createServletMapping(); + case WebapplicationPackage.SESSION_CONFIG: return createSessionConfig(); + case WebapplicationPackage.MIME_MAPPING: return createMimeMapping(); + case WebapplicationPackage.WELCOME_FILE_LIST: return createWelcomeFileList(); + case WebapplicationPackage.ERROR_PAGE: return createErrorPage(); + case WebapplicationPackage.TAG_LIB_REF: return createTagLibRef(); + case WebapplicationPackage.SECURITY_CONSTRAINT: return createSecurityConstraint(); + case WebapplicationPackage.WEB_RESOURCE_COLLECTION: return createWebResourceCollection(); + case WebapplicationPackage.AUTH_CONSTRAINT: return createAuthConstraint(); + case WebapplicationPackage.USER_DATA_CONSTRAINT: return createUserDataConstraint(); + case WebapplicationPackage.LOGIN_CONFIG: return createLoginConfig(); + case WebapplicationPackage.FORM_LOGIN_CONFIG: return createFormLoginConfig(); + case WebapplicationPackage.INIT_PARAM: return createInitParam(); + case WebapplicationPackage.SERVLET_TYPE: return createServletType(); + case WebapplicationPackage.JSP_TYPE: return createJSPType(); + case WebapplicationPackage.URL_PATTERN_TYPE: return createURLPatternType(); + case WebapplicationPackage.ROLE_NAME_TYPE: return createRoleNameType(); + case WebapplicationPackage.WELCOME_FILE: return createWelcomeFile(); + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE: return createExceptionTypeErrorPage(); + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE: return createErrorCodeErrorPage(); + case WebapplicationPackage.FILTER_MAPPING: return createFilterMapping(); + case WebapplicationPackage.FILTER: return createFilter(); + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST: return createLocalEncodingMappingList(); + case WebapplicationPackage.LOCAL_ENCODING_MAPPING: return createLocalEncodingMapping(); + case WebapplicationPackage.HTTP_METHOD_TYPE: return createHTTPMethodType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case WebapplicationPackage.RES_AUTH_SERVLET_TYPE: + return ResAuthServletType.get(initialValue); + case WebapplicationPackage.HTTP_METHOD_TYPE_ENUM: + return HTTPMethodTypeEnum.get(initialValue); + case WebapplicationPackage.TRANSPORT_GUARANTEE_TYPE: + return TransportGuaranteeType.get(initialValue); + case WebapplicationPackage.DISPATCHER_TYPE: + return DispatcherType.get(initialValue); + case WebapplicationPackage.AUTH_METHOD_KIND: + return AuthMethodKind.get(initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case WebapplicationPackage.RES_AUTH_SERVLET_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case WebapplicationPackage.HTTP_METHOD_TYPE_ENUM: + return instanceValue == null ? null : instanceValue.toString(); + case WebapplicationPackage.TRANSPORT_GUARANTEE_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case WebapplicationPackage.DISPATCHER_TYPE: + return instanceValue == null ? null : instanceValue.toString(); + case WebapplicationPackage.AUTH_METHOD_KIND: + return instanceValue == null ? null : instanceValue.toString(); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + +public static WebapplicationFactory getActiveFactory() { + return (WebapplicationFactory) getPackage().getEFactoryInstance(); +} + /** + * @generated This field/method will be replaced during code generation. + */ + public WebApp createWebApp() { + WebAppImpl webApp = new WebAppImpl(); + return webApp; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ContextParam createContextParam() { + ContextParamImpl contextParam = new ContextParamImpl(); + return contextParam; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ErrorPage createErrorPage() { + ErrorPageImpl errorPage = new ErrorPageImpl(); + return errorPage; + } + + /** + * + * + * @generated + */ + public TagLibRef createTagLibRef() { + TagLibRefImpl tagLibRef = new TagLibRefImpl(); + return tagLibRef; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ExceptionTypeErrorPage createExceptionTypeErrorPage() { + ExceptionTypeErrorPageImpl exceptionTypeErrorPage = new ExceptionTypeErrorPageImpl(); + return exceptionTypeErrorPage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ErrorCodeErrorPage createErrorCodeErrorPage() { + ErrorCodeErrorPageImpl errorCodeErrorPage = new ErrorCodeErrorPageImpl(); + return errorCodeErrorPage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WelcomeFileList createWelcomeFileList() { + WelcomeFileListImpl welcomeFileList = new WelcomeFileListImpl(); + return welcomeFileList; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WelcomeFile createWelcomeFile() { + WelcomeFileImpl welcomeFile = new WelcomeFileImpl(); + return welcomeFile; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public SecurityConstraint createSecurityConstraint() { + SecurityConstraintImpl securityConstraint = new SecurityConstraintImpl(); + return securityConstraint; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WebResourceCollection createWebResourceCollection() { + WebResourceCollectionImpl webResourceCollection = new WebResourceCollectionImpl(); + return webResourceCollection; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public URLPatternType createURLPatternType() { + URLPatternTypeImpl urlPatternType = new URLPatternTypeImpl(); + return urlPatternType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public AuthConstraint createAuthConstraint() { + AuthConstraintImpl authConstraint = new AuthConstraintImpl(); + return authConstraint; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public UserDataConstraint createUserDataConstraint() { + UserDataConstraintImpl userDataConstraint = new UserDataConstraintImpl(); + return userDataConstraint; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public LoginConfig createLoginConfig() { + LoginConfigImpl loginConfig = new LoginConfigImpl(); + return loginConfig; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public FormLoginConfig createFormLoginConfig() { + FormLoginConfigImpl formLoginConfig = new FormLoginConfigImpl(); + return formLoginConfig; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public MimeMapping createMimeMapping() { + MimeMappingImpl mimeMapping = new MimeMappingImpl(); + return mimeMapping; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public SessionConfig createSessionConfig() { + SessionConfigImpl sessionConfig = new SessionConfigImpl(); + return sessionConfig; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ServletMapping createServletMapping() { + ServletMappingImpl servletMapping = new ServletMappingImpl(); + return servletMapping; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Servlet createServlet() { + ServletImpl servlet = new ServletImpl(); + return servlet; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public ServletType createServletType() { + ServletTypeImpl servletType = new ServletTypeImpl(); + return servletType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public JSPType createJSPType() { + JSPTypeImpl jspType = new JSPTypeImpl(); + return jspType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public InitParam createInitParam() { + InitParamImpl initParam = new InitParamImpl(); + return initParam; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Filter createFilter() { + FilterImpl filter = new FilterImpl(); + return filter; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public FilterMapping createFilterMapping() { + FilterMappingImpl filterMapping = new FilterMappingImpl(); + return filterMapping; + } + + /** + * + * + * @generated + */ + public LocalEncodingMappingList createLocalEncodingMappingList() { + LocalEncodingMappingListImpl localEncodingMappingList = new LocalEncodingMappingListImpl(); + return localEncodingMappingList; + } + + /** + * + * + * @generated + */ + public LocalEncodingMapping createLocalEncodingMapping() { + LocalEncodingMappingImpl localEncodingMapping = new LocalEncodingMappingImpl(); + return localEncodingMapping; + } + + /** + * + * + * @generated + */ + public HTTPMethodType createHTTPMethodType() { + HTTPMethodTypeImpl httpMethodType = new HTTPMethodTypeImpl(); + return httpMethodType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public RoleNameType createRoleNameType() { + RoleNameTypeImpl roleNameType = new RoleNameTypeImpl(); + return roleNameType; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WebapplicationPackage getWebapplicationPackage() { + return (WebapplicationPackage)getEPackage(); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public static WebapplicationPackage getPackage() { + return WebapplicationPackage.eINSTANCE; + } +} + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationPackageImpl.java new file mode 100644 index 000000000..6e27cde8b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WebapplicationPackageImpl.java @@ -0,0 +1,1833 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.DispatcherType; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.ResAuthServletType; +import org.eclipse.jst.j2ee.webapplication.RoleNameType; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +public class WebapplicationPackageImpl extends EPackageImpl implements WebapplicationPackage, EPackage { + /** + * + * + * @generated + */ + private EClass webAppEClass = null; + + /** + * + * + * @generated + */ + private EClass contextParamEClass = null; + + /** + * + * + * @generated + */ + private EClass servletEClass = null; + + /** + * + * + * @generated + */ + private EClass servletMappingEClass = null; + + /** + * + * + * @generated + */ + private EClass sessionConfigEClass = null; + + /** + * + * + * @generated + */ + private EClass mimeMappingEClass = null; + + /** + * + * + * @generated + */ + private EClass welcomeFileListEClass = null; + + /** + * + * + * @generated + */ + private EClass errorPageEClass = null; + + /** + * + * + * @generated + */ + private EClass tagLibRefEClass = null; + + /** + * + * + * @generated + */ + private EClass securityConstraintEClass = null; + + /** + * + * + * @generated + */ + private EClass webResourceCollectionEClass = null; + + /** + * + * + * @generated + */ + private EClass authConstraintEClass = null; + + /** + * + * + * @generated + */ + private EClass userDataConstraintEClass = null; + + /** + * + * + * @generated + */ + private EClass loginConfigEClass = null; + + /** + * + * + * @generated + */ + private EClass formLoginConfigEClass = null; + + /** + * + * + * @generated + */ + private EClass initParamEClass = null; + + /** + * + * + * @generated + */ + private EClass webTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass servletTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass jspTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass urlPatternTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass roleNameTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass welcomeFileEClass = null; + + /** + * + * + * @generated + */ + private EClass exceptionTypeErrorPageEClass = null; + + /** + * + * + * @generated + */ + private EClass errorCodeErrorPageEClass = null; + + /** + * + * + * @generated + */ + private EClass filterMappingEClass = null; + + /** + * + * + * @generated + */ + private EClass filterEClass = null; + + /** + * + * + * @generated + */ + private EClass localEncodingMappingListEClass = null; + + /** + * + * + * @generated + */ + private EClass localEncodingMappingEClass = null; + + /** + * + * + * @generated + */ + private EClass httpMethodTypeEClass = null; + + /** + * + * + * @generated + */ + private EEnum resAuthServletTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum httpMethodTypeEnumEEnum = null; + + /** + * + * + * @generated + */ + private EEnum transportGuaranteeTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum dispatcherTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum authMethodKindEEnum = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + private WebapplicationPackageImpl() { + super(eNS_URI, WebapplicationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * @generated This field/method will be replaced during code generation. + */ + public static WebapplicationPackage init() { + if (isInited) return (WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); + + // Obtain or create and register package. + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WebapplicationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + + // Step 1: create meta-model objects + theWebapplicationPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theWebapplicationPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theWebapplicationPackage; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWebApp() { + return webAppEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getWebApp_Distributable() { + return (EAttribute)webAppEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getWebApp_Version() { + return (EAttribute)webAppEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_Contexts() { + return (EReference)webAppEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_ErrorPages() { + return (EReference)webAppEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_FileList() { + return (EReference)webAppEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_TagLibs() { + return (EReference)webAppEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_Constraints() { + return (EReference)webAppEClass.getEStructuralFeatures().get(6); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_LoginConfig() { + return (EReference)webAppEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_MimeMappings() { + return (EReference)webAppEClass.getEStructuralFeatures().get(8); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_SessionConfig() { + return (EReference)webAppEClass.getEStructuralFeatures().get(9); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_ServletMappings() { + return (EReference)webAppEClass.getEStructuralFeatures().get(10); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_Servlets() { + return (EReference)webAppEClass.getEStructuralFeatures().get(11); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_SecurityRoles() { + return (EReference)webAppEClass.getEStructuralFeatures().get(12); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_Filters() { + return (EReference)webAppEClass.getEStructuralFeatures().get(13); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_FilterMappings() { + return (EReference)webAppEClass.getEStructuralFeatures().get(14); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebApp_Listeners() { + return (EReference)webAppEClass.getEStructuralFeatures().get(15); + } + + /** + * + * + * @generated + */ + public EReference getWebApp_ContextParams() { + return (EReference)webAppEClass.getEStructuralFeatures().get(16); + } + + /** + * + * + * @generated + */ + public EReference getWebApp_JspConfig() { + return (EReference)webAppEClass.getEStructuralFeatures().get(17); + } + + /** + * + * + * @generated + */ + public EReference getWebApp_MessageDestinations() { + return (EReference)webAppEClass.getEStructuralFeatures().get(18); + } + + /** + * + * + * @generated + */ + public EReference getWebApp_LocalEncodingMappingList() { + return (EReference)webAppEClass.getEStructuralFeatures().get(19); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getContextParam() { + return contextParamEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getContextParam_ParamName() { + return (EAttribute)contextParamEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getContextParam_ParamValue() { + return (EAttribute)contextParamEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getContextParam_Description() { + return (EAttribute)contextParamEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getContextParam_WebApp() { + return (EReference)contextParamEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getErrorPage() { + return errorPageEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getErrorPage_Location() { + return (EAttribute)errorPageEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getErrorPage_WebApp() { + return (EReference)errorPageEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getExceptionTypeErrorPage() { + return exceptionTypeErrorPageEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getExceptionTypeErrorPage_ExceptionType() { + return (EReference)exceptionTypeErrorPageEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getErrorCodeErrorPage() { + return errorCodeErrorPageEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getErrorCodeErrorPage_ErrorCode() { + return (EAttribute)errorCodeErrorPageEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWelcomeFileList() { + return welcomeFileListEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWelcomeFileList_WebApp() { + return (EReference)welcomeFileListEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWelcomeFileList_File() { + return (EReference)welcomeFileListEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWelcomeFile() { + return welcomeFileEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getWelcomeFile_WelcomeFile() { + return (EAttribute)welcomeFileEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWelcomeFile_FileList() { + return (EReference)welcomeFileEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getTagLibRef() { + return tagLibRefEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLibRef_TaglibURI() { + return (EAttribute)tagLibRefEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getTagLibRef_TaglibLocation() { + return (EAttribute)tagLibRefEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getTagLibRef_WebApp() { + return (EReference)tagLibRefEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSecurityConstraint() { + return securityConstraintEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSecurityConstraint_DisplayName() { + return (EAttribute)securityConstraintEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getSecurityConstraint_WebApp() { + return (EReference)securityConstraintEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getSecurityConstraint_WebResourceCollections() { + return (EReference)securityConstraintEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getSecurityConstraint_AuthConstraint() { + return (EReference)securityConstraintEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getSecurityConstraint_UserDataConstraint() { + return (EReference)securityConstraintEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getSecurityConstraint_DisplayNames() { + return (EReference)securityConstraintEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWebResourceCollection() { + return webResourceCollectionEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getWebResourceCollection_WebResourceName() { + return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getWebResourceCollection_Description() { + return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getWebResourceCollection_UrlPattern() { + return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getWebResourceCollection_HttpMethod() { + return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebResourceCollection_SecConstraint() { + return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getWebResourceCollection_URLs() { + return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getWebResourceCollection_Descriptions() { + return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getWebResourceCollection_HTTPs() { + return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getURLPatternType() { + return urlPatternTypeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getURLPatternType_UrlPattern() { + return (EAttribute)urlPatternTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getURLPatternType_ResCollection() { + return (EReference)urlPatternTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getHTTPMethodType() { + return httpMethodTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHTTPMethodType_HttpMethod() { + return (EAttribute)httpMethodTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getAuthConstraint() { + return authConstraintEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthConstraint_Description() { + return (EAttribute)authConstraintEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getAuthConstraint_Roles() { + return (EAttribute)authConstraintEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getAuthConstraint_SecConstraint() { + return (EReference)authConstraintEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getAuthConstraint_Descriptions() { + return (EReference)authConstraintEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getUserDataConstraint() { + return userDataConstraintEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getUserDataConstraint_Description() { + return (EAttribute)userDataConstraintEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getUserDataConstraint_TransportGuarantee() { + return (EAttribute)userDataConstraintEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getUserDataConstraint_SecConstraint() { + return (EReference)userDataConstraintEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getUserDataConstraint_Descriptions() { + return (EReference)userDataConstraintEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getLoginConfig() { + return loginConfigEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getLoginConfig_AuthMethod() { + return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getLoginConfig_RealmName() { + return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLoginConfig_AuthorizationMethod() { + return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getLoginConfig_WebApp() { + return (EReference)loginConfigEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getLoginConfig_FormLoginConfig() { + return (EReference)loginConfigEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getFormLoginConfig() { + return formLoginConfigEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getFormLoginConfig_FormLoginPage() { + return (EAttribute)formLoginConfigEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getFormLoginConfig_FormErrorPage() { + return (EAttribute)formLoginConfigEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getFormLoginConfig_LoginConfig() { + return (EReference)formLoginConfigEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getMimeMapping() { + return mimeMappingEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMimeMapping_Extension() { + return (EAttribute)mimeMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getMimeMapping_MimeType() { + return (EAttribute)mimeMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getMimeMapping_WebApp() { + return (EReference)mimeMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getSessionConfig() { + return sessionConfigEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getSessionConfig_SessionTimeout() { + return (EAttribute)sessionConfigEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getSessionConfig_WebApp() { + return (EReference)sessionConfigEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getServletMapping() { + return servletMappingEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getServletMapping_UrlPattern() { + return (EAttribute)servletMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getServletMapping_Name() { + return (EAttribute)servletMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServletMapping_WebApp() { + return (EReference)servletMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServletMapping_Servlet() { + return (EReference)servletMappingEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getServlet() { + return servletEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getServlet_ServletName() { + return (EAttribute)servletEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getServlet_LoadOnStartup() { + return (EAttribute)servletEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServlet_WebApp() { + return (EReference)servletEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServlet_WebType() { + return (EReference)servletEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServlet_Params() { + return (EReference)servletEClass.getEStructuralFeatures().get(4); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServlet_SecurityRoleRefs() { + return (EReference)servletEClass.getEStructuralFeatures().get(5); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getServlet_RunAs() { + return (EReference)servletEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getServlet_InitParams() { + return (EReference)servletEClass.getEStructuralFeatures().get(7); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getWebType() { + return webTypeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getServletType() { + return servletTypeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getServletType_ClassName() { + return (EAttribute)servletTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getJSPType() { + return jspTypeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getJSPType_JspFile() { + return (EAttribute)jspTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getInitParam() { + return initParamEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getInitParam_ParamName() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getInitParam_ParamValue() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getInitParam_Description() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getFilter() { + return filterEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getFilter_Name() { + return (EAttribute)filterEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getFilter_InitParams() { + return (EReference)filterEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getFilter_FilterClass() { + return (EReference)filterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getFilter_InitParamValues() { + return (EReference)filterEClass.getEStructuralFeatures().get(3); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getFilterMapping() { + return filterMappingEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getFilterMapping_UrlPattern() { + return (EAttribute)filterMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFilterMapping_DispatcherType() { + return (EAttribute)filterMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getFilterMapping_Filter() { + return (EReference)filterMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EReference getFilterMapping_Servlet() { + return (EReference)filterMappingEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getLocalEncodingMappingList() { + return localEncodingMappingListEClass; + } + + /** + * + * + * @generated + */ + public EReference getLocalEncodingMappingList_LocalEncodingMappings() { + return (EReference)localEncodingMappingListEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLocalEncodingMapping() { + return localEncodingMappingEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLocalEncodingMapping_Locale() { + return (EAttribute)localEncodingMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLocalEncodingMapping_Encoding() { + return (EAttribute)localEncodingMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getResAuthServletType() { + return resAuthServletTypeEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getHTTPMethodTypeEnum() { + return httpMethodTypeEnumEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EClass getRoleNameType() { + return roleNameTypeEClass; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EAttribute getRoleNameType_RoleName() { + return (EAttribute)roleNameTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public EEnum getTransportGuaranteeType() { + return transportGuaranteeTypeEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getDispatcherType() { + return dispatcherTypeEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getAuthMethodKind() { + return authMethodKindEEnum; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public WebapplicationFactory getWebapplicationFactory() { + return (WebapplicationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + webAppEClass = createEClass(WEB_APP); + createEAttribute(webAppEClass, WEB_APP__DISTRIBUTABLE); + createEAttribute(webAppEClass, WEB_APP__VERSION); + createEReference(webAppEClass, WEB_APP__CONTEXTS); + createEReference(webAppEClass, WEB_APP__ERROR_PAGES); + createEReference(webAppEClass, WEB_APP__FILE_LIST); + createEReference(webAppEClass, WEB_APP__TAG_LIBS); + createEReference(webAppEClass, WEB_APP__CONSTRAINTS); + createEReference(webAppEClass, WEB_APP__LOGIN_CONFIG); + createEReference(webAppEClass, WEB_APP__MIME_MAPPINGS); + createEReference(webAppEClass, WEB_APP__SESSION_CONFIG); + createEReference(webAppEClass, WEB_APP__SERVLET_MAPPINGS); + createEReference(webAppEClass, WEB_APP__SERVLETS); + createEReference(webAppEClass, WEB_APP__SECURITY_ROLES); + createEReference(webAppEClass, WEB_APP__FILTERS); + createEReference(webAppEClass, WEB_APP__FILTER_MAPPINGS); + createEReference(webAppEClass, WEB_APP__LISTENERS); + createEReference(webAppEClass, WEB_APP__CONTEXT_PARAMS); + createEReference(webAppEClass, WEB_APP__JSP_CONFIG); + createEReference(webAppEClass, WEB_APP__MESSAGE_DESTINATIONS); + createEReference(webAppEClass, WEB_APP__LOCAL_ENCODING_MAPPING_LIST); + + contextParamEClass = createEClass(CONTEXT_PARAM); + createEAttribute(contextParamEClass, CONTEXT_PARAM__PARAM_NAME); + createEAttribute(contextParamEClass, CONTEXT_PARAM__PARAM_VALUE); + createEAttribute(contextParamEClass, CONTEXT_PARAM__DESCRIPTION); + createEReference(contextParamEClass, CONTEXT_PARAM__WEB_APP); + + servletEClass = createEClass(SERVLET); + createEAttribute(servletEClass, SERVLET__SERVLET_NAME); + createEAttribute(servletEClass, SERVLET__LOAD_ON_STARTUP); + createEReference(servletEClass, SERVLET__WEB_APP); + createEReference(servletEClass, SERVLET__WEB_TYPE); + createEReference(servletEClass, SERVLET__PARAMS); + createEReference(servletEClass, SERVLET__SECURITY_ROLE_REFS); + createEReference(servletEClass, SERVLET__RUN_AS); + createEReference(servletEClass, SERVLET__INIT_PARAMS); + + servletMappingEClass = createEClass(SERVLET_MAPPING); + createEAttribute(servletMappingEClass, SERVLET_MAPPING__URL_PATTERN); + createEAttribute(servletMappingEClass, SERVLET_MAPPING__NAME); + createEReference(servletMappingEClass, SERVLET_MAPPING__WEB_APP); + createEReference(servletMappingEClass, SERVLET_MAPPING__SERVLET); + + sessionConfigEClass = createEClass(SESSION_CONFIG); + createEAttribute(sessionConfigEClass, SESSION_CONFIG__SESSION_TIMEOUT); + createEReference(sessionConfigEClass, SESSION_CONFIG__WEB_APP); + + mimeMappingEClass = createEClass(MIME_MAPPING); + createEAttribute(mimeMappingEClass, MIME_MAPPING__EXTENSION); + createEAttribute(mimeMappingEClass, MIME_MAPPING__MIME_TYPE); + createEReference(mimeMappingEClass, MIME_MAPPING__WEB_APP); + + welcomeFileListEClass = createEClass(WELCOME_FILE_LIST); + createEReference(welcomeFileListEClass, WELCOME_FILE_LIST__WEB_APP); + createEReference(welcomeFileListEClass, WELCOME_FILE_LIST__FILE); + + errorPageEClass = createEClass(ERROR_PAGE); + createEAttribute(errorPageEClass, ERROR_PAGE__LOCATION); + createEReference(errorPageEClass, ERROR_PAGE__WEB_APP); + + tagLibRefEClass = createEClass(TAG_LIB_REF); + createEAttribute(tagLibRefEClass, TAG_LIB_REF__TAGLIB_URI); + createEAttribute(tagLibRefEClass, TAG_LIB_REF__TAGLIB_LOCATION); + createEReference(tagLibRefEClass, TAG_LIB_REF__WEB_APP); + + securityConstraintEClass = createEClass(SECURITY_CONSTRAINT); + createEAttribute(securityConstraintEClass, SECURITY_CONSTRAINT__DISPLAY_NAME); + createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__WEB_APP); + createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS); + createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__AUTH_CONSTRAINT); + createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT); + createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__DISPLAY_NAMES); + + webResourceCollectionEClass = createEClass(WEB_RESOURCE_COLLECTION); + createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME); + createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__DESCRIPTION); + createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__URL_PATTERN); + createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__HTTP_METHOD); + createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT); + createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__UR_LS); + createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__DESCRIPTIONS); + createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__HTT_PS); + + authConstraintEClass = createEClass(AUTH_CONSTRAINT); + createEAttribute(authConstraintEClass, AUTH_CONSTRAINT__DESCRIPTION); + createEAttribute(authConstraintEClass, AUTH_CONSTRAINT__ROLES); + createEReference(authConstraintEClass, AUTH_CONSTRAINT__SEC_CONSTRAINT); + createEReference(authConstraintEClass, AUTH_CONSTRAINT__DESCRIPTIONS); + + userDataConstraintEClass = createEClass(USER_DATA_CONSTRAINT); + createEAttribute(userDataConstraintEClass, USER_DATA_CONSTRAINT__DESCRIPTION); + createEAttribute(userDataConstraintEClass, USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE); + createEReference(userDataConstraintEClass, USER_DATA_CONSTRAINT__SEC_CONSTRAINT); + createEReference(userDataConstraintEClass, USER_DATA_CONSTRAINT__DESCRIPTIONS); + + loginConfigEClass = createEClass(LOGIN_CONFIG); + createEAttribute(loginConfigEClass, LOGIN_CONFIG__AUTH_METHOD); + createEAttribute(loginConfigEClass, LOGIN_CONFIG__REALM_NAME); + createEAttribute(loginConfigEClass, LOGIN_CONFIG__AUTHORIZATION_METHOD); + createEReference(loginConfigEClass, LOGIN_CONFIG__WEB_APP); + createEReference(loginConfigEClass, LOGIN_CONFIG__FORM_LOGIN_CONFIG); + + formLoginConfigEClass = createEClass(FORM_LOGIN_CONFIG); + createEAttribute(formLoginConfigEClass, FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE); + createEAttribute(formLoginConfigEClass, FORM_LOGIN_CONFIG__FORM_ERROR_PAGE); + createEReference(formLoginConfigEClass, FORM_LOGIN_CONFIG__LOGIN_CONFIG); + + initParamEClass = createEClass(INIT_PARAM); + createEAttribute(initParamEClass, INIT_PARAM__PARAM_NAME); + createEAttribute(initParamEClass, INIT_PARAM__PARAM_VALUE); + createEAttribute(initParamEClass, INIT_PARAM__DESCRIPTION); + + webTypeEClass = createEClass(WEB_TYPE); + + servletTypeEClass = createEClass(SERVLET_TYPE); + createEAttribute(servletTypeEClass, SERVLET_TYPE__CLASS_NAME); + + jspTypeEClass = createEClass(JSP_TYPE); + createEAttribute(jspTypeEClass, JSP_TYPE__JSP_FILE); + + urlPatternTypeEClass = createEClass(URL_PATTERN_TYPE); + createEAttribute(urlPatternTypeEClass, URL_PATTERN_TYPE__URL_PATTERN); + createEReference(urlPatternTypeEClass, URL_PATTERN_TYPE__RES_COLLECTION); + + roleNameTypeEClass = createEClass(ROLE_NAME_TYPE); + createEAttribute(roleNameTypeEClass, ROLE_NAME_TYPE__ROLE_NAME); + + welcomeFileEClass = createEClass(WELCOME_FILE); + createEAttribute(welcomeFileEClass, WELCOME_FILE__WELCOME_FILE); + createEReference(welcomeFileEClass, WELCOME_FILE__FILE_LIST); + + exceptionTypeErrorPageEClass = createEClass(EXCEPTION_TYPE_ERROR_PAGE); + createEReference(exceptionTypeErrorPageEClass, EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE); + + errorCodeErrorPageEClass = createEClass(ERROR_CODE_ERROR_PAGE); + createEAttribute(errorCodeErrorPageEClass, ERROR_CODE_ERROR_PAGE__ERROR_CODE); + + filterMappingEClass = createEClass(FILTER_MAPPING); + createEAttribute(filterMappingEClass, FILTER_MAPPING__URL_PATTERN); + createEAttribute(filterMappingEClass, FILTER_MAPPING__DISPATCHER_TYPE); + createEReference(filterMappingEClass, FILTER_MAPPING__FILTER); + createEReference(filterMappingEClass, FILTER_MAPPING__SERVLET); + + filterEClass = createEClass(FILTER); + createEAttribute(filterEClass, FILTER__NAME); + createEReference(filterEClass, FILTER__INIT_PARAMS); + createEReference(filterEClass, FILTER__FILTER_CLASS); + createEReference(filterEClass, FILTER__INIT_PARAM_VALUES); + + localEncodingMappingListEClass = createEClass(LOCAL_ENCODING_MAPPING_LIST); + createEReference(localEncodingMappingListEClass, LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS); + + localEncodingMappingEClass = createEClass(LOCAL_ENCODING_MAPPING); + createEAttribute(localEncodingMappingEClass, LOCAL_ENCODING_MAPPING__LOCALE); + createEAttribute(localEncodingMappingEClass, LOCAL_ENCODING_MAPPING__ENCODING); + + httpMethodTypeEClass = createEClass(HTTP_METHOD_TYPE); + createEAttribute(httpMethodTypeEClass, HTTP_METHOD_TYPE__HTTP_METHOD); + + // Create enums + resAuthServletTypeEEnum = createEEnum(RES_AUTH_SERVLET_TYPE); + httpMethodTypeEnumEEnum = createEEnum(HTTP_METHOD_TYPE_ENUM); + transportGuaranteeTypeEEnum = createEEnum(TRANSPORT_GUARANTEE_TYPE); + dispatcherTypeEEnum = createEEnum(DISPATCHER_TYPE); + authMethodKindEEnum = createEEnum(AUTH_METHOD_KIND); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + JspPackageImpl theJspPackage = (JspPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI); + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + + // Add supertypes to classes + webAppEClass.getESuperTypes().add(theCommonPackage.getJNDIEnvRefsGroup()); + servletEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + servletTypeEClass.getESuperTypes().add(this.getWebType()); + jspTypeEClass.getESuperTypes().add(this.getWebType()); + exceptionTypeErrorPageEClass.getESuperTypes().add(this.getErrorPage()); + errorCodeErrorPageEClass.getESuperTypes().add(this.getErrorPage()); + filterEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(webAppEClass, WebApp.class, "WebApp", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getWebApp_Distributable(), ecorePackage.getEBoolean(), "distributable", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebApp_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_Contexts(), this.getContextParam(), this.getContextParam_WebApp(), "contexts", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_ErrorPages(), this.getErrorPage(), this.getErrorPage_WebApp(), "errorPages", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_FileList(), this.getWelcomeFileList(), this.getWelcomeFileList_WebApp(), "fileList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_TagLibs(), this.getTagLibRef(), this.getTagLibRef_WebApp(), "tagLibs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_Constraints(), this.getSecurityConstraint(), this.getSecurityConstraint_WebApp(), "constraints", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_LoginConfig(), this.getLoginConfig(), this.getLoginConfig_WebApp(), "loginConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_MimeMappings(), this.getMimeMapping(), this.getMimeMapping_WebApp(), "mimeMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_SessionConfig(), this.getSessionConfig(), this.getSessionConfig_WebApp(), "sessionConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_ServletMappings(), this.getServletMapping(), this.getServletMapping_WebApp(), "servletMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_Servlets(), this.getServlet(), this.getServlet_WebApp(), "servlets", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_Filters(), this.getFilter(), null, "filters", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_FilterMappings(), this.getFilterMapping(), null, "filterMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_Listeners(), theCommonPackage.getListener(), null, "listeners", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_ContextParams(), theCommonPackage.getParamValue(), null, "contextParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_JspConfig(), theJspPackage.getJSPConfig(), null, "jspConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebApp_LocalEncodingMappingList(), this.getLocalEncodingMappingList(), null, "localEncodingMappingList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(contextParamEClass, ContextParam.class, "ContextParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getContextParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getContextParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getContextParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getContextParam_WebApp(), this.getWebApp(), this.getWebApp_Contexts(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(servletEClass, Servlet.class, "Servlet", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getServlet_ServletName(), ecorePackage.getEString(), "servletName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getServlet_LoadOnStartup(), ecorePackage.getEIntegerObject(), "loadOnStartup", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_WebApp(), this.getWebApp(), this.getWebApp_Servlets(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_WebType(), this.getWebType(), null, "webType", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_Params(), this.getInitParam(), null, "params", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_SecurityRoleRefs(), theCommonPackage.getSecurityRoleRef(), null, "securityRoleRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_RunAs(), theCommonPackage.getRunAsSpecifiedIdentity(), null, "runAs", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServlet_InitParams(), theCommonPackage.getParamValue(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(servletMappingEClass, ServletMapping.class, "ServletMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getServletMapping_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getServletMapping_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServletMapping_WebApp(), this.getWebApp(), this.getWebApp_ServletMappings(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServletMapping_Servlet(), this.getServlet(), null, "servlet", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(sessionConfigEClass, SessionConfig.class, "SessionConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getSessionConfig_SessionTimeout(), ecorePackage.getEInt(), "sessionTimeout", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSessionConfig_WebApp(), this.getWebApp(), this.getWebApp_SessionConfig(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(mimeMappingEClass, MimeMapping.class, "MimeMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getMimeMapping_Extension(), ecorePackage.getEString(), "extension", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getMimeMapping_MimeType(), ecorePackage.getEString(), "mimeType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getMimeMapping_WebApp(), this.getWebApp(), this.getWebApp_MimeMappings(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(welcomeFileListEClass, WelcomeFileList.class, "WelcomeFileList", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getWelcomeFileList_WebApp(), this.getWebApp(), this.getWebApp_FileList(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWelcomeFileList_File(), this.getWelcomeFile(), this.getWelcomeFile_FileList(), "file", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(errorPageEClass, ErrorPage.class, "ErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getErrorPage_Location(), ecorePackage.getEString(), "location", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getErrorPage_WebApp(), this.getWebApp(), this.getWebApp_ErrorPages(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(tagLibRefEClass, TagLibRef.class, "TagLibRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getTagLibRef_TaglibURI(), ecorePackage.getEString(), "taglibURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getTagLibRef_TaglibLocation(), ecorePackage.getEString(), "taglibLocation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getTagLibRef_WebApp(), this.getWebApp(), this.getWebApp_TagLibs(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(securityConstraintEClass, SecurityConstraint.class, "SecurityConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getSecurityConstraint_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityConstraint_WebApp(), this.getWebApp(), this.getWebApp_Constraints(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityConstraint_WebResourceCollections(), this.getWebResourceCollection(), this.getWebResourceCollection_SecConstraint(), "webResourceCollections", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityConstraint_AuthConstraint(), this.getAuthConstraint(), this.getAuthConstraint_SecConstraint(), "authConstraint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityConstraint_UserDataConstraint(), this.getUserDataConstraint(), this.getUserDataConstraint_SecConstraint(), "userDataConstraint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getSecurityConstraint_DisplayNames(), theCommonPackage.getDisplayName(), null, "displayNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(webResourceCollectionEClass, WebResourceCollection.class, "WebResourceCollection", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getWebResourceCollection_WebResourceName(), ecorePackage.getEString(), "webResourceName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebResourceCollection_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebResourceCollection_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebResourceCollection_HttpMethod(), this.getHTTPMethodTypeEnum(), "httpMethod", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebResourceCollection_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_WebResourceCollections(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebResourceCollection_URLs(), this.getURLPatternType(), this.getURLPatternType_ResCollection(), "URLs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebResourceCollection_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebResourceCollection_HTTPs(), this.getHTTPMethodType(), null, "HTTPs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(authConstraintEClass, AuthConstraint.class, "AuthConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getAuthConstraint_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getAuthConstraint_Roles(), ecorePackage.getEString(), "roles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getAuthConstraint_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_AuthConstraint(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getAuthConstraint_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(userDataConstraintEClass, UserDataConstraint.class, "UserDataConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getUserDataConstraint_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getUserDataConstraint_TransportGuarantee(), this.getTransportGuaranteeType(), "transportGuarantee", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getUserDataConstraint_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_UserDataConstraint(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getUserDataConstraint_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(loginConfigEClass, LoginConfig.class, "LoginConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getLoginConfig_AuthMethod(), this.getAuthMethodKind(), "authMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getLoginConfig_RealmName(), ecorePackage.getEString(), "realmName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getLoginConfig_AuthorizationMethod(), ecorePackage.getEString(), "authorizationMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getLoginConfig_WebApp(), this.getWebApp(), this.getWebApp_LoginConfig(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getLoginConfig_FormLoginConfig(), this.getFormLoginConfig(), this.getFormLoginConfig_LoginConfig(), "formLoginConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(formLoginConfigEClass, FormLoginConfig.class, "FormLoginConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getFormLoginConfig_FormLoginPage(), ecorePackage.getEString(), "formLoginPage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getFormLoginConfig_FormErrorPage(), ecorePackage.getEString(), "formErrorPage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFormLoginConfig_LoginConfig(), this.getLoginConfig(), this.getLoginConfig_FormLoginConfig(), "loginConfig", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(initParamEClass, InitParam.class, "InitParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getInitParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getInitParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getInitParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(webTypeEClass, WebType.class, "WebType", IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + initEClass(servletTypeEClass, ServletType.class, "ServletType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getServletType_ClassName(), ecorePackage.getEString(), "className", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(jspTypeEClass, JSPType.class, "JSPType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getJSPType_JspFile(), ecorePackage.getEString(), "jspFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(urlPatternTypeEClass, URLPatternType.class, "URLPatternType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getURLPatternType_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getURLPatternType_ResCollection(), this.getWebResourceCollection(), this.getWebResourceCollection_URLs(), "resCollection", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(roleNameTypeEClass, RoleNameType.class, "RoleNameType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getRoleNameType_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(welcomeFileEClass, WelcomeFile.class, "WelcomeFile", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getWelcomeFile_WelcomeFile(), ecorePackage.getEString(), "welcomeFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWelcomeFile_FileList(), this.getWelcomeFileList(), this.getWelcomeFileList_File(), "fileList", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(exceptionTypeErrorPageEClass, ExceptionTypeErrorPage.class, "ExceptionTypeErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getExceptionTypeErrorPage_ExceptionType(), theJavaRefPackage.getJavaClass(), null, "exceptionType", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(errorCodeErrorPageEClass, ErrorCodeErrorPage.class, "ErrorCodeErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getErrorCodeErrorPage_ErrorCode(), ecorePackage.getEString(), "errorCode", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(filterMappingEClass, FilterMapping.class, "FilterMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getFilterMapping_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getFilterMapping_DispatcherType(), this.getDispatcherType(), "dispatcherType", null, 0, 4, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFilterMapping_Filter(), this.getFilter(), null, "filter", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFilterMapping_Servlet(), this.getServlet(), null, "servlet", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(filterEClass, Filter.class, "Filter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getFilter_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFilter_InitParams(), this.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFilter_FilterClass(), theJavaRefPackage.getJavaClass(), null, "filterClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getFilter_InitParamValues(), theCommonPackage.getParamValue(), null, "initParamValues", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(localEncodingMappingListEClass, LocalEncodingMappingList.class, "LocalEncodingMappingList", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getLocalEncodingMappingList_LocalEncodingMappings(), this.getLocalEncodingMapping(), null, "localEncodingMappings", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(localEncodingMappingEClass, LocalEncodingMapping.class, "LocalEncodingMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getLocalEncodingMapping_Locale(), ecorePackage.getEString(), "locale", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getLocalEncodingMapping_Encoding(), ecorePackage.getEString(), "encoding", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(httpMethodTypeEClass, HTTPMethodType.class, "HTTPMethodType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getHTTPMethodType_HttpMethod(), ecorePackage.getEString(), "httpMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(resAuthServletTypeEEnum, ResAuthServletType.class, "ResAuthServletType");//$NON-NLS-1$ + addEEnumLiteral(resAuthServletTypeEEnum, ResAuthServletType.CONTAINER_LITERAL); + addEEnumLiteral(resAuthServletTypeEEnum, ResAuthServletType.SERVLET_LITERAL); + + initEEnum(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.class, "HTTPMethodTypeEnum");//$NON-NLS-1$ + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.GET_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.POST_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.PUT_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.DELETE_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.HEAD_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.OPTIONS_LITERAL); + addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.TRACE_LITERAL); + + initEEnum(transportGuaranteeTypeEEnum, TransportGuaranteeType.class, "TransportGuaranteeType");//$NON-NLS-1$ + addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.NONE_LITERAL); + addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.INTEGRAL_LITERAL); + addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.CONFIDENTIAL_LITERAL); + + initEEnum(dispatcherTypeEEnum, DispatcherType.class, "DispatcherType");//$NON-NLS-1$ + addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.FORWARD_LITERAL); + addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.INCLUDE_LITERAL); + addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.REQUEST_LITERAL); + addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.ERROR_LITERAL); + + initEEnum(authMethodKindEEnum, AuthMethodKind.class, "AuthMethodKind");//$NON-NLS-1$ + addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.UNSPECIFIED_LITERAL); + addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.BASIC_LITERAL); + addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.DIGEST_LITERAL); + addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.FORM_LITERAL); + addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.CLIENT_CERT_LITERAL); + + // Create resource + createResource(eNS_URI); + } +} //WebapplicationPackageImpl + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileImpl.java new file mode 100644 index 000000000..42c8bd8ce --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileImpl.java @@ -0,0 +1,245 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + +/** + * The welcome-file element contains file name to use as a default welcome file, such as index.html + + */ +public class WelcomeFileImpl extends EObjectImpl implements WelcomeFile, EObject { + + /** + * The default value of the '{@link #getWelcomeFile() Welcome File}' attribute. + * + * + * @see #getWelcomeFile() + * @generated + * @ordered + */ + protected static final String WELCOME_FILE_EDEFAULT = null; + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected String welcomeFile = WELCOME_FILE_EDEFAULT; + public WelcomeFileImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getWelcomeFile(); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public String getWelcomeFile() { + return welcomeFile; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWelcomeFile(String newWelcomeFile) { + String oldWelcomeFile = welcomeFile; + welcomeFile = newWelcomeFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE__WELCOME_FILE, oldWelcomeFile, welcomeFile)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public WelcomeFileList getFileList() { + if (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE__FILE_LIST) return null; + return (WelcomeFileList)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setFileList(WelcomeFileList newFileList) { + if (newFileList != eContainer || (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE__FILE_LIST && newFileList != null)) { + if (EcoreUtil.isAncestor(this, newFileList)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newFileList != null) + msgs = ((InternalEObject)newFileList).eInverseAdd(this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WelcomeFileList.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newFileList, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE__FILE_LIST, newFileList, newFileList)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + return eBasicSetContainer(null, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + return eContainer.eInverseRemove(this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WelcomeFileList.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: + return getWelcomeFile(); + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + return getFileList(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: + return WELCOME_FILE_EDEFAULT == null ? welcomeFile != null : !WELCOME_FILE_EDEFAULT.equals(welcomeFile); + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + return getFileList() != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: + setWelcomeFile((String)newValue); + return; + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + setFileList((WelcomeFileList)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: + setWelcomeFile(WELCOME_FILE_EDEFAULT); + return; + case WebapplicationPackage.WELCOME_FILE__FILE_LIST: + setFileList((WelcomeFileList)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (welcomeFile: ");//$NON-NLS-1$ + result.append(welcomeFile); + result.append(')'); + return result.toString(); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileListImpl.java new file mode 100644 index 000000000..154489587 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/impl/WelcomeFileListImpl.java @@ -0,0 +1,234 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + +/** + * The welcome-file-list contains an ordered list of welcome files elements. + */ +public class WelcomeFileListImpl extends EObjectImpl implements WelcomeFileList, EObject { + + /** + * @generated This field/method will be replaced during code generation. + */ + /** + * @generated This field/method will be replaced during code generation. + */ + protected EList file = null; + public WelcomeFileListImpl() { + super(); + } + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WebapplicationPackage.eINSTANCE.getWelcomeFileList(); + } + +/** + * addFileNamed method comment. + */ +public void addFileNamed(java.lang.String name) { + WelcomeFile lfile = ((WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI)).getWebapplicationFactory().createWelcomeFile(); + lfile.setWelcomeFile(name); + getFile().add(lfile); +} + /** + * @generated This field/method will be replaced during code generation + */ + public WebApp getWebApp() { + if (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP) return null; + return (WebApp)eContainer; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void setWebApp(WebApp newWebApp) { + if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP && newWebApp != null)) { + if (EcoreUtil.isAncestor(this, newWebApp)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ + NotificationChain msgs = null; + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newWebApp != null) + msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__FILE_LIST, WebApp.class, msgs); + msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, newWebApp, newWebApp)); + } + + /** + * @generated This field/method will be replaced during code generation + */ + public EList getFile() { + if (file == null) { + file = new EObjectContainmentWithInverseEList(WelcomeFile.class, this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WebapplicationPackage.WELCOME_FILE__FILE_LIST); + } + return file; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + return ((InternalEList)getFile()).basicAdd(otherEnd, msgs); + default: + return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); + } + } + if (eContainer != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + return eBasicSetContainer(null, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + return ((InternalEList)getFile()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { + if (eContainerFeatureID >= 0) { + switch (eContainerFeatureID) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__FILE_LIST, WebApp.class, msgs); + default: + return eDynamicBasicRemoveFromContainer(msgs); + } + } + return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + return getWebApp(); + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + return getFile(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + return getWebApp() != null; + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + return file != null && !file.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + setWebApp((WebApp)newValue); + return; + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + getFile().clear(); + getFile().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: + setWebApp((WebApp)null); + return; + case WebapplicationPackage.WELCOME_FILE_LIST__FILE: + getFile().clear(); + return; + } + eDynamicUnset(eFeature); + } + +} + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationAdapterFactory.java new file mode 100644 index 000000000..a20326ea5 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationAdapterFactory.java @@ -0,0 +1,700 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.common.Listener; +import org.eclipse.jst.j2ee.jsp.TagLibRefType; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.RoleNameType; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + + + +public class WebapplicationAdapterFactory extends AdapterFactoryImpl { + protected static WebapplicationPackage modelPackage; + + public WebapplicationAdapterFactory() { + if (modelPackage == null) { + modelPackage = (WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); + } + } + public boolean isFactoryForType(Object type) { + if (type == modelPackage) { + return true; + } + if (type instanceof EObject) { + return ((EObject)type).eClass().eContainer() == modelPackage; + } + return false; + } + + protected WebapplicationSwitch sw = new WebapplicationSwitch() { + public Object caseWebApp(WebApp object) { + return createWebAppAdapter(); + } + public Object caseContextParam(ContextParam object) { + return createContextParamAdapter(); + } + public Object caseErrorPage(ErrorPage object) { + return createErrorPageAdapter(); + } + public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { + return createExceptionTypeErrorPageAdapter(); + } + public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { + return createErrorCodeErrorPageAdapter(); + } + public Object caseWelcomeFileList(WelcomeFileList object) { + return createWelcomeFileListAdapter(); + } + public Object caseWelcomeFile(WelcomeFile object) { + return createWelcomeFileAdapter(); + } + public Object caseTagLibRef(TagLibRef object) { + return createTagLibRefAdapter(); + } + public Object caseSecurityConstraint(SecurityConstraint object) { + return createSecurityConstraintAdapter(); + } + public Object caseWebResourceCollection(WebResourceCollection object) { + return createWebResourceCollectionAdapter(); + } + public Object caseURLPatternType(URLPatternType object) { + return createURLPatternTypeAdapter(); + } + public Object caseHTTPMethodType(HTTPMethodType object) { + return createHTTPMethodTypeAdapter(); + } + public Object caseAuthConstraint(AuthConstraint object) { + return createAuthConstraintAdapter(); + } + public Object caseUserDataConstraint(UserDataConstraint object) { + return createUserDataConstraintAdapter(); + } + public Object caseLoginConfig(LoginConfig object) { + return createLoginConfigAdapter(); + } + public Object caseFormLoginConfig(FormLoginConfig object) { + return createFormLoginConfigAdapter(); + } + public Object caseMimeMapping(MimeMapping object) { + return createMimeMappingAdapter(); + } + public Object caseSessionConfig(SessionConfig object) { + return createSessionConfigAdapter(); + } + public Object caseServletMapping(ServletMapping object) { + return createServletMappingAdapter(); + } + public Object caseServlet(Servlet object) { + return createServletAdapter(); + } + public Object caseWebType(WebType object) { + return createWebTypeAdapter(); + } + public Object caseServletType(ServletType object) { + return createServletTypeAdapter(); + } + public Object caseJSPType(JSPType object) { + return createJSPTypeAdapter(); + } + public Object caseInitParam(InitParam object) { + return createInitParamAdapter(); + } + public Object caseFilter(Filter object) { + return createFilterAdapter(); + } + public Object caseFilterMapping(FilterMapping object) { + return createFilterMappingAdapter(); + } + public Object caseListener(Listener object) { + return createListenerAdapter(); + } + public Object caseRoleNameType(RoleNameType object) { + return createRoleNameTypeAdapter(); + } + public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { + return createLocalEncodingMappingListAdapter(); + } + public Object caseLocalEncodingMapping(LocalEncodingMapping object) { + return createLocalEncodingMappingAdapter(); + } + }; + + public Adapter createAdapter(Notifier target) { + return (Adapter)sw.doSwitch((EObject)target); + } + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + public Adapter createWebAppAdapter() { + return null; + } + + public Adapter createContextParamAdapter() { + return null; + } + + public Adapter createErrorPageAdapter() { + return null; + } + + public Adapter createExceptionTypeErrorPageAdapter() { + return null; + } + + public Adapter createErrorCodeErrorPageAdapter() { + return null; + } + + public Adapter createWelcomeFileListAdapter() { + return null; + } + + public Adapter createWelcomeFileAdapter() { + return null; + } + + public Adapter createTagLibRefAdapter() { + return null; + } + + public Adapter createTagLibRefTypeAdapter() { + return null; + } + + public Adapter createSecurityConstraintAdapter() { + return null; + } + + public Adapter createWebResourceCollectionAdapter() { + return null; + } + + public Adapter createURLPatternTypeAdapter() { + return null; + } + + public Adapter createHTTPMethodTypeAdapter() { + return null; + } + + public Adapter createAuthConstraintAdapter() { + return null; + } + + public Adapter createUserDataConstraintAdapter() { + return null; + } + + public Adapter createLoginConfigAdapter() { + return null; + } + + public Adapter createFormLoginConfigAdapter() { + return null; + } + + public Adapter createMimeMappingAdapter() { + return null; + } + + public Adapter createSessionConfigAdapter() { + return null; + } + + public Adapter createServletMappingAdapter() { + return null; + } + + public Adapter createServletAdapter() { + return null; + } + + public Adapter createWebTypeAdapter() { + return null; + } + + public Adapter createServletTypeAdapter() { + return null; + } + + public Adapter createJSPTypeAdapter() { + return null; + } + + public Adapter createInitParamAdapter() { + return null; + } + + public Adapter createFilterAdapter() { + return null; + } + + public Adapter createFilterMappingAdapter() { + return null; + } + + public Adapter createListenerAdapter() { + return null; + } + + public Adapter createRoleNameTypeAdapter() { + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public boolean isFactoryForTypeGen(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected WebapplicationSwitch modelSwitch = + new WebapplicationSwitch() { + public Object caseWebApp(WebApp object) { + return createWebAppAdapter(); + } + public Object caseContextParam(ContextParam object) { + return createContextParamAdapter(); + } + public Object caseServlet(Servlet object) { + return createServletAdapter(); + } + public Object caseServletMapping(ServletMapping object) { + return createServletMappingAdapter(); + } + public Object caseSessionConfig(SessionConfig object) { + return createSessionConfigAdapter(); + } + public Object caseMimeMapping(MimeMapping object) { + return createMimeMappingAdapter(); + } + public Object caseWelcomeFileList(WelcomeFileList object) { + return createWelcomeFileListAdapter(); + } + public Object caseErrorPage(ErrorPage object) { + return createErrorPageAdapter(); + } + public Object caseTagLibRef(TagLibRef object) { + return createTagLibRefAdapter(); + } + public Object caseTagLibRefType(TagLibRefType object) { + return createTagLibRefTypeAdapter(); + } + public Object caseSecurityConstraint(SecurityConstraint object) { + return createSecurityConstraintAdapter(); + } + public Object caseWebResourceCollection(WebResourceCollection object) { + return createWebResourceCollectionAdapter(); + } + public Object caseAuthConstraint(AuthConstraint object) { + return createAuthConstraintAdapter(); + } + public Object caseUserDataConstraint(UserDataConstraint object) { + return createUserDataConstraintAdapter(); + } + public Object caseLoginConfig(LoginConfig object) { + return createLoginConfigAdapter(); + } + public Object caseFormLoginConfig(FormLoginConfig object) { + return createFormLoginConfigAdapter(); + } + public Object caseInitParam(InitParam object) { + return createInitParamAdapter(); + } + public Object caseWebType(WebType object) { + return createWebTypeAdapter(); + } + public Object caseServletType(ServletType object) { + return createServletTypeAdapter(); + } + public Object caseJSPType(JSPType object) { + return createJSPTypeAdapter(); + } + public Object caseURLPatternType(URLPatternType object) { + return createURLPatternTypeAdapter(); + } + public Object caseRoleNameType(RoleNameType object) { + return createRoleNameTypeAdapter(); + } + public Object caseWelcomeFile(WelcomeFile object) { + return createWelcomeFileAdapter(); + } + public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { + return createExceptionTypeErrorPageAdapter(); + } + public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { + return createErrorCodeErrorPageAdapter(); + } + public Object caseFilterMapping(FilterMapping object) { + return createFilterMappingAdapter(); + } + public Object caseFilter(Filter object) { + return createFilterAdapter(); + } + public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { + return createLocalEncodingMappingListAdapter(); + } + public Object caseLocalEncodingMapping(LocalEncodingMapping object) { + return createLocalEncodingMappingAdapter(); + } + public Object caseHTTPMethodType(HTTPMethodType object) { + return createHTTPMethodTypeAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return createJNDIEnvRefsGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAdapterGen(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * By default create methods return null so that we can easily ignore cases. + * It's useful to ignore a case when inheritance will catch all the cases anyway. + */ + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWebAppAdapterGen() { + + return null; + } + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createContextParamAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createErrorPageAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createExceptionTypeErrorPageAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createErrorCodeErrorPageAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWelcomeFileListAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWelcomeFileAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createTagLibRefAdapterGen() { + return null; + } + + public Adapter createTagLibRefTypeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSecurityConstraintAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWebResourceCollectionAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createURLPatternTypeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createAuthConstraintAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createUserDataConstraintAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createLoginConfigAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createFormLoginConfigAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createMimeMappingAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createSessionConfigAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createServletMappingAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createServletAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createWebTypeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createServletTypeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createJSPTypeAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createInitParamAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createFilterAdapterGen() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createFilterMappingAdapterGen() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMappingList Local Encoding Mapping List}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMappingList + * @generated + */ + public Adapter createLocalEncodingMappingListAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMapping Local Encoding Mapping}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMapping + * @generated + */ + public Adapter createLocalEncodingMappingAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup + * @generated + */ + public Adapter createJNDIEnvRefsGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + + /** + * @generated This field/method will be replaced during code generation. + */ + public Adapter createRoleNameTypeAdapterGen() { + return null; + } + +} //WebapplicationAdapterFactory + + + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationSwitch.java new file mode 100644 index 000000000..ce362a022 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webapplication/util/WebapplicationSwitch.java @@ -0,0 +1,776 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.internal.webapplication.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; +import org.eclipse.jst.j2ee.webapplication.AuthConstraint; +import org.eclipse.jst.j2ee.webapplication.ContextParam; +import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; +import org.eclipse.jst.j2ee.webapplication.ErrorPage; +import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; +import org.eclipse.jst.j2ee.webapplication.Filter; +import org.eclipse.jst.j2ee.webapplication.FilterMapping; +import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; +import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; +import org.eclipse.jst.j2ee.webapplication.InitParam; +import org.eclipse.jst.j2ee.webapplication.JSPType; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; +import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; +import org.eclipse.jst.j2ee.webapplication.LoginConfig; +import org.eclipse.jst.j2ee.webapplication.MimeMapping; +import org.eclipse.jst.j2ee.webapplication.RoleNameType; +import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; +import org.eclipse.jst.j2ee.webapplication.Servlet; +import org.eclipse.jst.j2ee.webapplication.ServletMapping; +import org.eclipse.jst.j2ee.webapplication.ServletType; +import org.eclipse.jst.j2ee.webapplication.SessionConfig; +import org.eclipse.jst.j2ee.webapplication.TagLibRef; +import org.eclipse.jst.j2ee.webapplication.URLPatternType; +import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; +import org.eclipse.jst.j2ee.webapplication.WebApp; +import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; +import org.eclipse.jst.j2ee.webapplication.WebType; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webapplication.WelcomeFile; +import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; + + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.webapplication.WebapplicationPackage + * @generated + */ +public class WebapplicationSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static WebapplicationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public WebapplicationSwitch() { + if (modelPackage == null) { + modelPackage = WebapplicationPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case WebapplicationPackage.WEB_APP: { + WebApp webApp = (WebApp)theEObject; + Object result = caseWebApp(webApp); + if (result == null) result = caseJNDIEnvRefsGroup(webApp); + if (result == null) result = caseCompatibilityDescriptionGroup(webApp); + if (result == null) result = caseDescriptionGroup(webApp); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.CONTEXT_PARAM: { + ContextParam contextParam = (ContextParam)theEObject; + Object result = caseContextParam(contextParam); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.SERVLET: { + Servlet servlet = (Servlet)theEObject; + Object result = caseServlet(servlet); + if (result == null) result = caseCompatibilityDescriptionGroup(servlet); + if (result == null) result = caseDescriptionGroup(servlet); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.SERVLET_MAPPING: { + ServletMapping servletMapping = (ServletMapping)theEObject; + Object result = caseServletMapping(servletMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.SESSION_CONFIG: { + SessionConfig sessionConfig = (SessionConfig)theEObject; + Object result = caseSessionConfig(sessionConfig); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.MIME_MAPPING: { + MimeMapping mimeMapping = (MimeMapping)theEObject; + Object result = caseMimeMapping(mimeMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.WELCOME_FILE_LIST: { + WelcomeFileList welcomeFileList = (WelcomeFileList)theEObject; + Object result = caseWelcomeFileList(welcomeFileList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.ERROR_PAGE: { + ErrorPage errorPage = (ErrorPage)theEObject; + Object result = caseErrorPage(errorPage); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.TAG_LIB_REF: { + TagLibRef tagLibRef = (TagLibRef)theEObject; + Object result = caseTagLibRef(tagLibRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.SECURITY_CONSTRAINT: { + SecurityConstraint securityConstraint = (SecurityConstraint)theEObject; + Object result = caseSecurityConstraint(securityConstraint); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.WEB_RESOURCE_COLLECTION: { + WebResourceCollection webResourceCollection = (WebResourceCollection)theEObject; + Object result = caseWebResourceCollection(webResourceCollection); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.AUTH_CONSTRAINT: { + AuthConstraint authConstraint = (AuthConstraint)theEObject; + Object result = caseAuthConstraint(authConstraint); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.USER_DATA_CONSTRAINT: { + UserDataConstraint userDataConstraint = (UserDataConstraint)theEObject; + Object result = caseUserDataConstraint(userDataConstraint); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.LOGIN_CONFIG: { + LoginConfig loginConfig = (LoginConfig)theEObject; + Object result = caseLoginConfig(loginConfig); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.FORM_LOGIN_CONFIG: { + FormLoginConfig formLoginConfig = (FormLoginConfig)theEObject; + Object result = caseFormLoginConfig(formLoginConfig); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.INIT_PARAM: { + InitParam initParam = (InitParam)theEObject; + Object result = caseInitParam(initParam); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.SERVLET_TYPE: { + ServletType servletType = (ServletType)theEObject; + Object result = caseServletType(servletType); + if (result == null) result = caseWebType(servletType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.JSP_TYPE: { + JSPType jspType = (JSPType)theEObject; + Object result = caseJSPType(jspType); + if (result == null) result = caseWebType(jspType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.URL_PATTERN_TYPE: { + URLPatternType urlPatternType = (URLPatternType)theEObject; + Object result = caseURLPatternType(urlPatternType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.ROLE_NAME_TYPE: { + RoleNameType roleNameType = (RoleNameType)theEObject; + Object result = caseRoleNameType(roleNameType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.WELCOME_FILE: { + WelcomeFile welcomeFile = (WelcomeFile)theEObject; + Object result = caseWelcomeFile(welcomeFile); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE: { + ExceptionTypeErrorPage exceptionTypeErrorPage = (ExceptionTypeErrorPage)theEObject; + Object result = caseExceptionTypeErrorPage(exceptionTypeErrorPage); + if (result == null) result = caseErrorPage(exceptionTypeErrorPage); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.ERROR_CODE_ERROR_PAGE: { + ErrorCodeErrorPage errorCodeErrorPage = (ErrorCodeErrorPage)theEObject; + Object result = caseErrorCodeErrorPage(errorCodeErrorPage); + if (result == null) result = caseErrorPage(errorCodeErrorPage); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.FILTER_MAPPING: { + FilterMapping filterMapping = (FilterMapping)theEObject; + Object result = caseFilterMapping(filterMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.FILTER: { + Filter filter = (Filter)theEObject; + Object result = caseFilter(filter); + if (result == null) result = caseCompatibilityDescriptionGroup(filter); + if (result == null) result = caseDescriptionGroup(filter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST: { + LocalEncodingMappingList localEncodingMappingList = (LocalEncodingMappingList)theEObject; + Object result = caseLocalEncodingMappingList(localEncodingMappingList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.LOCAL_ENCODING_MAPPING: { + LocalEncodingMapping localEncodingMapping = (LocalEncodingMapping)theEObject; + Object result = caseLocalEncodingMapping(localEncodingMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WebapplicationPackage.HTTP_METHOD_TYPE: { + HTTPMethodType httpMethodType = (HTTPMethodType)theEObject; + Object result = caseHTTPMethodType(httpMethodType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Web App'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web App'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebApp(WebApp object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Context Param'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Context Param'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseContextParam(ContextParam object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Servlet'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Servlet'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServlet(Servlet object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Servlet Mapping'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Servlet Mapping'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServletMapping(ServletMapping object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Session Config'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Session Config'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSessionConfig(SessionConfig object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Mime Mapping'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Mime Mapping'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMimeMapping(MimeMapping object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Welcome File List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Welcome File List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWelcomeFileList(WelcomeFileList object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Error Page'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Error Page'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseErrorPage(ErrorPage object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Tag Lib Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Tag Lib Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseTagLibRef(TagLibRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Security Constraint'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Security Constraint'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSecurityConstraint(SecurityConstraint object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Resource Collection'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Resource Collection'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebResourceCollection(WebResourceCollection object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Auth Constraint'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Auth Constraint'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseAuthConstraint(AuthConstraint object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'User Data Constraint'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'User Data Constraint'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseUserDataConstraint(UserDataConstraint object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Login Config'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Login Config'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseLoginConfig(LoginConfig object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Form Login Config'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Form Login Config'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseFormLoginConfig(FormLoginConfig object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Init Param'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Init Param'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseInitParam(InitParam object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebType(WebType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Servlet Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Servlet Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServletType(ServletType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'JSP Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JSP Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJSPType(JSPType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'URL Pattern Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'URL Pattern Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseURLPatternType(URLPatternType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Role Name Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Role Name Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRoleNameType(RoleNameType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Welcome File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Welcome File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWelcomeFile(WelcomeFile object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Exception Type Error Page'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Exception Type Error Page'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Error Code Error Page'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Error Code Error Page'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Filter Mapping'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Filter Mapping'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseFilterMapping(FilterMapping object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Filter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Filter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseFilter(Filter object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Local Encoding Mapping List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Local Encoding Mapping List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Local Encoding Mapping'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Local Encoding Mapping'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseLocalEncodingMapping(LocalEncodingMapping object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'HTTP Method Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'HTTP Method Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseHTTPMethodType(HTTPMethodType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //WebapplicationSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/DescriptionGroupHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/DescriptionGroupHelper.java new file mode 100644 index 000000000..7814467ca --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/webservice/util/DescriptionGroupHelper.java @@ -0,0 +1,1577 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +package org.eclipse.jst.j2ee.internal.webservice.util; + +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; + + +public class DescriptionGroupHelper +{ + + public static String[] getValues(WebServices webServices, DescriptionGroupItem item) + { + return getValues(webServices, item, false); + } + + public static String[] getValues(WebServices webServices, DescriptionGroupItem item, boolean getLang) + { + J2EEVersionResource res = (J2EEVersionResource)webServices.eResource(); + boolean isJ2EE14=false; + if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) + { + isJ2EE14 = true; + } + + switch (item.getValue()) + { + case DescriptionGroupItem.DESCRIPTION: + return getDescriptions(webServices, isJ2EE14, getLang); + //break; + case DescriptionGroupItem.DISPLAY_NAME: + return getDisplayNames(webServices, isJ2EE14, getLang); + //break; + case DescriptionGroupItem.SMALL_ICON: + return getSmallIcons(webServices, isJ2EE14, getLang); + //break; + case DescriptionGroupItem.LARGE_ICON: + return getLargeIcons(webServices, isJ2EE14, getLang); + //break; + default: + return null; + } + } + + + private static String[] getDescriptions(WebServices webServices, boolean isJ2EE14, boolean lang) + { + + String[] values = null; + if (isJ2EE14) + { + Object[] descriptions = webServices.getDescriptions().toArray(); + values = new String[descriptions.length]; + if (lang) + { + for(int i =0; i * @generated */ - JcaFactory eINSTANCE = new org.eclipse.jst.j2ee.jca.impl.JcaFactoryImpl(); + JcaFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.jca.impl.JcaFactoryImpl(); /** diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/JcaPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/JcaPackage.java index 5b94dbc77..9fe8bbfb6 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/JcaPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/JcaPackage.java @@ -265,7 +265,7 @@ public interface JcaPackage extends EPackage{ * * @generated */ - JcaPackage eINSTANCE = org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl.init(); + JcaPackage eINSTANCE = org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl.init(); /** * @generated This field/method will be replaced during code generation. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ActivationSpecImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ActivationSpecImpl.java deleted file mode 100644 index 88bf9d2ae..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ActivationSpecImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; - - -/** - * - * An implementation of the model object 'Activation Spec'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ActivationSpecImpl#getActivationSpecClass Activation Spec Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ActivationSpecImpl#getRequiredConfigProperties Required Config Properties}
  • - *
- *

- * - * @generated - */ -public class ActivationSpecImpl extends EObjectImpl implements ActivationSpec { - /** - * The default value of the '{@link #getActivationSpecClass() Activation Spec Class}' attribute. - * - * - * @see #getActivationSpecClass() - * @generated - * @ordered - */ - protected static final String ACTIVATION_SPEC_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getActivationSpecClass() Activation Spec Class}' attribute. - * - * - * @see #getActivationSpecClass() - * @generated - * @ordered - */ - protected String activationSpecClass = ACTIVATION_SPEC_CLASS_EDEFAULT; - - /** - * The cached value of the '{@link #getRequiredConfigProperties() Required Config Properties}' containment reference list. - * - * - * @see #getRequiredConfigProperties() - * @generated - * @ordered - */ - protected EList requiredConfigProperties = null; - - /** - * - * - * @generated - */ - protected ActivationSpecImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getActivationSpec(); - } - - /** - * - * - * @generated - */ - public String getActivationSpecClass() { - return activationSpecClass; - } - - /** - * - * - * @generated - */ - public void setActivationSpecClass(String newActivationSpecClass) { - String oldActivationSpecClass = activationSpecClass; - activationSpecClass = newActivationSpecClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS, oldActivationSpecClass, activationSpecClass)); - } - - /** - * - * - * @generated - */ - public EList getRequiredConfigProperties() { - if (requiredConfigProperties == null) { - requiredConfigProperties = new EObjectContainmentEList(RequiredConfigPropertyType.class, this, JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES); - } - return requiredConfigProperties; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: - return ((InternalEList)getRequiredConfigProperties()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: - return getActivationSpecClass(); - case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: - return getRequiredConfigProperties(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: - setActivationSpecClass((String)newValue); - return; - case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: - getRequiredConfigProperties().clear(); - getRequiredConfigProperties().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: - setActivationSpecClass(ACTIVATION_SPEC_CLASS_EDEFAULT); - return; - case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: - getRequiredConfigProperties().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS: - return ACTIVATION_SPEC_CLASS_EDEFAULT == null ? activationSpecClass != null : !ACTIVATION_SPEC_CLASS_EDEFAULT.equals(activationSpecClass); - case JcaPackage.ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES: - return requiredConfigProperties != null && !requiredConfigProperties.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (activationSpecClass: ");//$NON-NLS-1$ - result.append(activationSpecClass); - result.append(')'); - return result.toString(); - } - -} //ActivationSpecImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AdminObjectImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AdminObjectImpl.java deleted file mode 100644 index 9c187bbcf..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AdminObjectImpl.java +++ /dev/null @@ -1,277 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.JcaPackage; - - -/** - * - * An implementation of the model object 'Admin Object'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getAdminObjectInterface Admin Object Interface}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getAdminObjectClass Admin Object Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.AdminObjectImpl#getConfigProperties Config Properties}
  • - *
- *

- * - * @generated - */ -public class AdminObjectImpl extends EObjectImpl implements AdminObject { - /** - * The default value of the '{@link #getAdminObjectInterface() Admin Object Interface}' attribute. - * - * - * @see #getAdminObjectInterface() - * @generated - * @ordered - */ - protected static final String ADMIN_OBJECT_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getAdminObjectInterface() Admin Object Interface}' attribute. - * - * - * @see #getAdminObjectInterface() - * @generated - * @ordered - */ - protected String adminObjectInterface = ADMIN_OBJECT_INTERFACE_EDEFAULT; - - /** - * The default value of the '{@link #getAdminObjectClass() Admin Object Class}' attribute. - * - * - * @see #getAdminObjectClass() - * @generated - * @ordered - */ - protected static final String ADMIN_OBJECT_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getAdminObjectClass() Admin Object Class}' attribute. - * - * - * @see #getAdminObjectClass() - * @generated - * @ordered - */ - protected String adminObjectClass = ADMIN_OBJECT_CLASS_EDEFAULT; - - /** - * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. - * - * - * @see #getConfigProperties() - * @generated - * @ordered - */ - protected EList configProperties = null; - - /** - * - * - * @generated - */ - protected AdminObjectImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getAdminObject(); - } - - /** - * - * - * @generated - */ - public String getAdminObjectInterface() { - return adminObjectInterface; - } - - /** - * - * - * @generated - */ - public void setAdminObjectInterface(String newAdminObjectInterface) { - String oldAdminObjectInterface = adminObjectInterface; - adminObjectInterface = newAdminObjectInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE, oldAdminObjectInterface, adminObjectInterface)); - } - - /** - * - * - * @generated - */ - public String getAdminObjectClass() { - return adminObjectClass; - } - - /** - * - * - * @generated - */ - public void setAdminObjectClass(String newAdminObjectClass) { - String oldAdminObjectClass = adminObjectClass; - adminObjectClass = newAdminObjectClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS, oldAdminObjectClass, adminObjectClass)); - } - - /** - * - * - * @generated - */ - public EList getConfigProperties() { - if (configProperties == null) { - configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES); - } - return configProperties; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: - return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: - return getAdminObjectInterface(); - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: - return getAdminObjectClass(); - case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: - return getConfigProperties(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: - setAdminObjectInterface((String)newValue); - return; - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: - setAdminObjectClass((String)newValue); - return; - case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: - getConfigProperties().clear(); - getConfigProperties().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: - setAdminObjectInterface(ADMIN_OBJECT_INTERFACE_EDEFAULT); - return; - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: - setAdminObjectClass(ADMIN_OBJECT_CLASS_EDEFAULT); - return; - case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: - getConfigProperties().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE: - return ADMIN_OBJECT_INTERFACE_EDEFAULT == null ? adminObjectInterface != null : !ADMIN_OBJECT_INTERFACE_EDEFAULT.equals(adminObjectInterface); - case JcaPackage.ADMIN_OBJECT__ADMIN_OBJECT_CLASS: - return ADMIN_OBJECT_CLASS_EDEFAULT == null ? adminObjectClass != null : !ADMIN_OBJECT_CLASS_EDEFAULT.equals(adminObjectClass); - case JcaPackage.ADMIN_OBJECT__CONFIG_PROPERTIES: - return configProperties != null && !configProperties.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (adminObjectInterface: ");//$NON-NLS-1$ - result.append(adminObjectInterface); - result.append(", adminObjectClass: ");//$NON-NLS-1$ - result.append(adminObjectClass); - result.append(')'); - return result.toString(); - } - -} //AdminObjectImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AuthenticationMechanismImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AuthenticationMechanismImpl.java deleted file mode 100644 index 15ca01547..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/AuthenticationMechanismImpl.java +++ /dev/null @@ -1,866 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; -import org.eclipse.jst.j2ee.jca.JcaPackage; - - -/** - * The element authentication-mechanism specifies an authentication mechanism supported by the resource adapter. Note that this support is for the resource adapter and not for the underlying EIS instance. The optional description specifies any resource adapter specific requirement for the support of security contract and authentication mechanism. - * - * Note that BasicPassword mechanism type should support the - * javax.resource.spi.security.PasswordCredential interface. - * The Kerbv5 mechanism type should support the - * javax.resource.spi.security.GenericCredential interface. - - */ -public class AuthenticationMechanismImpl extends EObjectImpl implements AuthenticationMechanism, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getAuthenticationMechanism() Authentication Mechanism}' attribute. - * - * - * @see #getAuthenticationMechanism() - * @generated - * @ordered - */ - protected static final String AUTHENTICATION_MECHANISM_EDEFAULT = null; - - /** - * The cached value of the '{@link #getAuthenticationMechanism() Authentication Mechanism}' attribute. - * - * - * @see #getAuthenticationMechanism() - * @generated - * @ordered - */ - protected String authenticationMechanism = AUTHENTICATION_MECHANISM_EDEFAULT; - - /** - * The default value of the '{@link #getAuthenticationMechanismType() Authentication Mechanism Type}' attribute. - * - * - * @see #getAuthenticationMechanismType() - * @generated - * @ordered - */ - protected static final AuthenticationMechanismType AUTHENTICATION_MECHANISM_TYPE_EDEFAULT = AuthenticationMechanismType.BASIC_PASSWORD_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected AuthenticationMechanismType authenticationMechanismType = AUTHENTICATION_MECHANISM_TYPE_EDEFAULT; - /** - * This is true if the Authentication Mechanism Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean authenticationMechanismTypeESet = false; - - /** - * The default value of the '{@link #getCredentialInterface() Credential Interface}' attribute. - * - * - * @see #getCredentialInterface() - * @generated - * @ordered - */ - protected static final String CREDENTIAL_INTERFACE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String credentialInterface = CREDENTIAL_INTERFACE_EDEFAULT; - /** - * The default value of the '{@link #getCustomAuthMechType() Custom Auth Mech Type}' attribute. - * - * - * @see #getCustomAuthMechType() - * @generated - * @ordered - */ - protected static final String CUSTOM_AUTH_MECH_TYPE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String customAuthMechType = CUSTOM_AUTH_MECH_TYPE_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected AuthenticationMechanismImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getAuthenticationMechanism(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public String getAuthenticationMechanism() { - return authenticationMechanism; - } - - /** - * - * - * @generated - */ - public void setAuthenticationMechanism(String newAuthenticationMechanism) { - String oldAuthenticationMechanism = authenticationMechanism; - authenticationMechanism = newAuthenticationMechanism; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM, oldAuthenticationMechanism, authenticationMechanism)); - } - - /** - * @generated This field/method will be replaced during code generation - * The authentication-mechanism-type specifies type of an authentication mechanism. - * - * The example values are: - * - BasicPassword - * - Kerbv5 - * - * Any additional security mechanisms are outside the scope of the - * Connector architecture specification. - - */ - public AuthenticationMechanismType getAuthenticationMechanismType() { - return authenticationMechanismType; - } - - /** - * - * - * @generated - */ - public void setAuthenticationMechanismType(AuthenticationMechanismType newAuthenticationMechanismType) { - AuthenticationMechanismType oldAuthenticationMechanismType = authenticationMechanismType; - authenticationMechanismType = newAuthenticationMechanismType == null ? AUTHENTICATION_MECHANISM_TYPE_EDEFAULT : newAuthenticationMechanismType; - boolean oldAuthenticationMechanismTypeESet = authenticationMechanismTypeESet; - authenticationMechanismTypeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE, oldAuthenticationMechanismType, authenticationMechanismType, !oldAuthenticationMechanismTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetAuthenticationMechanismType() { - AuthenticationMechanismType oldAuthenticationMechanismType = authenticationMechanismType; - boolean oldAuthenticationMechanismTypeESet = authenticationMechanismTypeESet; - authenticationMechanismType = AUTHENTICATION_MECHANISM_TYPE_EDEFAULT; - authenticationMechanismTypeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE, oldAuthenticationMechanismType, AUTHENTICATION_MECHANISM_TYPE_EDEFAULT, oldAuthenticationMechanismTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetAuthenticationMechanismType() { - return authenticationMechanismTypeESet; - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the interface that the resource adapter implementation supports for - * the representation of the credentials. This element should be used by - * application server to find out the Credential interface it should use as part - * of the security contract. - * - * The possible values are: - * javax.resource.spi.security.PasswordCredential - * javax.resource.spi.security.GenericCredential - - */ - public String getCredentialInterface() { - return credentialInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setCredentialInterface(String newCredentialInterface) { - String oldCredentialInterface = credentialInterface; - credentialInterface = newCredentialInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE, oldCredentialInterface, credentialInterface)); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: - return AUTHENTICATION_MECHANISM_EDEFAULT == null ? authenticationMechanism != null : !AUTHENTICATION_MECHANISM_EDEFAULT.equals(authenticationMechanism); - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: - return isSetAuthenticationMechanismType(); - case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: - return CREDENTIAL_INTERFACE_EDEFAULT == null ? credentialInterface != null : !CREDENTIAL_INTERFACE_EDEFAULT.equals(credentialInterface); - case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: - return CUSTOM_AUTH_MECH_TYPE_EDEFAULT == null ? customAuthMechType != null : !CUSTOM_AUTH_MECH_TYPE_EDEFAULT.equals(customAuthMechType); - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: - setDescription((String)newValue); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: - setAuthenticationMechanism((String)newValue); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: - setAuthenticationMechanismType((AuthenticationMechanismType)newValue); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: - setCredentialInterface((String)newValue); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: - setCustomAuthMechType((String)newValue); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: - setAuthenticationMechanism(AUTHENTICATION_MECHANISM_EDEFAULT); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: - unsetAuthenticationMechanismType(); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: - setCredentialInterface(CREDENTIAL_INTERFACE_EDEFAULT); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: - setCustomAuthMechType(CUSTOM_AUTH_MECH_TYPE_EDEFAULT); - return; - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", authenticationMechanism: ");//$NON-NLS-1$ - result.append(authenticationMechanism); - result.append(", authenticationMechanismType: ");//$NON-NLS-1$ - if (authenticationMechanismTypeESet) result.append(authenticationMechanismType); else result.append("");//$NON-NLS-1$ - result.append(", credentialInterface: ");//$NON-NLS-1$ - result.append(credentialInterface); - result.append(", customAuthMechType: ");//$NON-NLS-1$ - result.append(customAuthMechType); - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - * This is an internal variable used to store the AthenticationMechanismType when - * it is something other than BasicPassword or Kerbv5. AuthenticationMecanismType - * is set to 'Custom' in those cases. This attribute should not be used by - * runtime. It is only used by the writer to write back out the custom - * AuthenticationMechanismType string in the case of custom - * AuthenticationMechanismType's. - * This variable is internal, used only by the reader//writer classes, and can - * change or disappear without notice. - */ - public String getCustomAuthMechType() { - return customAuthMechType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setCustomAuthMechType(String newCustomAuthMechType) { - String oldCustomAuthMechType = customAuthMechType; - customAuthMechType = newCustomAuthMechType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE, oldCustomAuthMechType, customAuthMechType)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTION: - return getDescription(); - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM: - return getAuthenticationMechanism(); - case JcaPackage.AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE: - return getAuthenticationMechanismType(); - case JcaPackage.AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE: - return getCredentialInterface(); - case JcaPackage.AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE: - return getCustomAuthMechType(); - case JcaPackage.AUTHENTICATION_MECHANISM__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConfigPropertyImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConfigPropertyImpl.java deleted file mode 100644 index 443f8cbc3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConfigPropertyImpl.java +++ /dev/null @@ -1,357 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.JcaPackage; - - -/** - * The config property contains a declaration of a single - * configuration property for a ManagedConnectionFactory instance. - * - * Each ManagedConnectionFactory instance creates connections to a specific EIS instance based on the properties configured on the ManagedConnectionFactory instance. The configurable properties are specified only once in the deployment descriptor, even though a resource adapter can be used to configure multiple ManagedConnnection-Factory instances (that create connections to different instances of the same EIS). - * - * The declaration consists of an optional description, name, type - * and an optional value of the configuration property. If the resource - * adapter provider does not specify a value than the deployer is - * responsible for providing a valid value for a configuration property. - * - * Any bounds or well-defined values of properties should be described in the description. - - */ -public class ConfigPropertyImpl extends EObjectImpl implements ConfigProperty, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String type = TYPE_EDEFAULT; - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String value = VALUE_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected ConfigPropertyImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getConfigProperty(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains the name of a configuration property. - * - * The connector architecture defines a set of well-defined properties all of type java.lang.String. These are as follows: - * - * ServerName - * PortNumber - * UserName - * Password - * ConnectionURL - * - * A resource adapter provider can extend this property set to include properties specific to the resource adapter and its underlying EIS. - - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains the fully qualified Java type of a configuration property as required by ManagedConnection-Factory instance. - * - * The following are the legal values of config-property-type: - * java.lang.Boolean, java.lang.String, java.lang.Integer, - * java.lang.Double, java.lang.Byte, java.lang.Short, - * java.lang.Long, java.lang.Float, java.lang.Character - */ - public String getType() { - return type; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__TYPE, oldType, type)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains the value of a configuration entry. - */ - public String getValue() { - return value; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONFIG_PROPERTY__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: - return getDescription(); - case JcaPackage.CONFIG_PROPERTY__NAME: - return getName(); - case JcaPackage.CONFIG_PROPERTY__TYPE: - return getType(); - case JcaPackage.CONFIG_PROPERTY__VALUE: - return getValue(); - case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JcaPackage.CONFIG_PROPERTY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case JcaPackage.CONFIG_PROPERTY__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - case JcaPackage.CONFIG_PROPERTY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: - setDescription((String)newValue); - return; - case JcaPackage.CONFIG_PROPERTY__NAME: - setName((String)newValue); - return; - case JcaPackage.CONFIG_PROPERTY__TYPE: - setType((String)newValue); - return; - case JcaPackage.CONFIG_PROPERTY__VALUE: - setValue((String)newValue); - return; - case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONFIG_PROPERTY__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JcaPackage.CONFIG_PROPERTY__NAME: - setName(NAME_EDEFAULT); - return; - case JcaPackage.CONFIG_PROPERTY__TYPE: - setType(TYPE_EDEFAULT); - return; - case JcaPackage.CONFIG_PROPERTY__VALUE: - setValue(VALUE_EDEFAULT); - return; - case JcaPackage.CONFIG_PROPERTY__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", name: ");//$NON-NLS-1$ - result.append(name); - result.append(", type: ");//$NON-NLS-1$ - result.append(type); - result.append(", value: ");//$NON-NLS-1$ - result.append(value); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectionDefinitionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectionDefinitionImpl.java deleted file mode 100644 index 03c7bb1de..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectionDefinitionImpl.java +++ /dev/null @@ -1,439 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.JcaPackage; - - -/** - * - * An implementation of the model object 'Connection Definition'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getManagedConnectionFactoryClass Managed Connection Factory Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionFactoryInterface Connection Factory Interface}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionFactoryImplClass Connection Factory Impl Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionInterface Connection Interface}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConnectionImplClass Connection Impl Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.ConnectionDefinitionImpl#getConfigProperties Config Properties}
  • - *
- *

- * - * @generated - */ -public class ConnectionDefinitionImpl extends EObjectImpl implements ConnectionDefinition { - /** - * The default value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. - * - * - * @see #getManagedConnectionFactoryClass() - * @generated - * @ordered - */ - protected static final String MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. - * - * - * @see #getManagedConnectionFactoryClass() - * @generated - * @ordered - */ - protected String managedConnectionFactoryClass = MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT; - - /** - * The default value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. - * - * - * @see #getConnectionFactoryInterface() - * @generated - * @ordered - */ - protected static final String CONNECTION_FACTORY_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. - * - * - * @see #getConnectionFactoryInterface() - * @generated - * @ordered - */ - protected String connectionFactoryInterface = CONNECTION_FACTORY_INTERFACE_EDEFAULT; - - /** - * The default value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. - * - * - * @see #getConnectionFactoryImplClass() - * @generated - * @ordered - */ - protected static final String CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. - * - * - * @see #getConnectionFactoryImplClass() - * @generated - * @ordered - */ - protected String connectionFactoryImplClass = CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT; - - /** - * The default value of the '{@link #getConnectionInterface() Connection Interface}' attribute. - * - * - * @see #getConnectionInterface() - * @generated - * @ordered - */ - protected static final String CONNECTION_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getConnectionInterface() Connection Interface}' attribute. - * - * - * @see #getConnectionInterface() - * @generated - * @ordered - */ - protected String connectionInterface = CONNECTION_INTERFACE_EDEFAULT; - - /** - * The default value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. - * - * - * @see #getConnectionImplClass() - * @generated - * @ordered - */ - protected static final String CONNECTION_IMPL_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. - * - * - * @see #getConnectionImplClass() - * @generated - * @ordered - */ - protected String connectionImplClass = CONNECTION_IMPL_CLASS_EDEFAULT; - - /** - * The cached value of the '{@link #getConfigProperties() Config Properties}' containment reference list. - * - * - * @see #getConfigProperties() - * @generated - * @ordered - */ - protected EList configProperties = null; - - /** - * - * - * @generated - */ - protected ConnectionDefinitionImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getConnectionDefinition(); - } - - /** - * - * - * @generated - */ - public String getManagedConnectionFactoryClass() { - return managedConnectionFactoryClass; - } - - /** - * - * - * @generated - */ - public void setManagedConnectionFactoryClass(String newManagedConnectionFactoryClass) { - String oldManagedConnectionFactoryClass = managedConnectionFactoryClass; - managedConnectionFactoryClass = newManagedConnectionFactoryClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS, oldManagedConnectionFactoryClass, managedConnectionFactoryClass)); - } - - /** - * - * - * @generated - */ - public String getConnectionFactoryInterface() { - return connectionFactoryInterface; - } - - /** - * - * - * @generated - */ - public void setConnectionFactoryInterface(String newConnectionFactoryInterface) { - String oldConnectionFactoryInterface = connectionFactoryInterface; - connectionFactoryInterface = newConnectionFactoryInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE, oldConnectionFactoryInterface, connectionFactoryInterface)); - } - - /** - * - * - * @generated - */ - public String getConnectionFactoryImplClass() { - return connectionFactoryImplClass; - } - - /** - * - * - * @generated - */ - public void setConnectionFactoryImplClass(String newConnectionFactoryImplClass) { - String oldConnectionFactoryImplClass = connectionFactoryImplClass; - connectionFactoryImplClass = newConnectionFactoryImplClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS, oldConnectionFactoryImplClass, connectionFactoryImplClass)); - } - - /** - * - * - * @generated - */ - public String getConnectionInterface() { - return connectionInterface; - } - - /** - * - * - * @generated - */ - public void setConnectionInterface(String newConnectionInterface) { - String oldConnectionInterface = connectionInterface; - connectionInterface = newConnectionInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE, oldConnectionInterface, connectionInterface)); - } - - /** - * - * - * @generated - */ - public String getConnectionImplClass() { - return connectionImplClass; - } - - /** - * - * - * @generated - */ - public void setConnectionImplClass(String newConnectionImplClass) { - String oldConnectionImplClass = connectionImplClass; - connectionImplClass = newConnectionImplClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS, oldConnectionImplClass, connectionImplClass)); - } - - /** - * - * - * @generated - */ - public EList getConfigProperties() { - if (configProperties == null) { - configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES); - } - return configProperties; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: - return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: - return getManagedConnectionFactoryClass(); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: - return getConnectionFactoryInterface(); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: - return getConnectionFactoryImplClass(); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: - return getConnectionInterface(); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: - return getConnectionImplClass(); - case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: - return getConfigProperties(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: - setManagedConnectionFactoryClass((String)newValue); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: - setConnectionFactoryInterface((String)newValue); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: - setConnectionFactoryImplClass((String)newValue); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: - setConnectionInterface((String)newValue); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: - setConnectionImplClass((String)newValue); - return; - case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: - getConfigProperties().clear(); - getConfigProperties().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: - setManagedConnectionFactoryClass(MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: - setConnectionFactoryInterface(CONNECTION_FACTORY_INTERFACE_EDEFAULT); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: - setConnectionFactoryImplClass(CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: - setConnectionInterface(CONNECTION_INTERFACE_EDEFAULT); - return; - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: - setConnectionImplClass(CONNECTION_IMPL_CLASS_EDEFAULT); - return; - case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: - getConfigProperties().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS: - return MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT == null ? managedConnectionFactoryClass != null : !MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT.equals(managedConnectionFactoryClass); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE: - return CONNECTION_FACTORY_INTERFACE_EDEFAULT == null ? connectionFactoryInterface != null : !CONNECTION_FACTORY_INTERFACE_EDEFAULT.equals(connectionFactoryInterface); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS: - return CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT == null ? connectionFactoryImplClass != null : !CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT.equals(connectionFactoryImplClass); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_INTERFACE: - return CONNECTION_INTERFACE_EDEFAULT == null ? connectionInterface != null : !CONNECTION_INTERFACE_EDEFAULT.equals(connectionInterface); - case JcaPackage.CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS: - return CONNECTION_IMPL_CLASS_EDEFAULT == null ? connectionImplClass != null : !CONNECTION_IMPL_CLASS_EDEFAULT.equals(connectionImplClass); - case JcaPackage.CONNECTION_DEFINITION__CONFIG_PROPERTIES: - return configProperties != null && !configProperties.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (managedConnectionFactoryClass: ");//$NON-NLS-1$ - result.append(managedConnectionFactoryClass); - result.append(", connectionFactoryInterface: ");//$NON-NLS-1$ - result.append(connectionFactoryInterface); - result.append(", connectionFactoryImplClass: ");//$NON-NLS-1$ - result.append(connectionFactoryImplClass); - result.append(", connectionInterface: ");//$NON-NLS-1$ - result.append(connectionInterface); - result.append(", connectionImplClass: ");//$NON-NLS-1$ - result.append(connectionImplClass); - result.append(')'); - return result.toString(); - } - -} //ConnectionDefinitionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorImpl.java deleted file mode 100644 index 46eec25ac..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorImpl.java +++ /dev/null @@ -1,508 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; - - -/** - * The connector element is the root element of the deployment descriptor for the resource adapter. This element includes general information - vendor name, version, specification version supported, icon - about the resource adapter module. It also includes information specific to the implementation of the resource adapter library as specified through the element resourceadapter. - - */ -public class ConnectorImpl extends CompatibilityDescriptionGroupImpl implements Connector{ - - /** - * The default value of the '{@link #getVendorName() Vendor Name}' attribute. - * - * - * @see #getVendorName() - * @generated - * @ordered - */ - protected static final String VENDOR_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String vendorName = VENDOR_NAME_EDEFAULT; - /** - * The default value of the '{@link #getSpecVersion() Spec Version}' attribute. - * - * - * @see #getSpecVersion() - * @generated - * @ordered - */ - protected static final String SPEC_VERSION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String specVersion = SPEC_VERSION_EDEFAULT; - /** - * The default value of the '{@link #getEisType() Eis Type}' attribute. - * - * - * @see #getEisType() - * @generated - * @ordered - */ - protected static final String EIS_TYPE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String eisType = EIS_TYPE_EDEFAULT; - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected static final String VERSION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String version = VERSION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected License license = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected ResourceAdapter resourceAdapter = null; - protected ConnectorImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getConnector(); - } - - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ - public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getModuleVersionID(); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the name of resource adapter provider vendor. - * Example: Wombat Corp. - */ - public String getVendorName() { - return vendorName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setVendorName(String newVendorName) { - String oldVendorName = vendorName; - vendorName = newVendorName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__VENDOR_NAME, oldVendorName, vendorName)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the version of the connector architecture specification that is supported by this resource adapter. This information enables deployer to configure the resource adapter to support deployment and runtime requirements of the corresponding connector architecture specification. - - */ - public String getSpecVersion() { - return specVersion; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSpecVersion(String newSpecVersion) { - String oldSpecVersion = specVersion; - specVersion = newSpecVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__SPEC_VERSION, oldSpecVersion, specVersion)); - } - - /** - * @generated This field/method will be replaced during code generation - * Contains information about the type of the EIS. For example, the type of an EIS can be product name of EIS independent of any version info. - * - * This helps in identifying EIS instances that can be used with - * this resource adapter. - - */ - public String getEisType() { - return eisType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEisType(String newEisType) { - String oldEisType = eisType; - eisType = newEisType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__EIS_TYPE, oldEisType, eisType)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies a string-based version of the resource adapter from the resource adapter provider. - * - * Example: 1.0 - */ - public String getVersion() { - return version; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies licensing requirements for the resource adapter module. This element specifies whether a license is required to deploy and use this resource adapter, and an optional description of the licensing terms (examples: duration of license, number of - * connection restrictions). - */ - public License getLicense() { - return license; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetLicense(License newLicense, NotificationChain msgs) { - License oldLicense = license; - license = newLicense; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__LICENSE, oldLicense, newLicense); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLicense(License newLicense) { - if (newLicense != license) { - NotificationChain msgs = null; - if (license != null) - msgs = ((InternalEObject)license).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__LICENSE, null, msgs); - if (newLicense != null) - msgs = ((InternalEObject)newLicense).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__LICENSE, null, msgs); - msgs = basicSetLicense(newLicense, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__LICENSE, newLicense, newLicense)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetResourceAdapter(ResourceAdapter newResourceAdapter, NotificationChain msgs) { - ResourceAdapter oldResourceAdapter = resourceAdapter; - resourceAdapter = newResourceAdapter; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__RESOURCE_ADAPTER, oldResourceAdapter, newResourceAdapter); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setResourceAdapter(ResourceAdapter newResourceAdapter) { - if (newResourceAdapter != resourceAdapter) { - NotificationChain msgs = null; - if (resourceAdapter != null) - msgs = ((InternalEObject)resourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__RESOURCE_ADAPTER, null, msgs); - if (newResourceAdapter != null) - msgs = ((InternalEObject)newResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.CONNECTOR__RESOURCE_ADAPTER, null, msgs); - msgs = basicSetResourceAdapter(newResourceAdapter, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.CONNECTOR__RESOURCE_ADAPTER, newResourceAdapter, newResourceAdapter)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.CONNECTOR__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case JcaPackage.CONNECTOR__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case JcaPackage.CONNECTOR__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case JcaPackage.CONNECTOR__LICENSE: - return basicSetLicense(null, msgs); - case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: - return basicSetResourceAdapter(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTOR__ICONS: - return getIcons(); - case JcaPackage.CONNECTOR__DISPLAY_NAMES: - return getDisplayNames(); - case JcaPackage.CONNECTOR__DESCRIPTIONS: - return getDescriptions(); - case JcaPackage.CONNECTOR__SMALL_ICON: - return getSmallIcon(); - case JcaPackage.CONNECTOR__LARGE_ICON: - return getLargeIcon(); - case JcaPackage.CONNECTOR__DESCRIPTION: - return getDescription(); - case JcaPackage.CONNECTOR__DISPLAY_NAME: - return getDisplayName(); - case JcaPackage.CONNECTOR__VENDOR_NAME: - return getVendorName(); - case JcaPackage.CONNECTOR__SPEC_VERSION: - return getSpecVersion(); - case JcaPackage.CONNECTOR__EIS_TYPE: - return getEisType(); - case JcaPackage.CONNECTOR__VERSION: - return getVersion(); - case JcaPackage.CONNECTOR__LICENSE: - return getLicense(); - case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: - return getResourceAdapter(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTOR__ICONS: - return icons != null && !icons.isEmpty(); - case JcaPackage.CONNECTOR__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case JcaPackage.CONNECTOR__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case JcaPackage.CONNECTOR__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case JcaPackage.CONNECTOR__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case JcaPackage.CONNECTOR__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JcaPackage.CONNECTOR__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case JcaPackage.CONNECTOR__VENDOR_NAME: - return VENDOR_NAME_EDEFAULT == null ? vendorName != null : !VENDOR_NAME_EDEFAULT.equals(vendorName); - case JcaPackage.CONNECTOR__SPEC_VERSION: - return SPEC_VERSION_EDEFAULT == null ? specVersion != null : !SPEC_VERSION_EDEFAULT.equals(specVersion); - case JcaPackage.CONNECTOR__EIS_TYPE: - return EIS_TYPE_EDEFAULT == null ? eisType != null : !EIS_TYPE_EDEFAULT.equals(eisType); - case JcaPackage.CONNECTOR__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case JcaPackage.CONNECTOR__LICENSE: - return license != null; - case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: - return resourceAdapter != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTOR__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case JcaPackage.CONNECTOR__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case JcaPackage.CONNECTOR__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case JcaPackage.CONNECTOR__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case JcaPackage.CONNECTOR__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case JcaPackage.CONNECTOR__DESCRIPTION: - setDescription((String)newValue); - return; - case JcaPackage.CONNECTOR__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case JcaPackage.CONNECTOR__VENDOR_NAME: - setVendorName((String)newValue); - return; - case JcaPackage.CONNECTOR__SPEC_VERSION: - setSpecVersion((String)newValue); - return; - case JcaPackage.CONNECTOR__EIS_TYPE: - setEisType((String)newValue); - return; - case JcaPackage.CONNECTOR__VERSION: - setVersion((String)newValue); - return; - case JcaPackage.CONNECTOR__LICENSE: - setLicense((License)newValue); - return; - case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: - setResourceAdapter((ResourceAdapter)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.CONNECTOR__ICONS: - getIcons().clear(); - return; - case JcaPackage.CONNECTOR__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case JcaPackage.CONNECTOR__DESCRIPTIONS: - getDescriptions().clear(); - return; - case JcaPackage.CONNECTOR__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case JcaPackage.CONNECTOR__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case JcaPackage.CONNECTOR__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JcaPackage.CONNECTOR__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case JcaPackage.CONNECTOR__VENDOR_NAME: - setVendorName(VENDOR_NAME_EDEFAULT); - return; - case JcaPackage.CONNECTOR__SPEC_VERSION: - setSpecVersion(SPEC_VERSION_EDEFAULT); - return; - case JcaPackage.CONNECTOR__EIS_TYPE: - setEisType(EIS_TYPE_EDEFAULT); - return; - case JcaPackage.CONNECTOR__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case JcaPackage.CONNECTOR__LICENSE: - setLicense((License)null); - return; - case JcaPackage.CONNECTOR__RESOURCE_ADAPTER: - setResourceAdapter((ResourceAdapter)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (vendorName: ");//$NON-NLS-1$ - result.append(vendorName); - result.append(", specVersion: ");//$NON-NLS-1$ - result.append(specVersion); - result.append(", eisType: ");//$NON-NLS-1$ - result.append(eisType); - result.append(", version: ");//$NON-NLS-1$ - result.append(version); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceFactory.java deleted file mode 100644 index d1a309ff9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -public class ConnectorResourceFactory extends TranslatorResourceFactory { - - /** - * Method registerDtds. - */ - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.CONNECTOR_SYSTEMID_1_0, "connector_1_0.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.CONNECTOR_SCHEMA_LOC_1_5, "connector_1_5.xsd"); //$NON-NLS-1$ - } - - /** - * Constructor for ConnectorResourceFactory. - * @param aRendererFactory - */ - public ConnectorResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) - */ - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new ConnectorResourceImpl(uri, aRenderer); - } - - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.RAR_SHORT_NAME, new ConnectorResourceFactory(aRendererFactory)); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.RAR_DD_URI_OBJ); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceImpl.java deleted file mode 100644 index b0f91220f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ConnectorResourceImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.model.translator.connector.ConnectorTranslator; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.ConnectorResource; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - - -public class ConnectorResourceImpl extends XMLResourceImpl implements ConnectorResource{ - - /** - * Constructor for ApplicationClientResourceImpl. - * @param uri - * @param aRenderer - */ - public ConnectorResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - /** - * Constructor for ApplicationClientResourceImpl. - * @param aRenderer - */ - public ConnectorResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /** - * Return the first element in the EList. - */ - public Connector getConnector() { - return (Connector) getRootObject(); - } - - - public int getType() { - return RAR_TYPE; - } - - - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.CONNECTOR_SYSTEMID_1_0; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.CONNECTOR_SYSTEMID_1_0; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.CONNECTOR_PUBLICID_1_0; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.CONNECTOR_PUBLICID_1_0; - } - - - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.CONNECTOR_DOCTYPE; - default : - return null; - } - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) - * This is setting the module version on the resource. - */ - public void setDoctypeValues(String publicId, String systemId) { - int version = JCA_1_5_ID; - if (systemId == null) - version = JCA_1_5_ID; - else if (systemId.equals(getJ2EE_1_3_SystemID())) - version = JCA_1_0_ID; - super.setDoctypeValues(publicId, systemId); - super.setVersionID(version); - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (JCA_1_5_ID) : - super.setDoctypeValues(null, null); - break; - case (JCA_1_0_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version - */ - public void setJ2EEVersionID(int id) { - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - primSetVersionID(JCA_1_5_ID); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - primSetVersionID(JCA_1_0_ID); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - primSetVersionID(JCA_1_0_ID); - } - syncVersionOfRootObject(); - } - /** - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return ConnectorTranslator.INSTANCE; - } - /* Return J2EE version based on module version - */ - public int getJ2EEVersionID() { - switch (getModuleVersionID()) { - case J2EEVersionConstants.JCA_1_0_ID : - return J2EEVersionConstants.J2EE_1_3_ID; - case J2EEVersionConstants.JCA_1_5_ID : - return J2EEVersionConstants.J2EE_1_4_ID; - default : - return J2EEVersionConstants.J2EE_1_4_ID; - } - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return JCA_1_5_ID; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - Connector conn = getConnector(); - if (conn == null) - return; - - String version = conn.getSpecVersion(); - String newVersion = getModuleVersionString(); - if (!newVersion.equals(version)) - conn.setSpecVersion(newVersion); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/InboundResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/InboundResourceAdapterImpl.java deleted file mode 100644 index 303f793e3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/InboundResourceAdapterImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.MessageAdapter; - - -/** - * - * An implementation of the model object 'Inbound Resource Adapter'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.InboundResourceAdapterImpl#getMessageAdapter Message Adapter}
  • - *
- *

- * - * @generated - */ -public class InboundResourceAdapterImpl extends EObjectImpl implements InboundResourceAdapter { - /** - * The cached value of the '{@link #getMessageAdapter() Message Adapter}' containment reference. - * - * - * @see #getMessageAdapter() - * @generated - * @ordered - */ - protected MessageAdapter messageAdapter = null; - - /** - * - * - * @generated - */ - protected InboundResourceAdapterImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getInboundResourceAdapter(); - } - - /** - * - * - * @generated - */ - public MessageAdapter getMessageAdapter() { - return messageAdapter; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetMessageAdapter(MessageAdapter newMessageAdapter, NotificationChain msgs) { - MessageAdapter oldMessageAdapter = messageAdapter; - messageAdapter = newMessageAdapter; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, oldMessageAdapter, newMessageAdapter); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setMessageAdapter(MessageAdapter newMessageAdapter) { - if (newMessageAdapter != messageAdapter) { - NotificationChain msgs = null; - if (messageAdapter != null) - msgs = ((InternalEObject)messageAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, null, msgs); - if (newMessageAdapter != null) - msgs = ((InternalEObject)newMessageAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, null, msgs); - msgs = basicSetMessageAdapter(newMessageAdapter, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER, newMessageAdapter, newMessageAdapter)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: - return basicSetMessageAdapter(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: - return getMessageAdapter(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: - setMessageAdapter((MessageAdapter)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: - setMessageAdapter((MessageAdapter)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER: - return messageAdapter != null; - } - return eDynamicIsSet(eFeature); - } - -} //InboundResourceAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaFactoryImpl.java deleted file mode 100644 index 76495f7c3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaFactoryImpl.java +++ /dev/null @@ -1,422 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaFactory; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.MessageAdapter; -import org.eclipse.jst.j2ee.jca.MessageListener; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; -import org.eclipse.jst.j2ee.jca.TransactionSupportKind; - -/** - * @generated - */ -public class JcaFactoryImpl extends EFactoryImpl implements JcaFactory{ - - public JcaFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case JcaPackage.CONNECTOR: return createConnector(); - case JcaPackage.RESOURCE_ADAPTER: return createResourceAdapter(); - case JcaPackage.AUTHENTICATION_MECHANISM: return createAuthenticationMechanism(); - case JcaPackage.CONFIG_PROPERTY: return createConfigProperty(); - case JcaPackage.SECURITY_PERMISSION: return createSecurityPermission(); - case JcaPackage.LICENSE: return createLicense(); - case JcaPackage.INBOUND_RESOURCE_ADAPTER: return createInboundResourceAdapter(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER: return createOutboundResourceAdapter(); - case JcaPackage.MESSAGE_ADAPTER: return createMessageAdapter(); - case JcaPackage.CONNECTION_DEFINITION: return createConnectionDefinition(); - case JcaPackage.ADMIN_OBJECT: return createAdminObject(); - case JcaPackage.MESSAGE_LISTENER: return createMessageListener(); - case JcaPackage.ACTIVATION_SPEC: return createActivationSpec(); - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE: return createRequiredConfigPropertyType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case JcaPackage.AUTHENTICATION_MECHANISM_TYPE: - return AuthenticationMechanismType.get(initialValue); - case JcaPackage.TRANSACTION_SUPPORT_KIND: - return TransactionSupportKind.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");//$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case JcaPackage.AUTHENTICATION_MECHANISM_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case JcaPackage.TRANSACTION_SUPPORT_KIND: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ - } - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Connector createConnector() { - ConnectorImpl connector = new ConnectorImpl(); - return connector; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public License createLicense() { - LicenseImpl license = new LicenseImpl(); - return license; - } - - /** - * - * - * @generated - */ - public InboundResourceAdapter createInboundResourceAdapter() { - InboundResourceAdapterImpl inboundResourceAdapter = new InboundResourceAdapterImpl(); - return inboundResourceAdapter; - } - - /** - * - * - * @generated - */ - public OutboundResourceAdapter createOutboundResourceAdapter() { - OutboundResourceAdapterImpl outboundResourceAdapter = new OutboundResourceAdapterImpl(); - return outboundResourceAdapter; - } - - /** - * - * - * @generated - */ - public MessageAdapter createMessageAdapter() { - MessageAdapterImpl messageAdapter = new MessageAdapterImpl(); - return messageAdapter; - } - - /** - * - * - * @generated - */ - public ConnectionDefinition createConnectionDefinition() { - ConnectionDefinitionImpl connectionDefinition = new ConnectionDefinitionImpl(); - return connectionDefinition; - } - - /** - * - * - * @generated - */ - public AdminObject createAdminObject() { - AdminObjectImpl adminObject = new AdminObjectImpl(); - return adminObject; - } - - /** - * - * - * @generated - */ - public MessageListener createMessageListener() { - MessageListenerImpl messageListener = new MessageListenerImpl(); - return messageListener; - } - - /** - * - * - * @generated - */ - public ActivationSpec createActivationSpec() { - ActivationSpecImpl activationSpec = new ActivationSpecImpl(); - return activationSpec; - } - - /** - * - * - * @generated - */ - public RequiredConfigPropertyType createRequiredConfigPropertyType() { - RequiredConfigPropertyTypeImpl requiredConfigPropertyType = new RequiredConfigPropertyTypeImpl(); - return requiredConfigPropertyType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ResourceAdapter createResourceAdapter() { - ResourceAdapterImpl resourceAdapter = new ResourceAdapterImpl(); - return resourceAdapter; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public SecurityPermission createSecurityPermission() { - SecurityPermissionImpl securityPermission = new SecurityPermissionImpl(); - return securityPermission; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public AuthenticationMechanism createAuthenticationMechanism() { - AuthenticationMechanismImpl authenticationMechanism = new AuthenticationMechanismImpl(); - return authenticationMechanism; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ConfigProperty createConfigProperty() { - ConfigPropertyImpl configProperty = new ConfigPropertyImpl(); - return configProperty; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JcaPackage getJcaPackage() { - return (JcaPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static JcaPackage getPackage() { - return JcaPackage.eINSTANCE; - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaPackageImpl.java deleted file mode 100644 index 94a651efd..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/JcaPackageImpl.java +++ /dev/null @@ -1,2107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaFactory; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.MessageAdapter; -import org.eclipse.jst.j2ee.jca.MessageListener; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; -import org.eclipse.jst.j2ee.jca.TransactionSupportKind; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class JcaPackageImpl extends EPackageImpl implements JcaPackage, EPackage { - /** - * - * - * @generated - */ - private EClass connectorEClass = null; - - /** - * - * - * @generated - */ - private EClass resourceAdapterEClass = null; - - /** - * - * - * @generated - */ - private EClass authenticationMechanismEClass = null; - - /** - * - * - * @generated - */ - private EClass configPropertyEClass = null; - - /** - * - * - * @generated - */ - private EClass securityPermissionEClass = null; - - /** - * - * - * @generated - */ - private EClass licenseEClass = null; - - /** - * - * - * @generated - */ - private EClass inboundResourceAdapterEClass = null; - - /** - * - * - * @generated - */ - private EClass outboundResourceAdapterEClass = null; - - /** - * - * - * @generated - */ - private EClass messageAdapterEClass = null; - - /** - * - * - * @generated - */ - private EClass connectionDefinitionEClass = null; - - /** - * - * - * @generated - */ - private EClass adminObjectEClass = null; - - /** - * - * - * @generated - */ - private EClass messageListenerEClass = null; - - /** - * - * - * @generated - */ - private EClass activationSpecEClass = null; - - /** - * - * - * @generated - */ - private EClass requiredConfigPropertyTypeEClass = null; - - /** - * - * - * @generated - */ - private EEnum authenticationMechanismTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum transactionSupportKindEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private JcaPackageImpl() { - super(eNS_URI, JcaFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static JcaPackage init() { - if (isInited) return (JcaPackage)EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI); - - // Obtain or create and register package. - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JcaPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - - // Step 1: create meta-model objects - theJcaPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theJcaPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theJcaPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getConnector() { - return connectorEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConnector_VendorName() { - return (EAttribute)connectorEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConnector_SpecVersion() { - return (EAttribute)connectorEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConnector_EisType() { - return (EAttribute)connectorEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConnector_Version() { - return (EAttribute)connectorEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getConnector_License() { - return (EReference)connectorEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getConnector_ResourceAdapter() { - return (EReference)connectorEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getLicense() { - return licenseEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getLicense_Description() { - return (EAttribute)licenseEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getLicense_Required() { - return (EAttribute)licenseEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getLicense_Descriptions() { - return (EReference)licenseEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getInboundResourceAdapter() { - return inboundResourceAdapterEClass; - } - - /** - * - * - * @generated - */ - public EReference getInboundResourceAdapter_MessageAdapter() { - return (EReference)inboundResourceAdapterEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getOutboundResourceAdapter() { - return outboundResourceAdapterEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getOutboundResourceAdapter_ReauthenticationSupport() { - return (EAttribute)outboundResourceAdapterEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getOutboundResourceAdapter_TransactionSupport() { - return (EAttribute)outboundResourceAdapterEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getOutboundResourceAdapter_ConnectionDefinitions() { - return (EReference)outboundResourceAdapterEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getOutboundResourceAdapter_AuthenticationMechanisms() { - return (EReference)outboundResourceAdapterEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getMessageAdapter() { - return messageAdapterEClass; - } - - /** - * - * - * @generated - */ - public EReference getMessageAdapter_MessageListeners() { - return (EReference)messageAdapterEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getConnectionDefinition() { - return connectionDefinitionEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionDefinition_ManagedConnectionFactoryClass() { - return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionDefinition_ConnectionFactoryInterface() { - return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionDefinition_ConnectionFactoryImplClass() { - return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionDefinition_ConnectionInterface() { - return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionDefinition_ConnectionImplClass() { - return (EAttribute)connectionDefinitionEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getConnectionDefinition_ConfigProperties() { - return (EReference)connectionDefinitionEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EClass getAdminObject() { - return adminObjectEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getAdminObject_AdminObjectInterface() { - return (EAttribute)adminObjectEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getAdminObject_AdminObjectClass() { - return (EAttribute)adminObjectEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getAdminObject_ConfigProperties() { - return (EReference)adminObjectEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getMessageListener() { - return messageListenerEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMessageListener_MessageListenerType() { - return (EAttribute)messageListenerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getMessageListener_ActivationSpec() { - return (EReference)messageListenerEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getActivationSpec() { - return activationSpecEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getActivationSpec_ActivationSpecClass() { - return (EAttribute)activationSpecEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getActivationSpec_RequiredConfigProperties() { - return (EReference)activationSpecEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getRequiredConfigPropertyType() { - return requiredConfigPropertyTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getRequiredConfigPropertyType_Name() { - return (EAttribute)requiredConfigPropertyTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getRequiredConfigPropertyType_Descriptions() { - return (EReference)requiredConfigPropertyTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getResourceAdapter() { - return resourceAdapterEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ManagedConnectionFactoryClass() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ConnectionFactoryInterface() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ConnectionFactoryImplClass() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ConnectionInterface() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ConnectionImplClass() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_TransactionSupport() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getResourceAdapter_ReauthenticationSupport() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EAttribute getResourceAdapter_ResourceAdapterClass() { - return (EAttribute)resourceAdapterEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getResourceAdapter_SecurityPermissions() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(8); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getResourceAdapter_AuthenticationMechanisms() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(9); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getResourceAdapter_ConfigProperties() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(10); - } - - /** - * - * - * @generated - */ - public EReference getResourceAdapter_OutboundResourceAdapter() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(11); - } - - /** - * - * - * @generated - */ - public EReference getResourceAdapter_InboundResourceAdapter() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(12); - } - - /** - * - * - * @generated - */ - public EReference getResourceAdapter_AdminObjects() { - return (EReference)resourceAdapterEClass.getEStructuralFeatures().get(13); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSecurityPermission() { - return securityPermissionEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityPermission_Description() { - return (EAttribute)securityPermissionEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSecurityPermission_Specification() { - return (EAttribute)securityPermissionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getSecurityPermission_Descriptions() { - return (EReference)securityPermissionEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getAuthenticationMechanism() { - return authenticationMechanismEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthenticationMechanism_Description() { - return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getAuthenticationMechanism_AuthenticationMechanism() { - return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthenticationMechanism_AuthenticationMechanismType() { - return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthenticationMechanism_CredentialInterface() { - return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getConfigProperty() { - return configPropertyEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConfigProperty_Description() { - return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConfigProperty_Name() { - return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConfigProperty_Type() { - return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getConfigProperty_Value() { - return (EAttribute)configPropertyEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getConfigProperty_Descriptions() { - return (EReference)configPropertyEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getTransactionSupportKind() { - return transactionSupportKindEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getAuthenticationMechanismType() { - return authenticationMechanismTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JcaFactory getJcaFactory() { - return (JcaFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - connectorEClass = createEClass(CONNECTOR); - createEAttribute(connectorEClass, CONNECTOR__VENDOR_NAME); - createEAttribute(connectorEClass, CONNECTOR__SPEC_VERSION); - createEAttribute(connectorEClass, CONNECTOR__EIS_TYPE); - createEAttribute(connectorEClass, CONNECTOR__VERSION); - createEReference(connectorEClass, CONNECTOR__LICENSE); - createEReference(connectorEClass, CONNECTOR__RESOURCE_ADAPTER); - - resourceAdapterEClass = createEClass(RESOURCE_ADAPTER); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_INTERFACE); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__TRANSACTION_SUPPORT); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT); - createEAttribute(resourceAdapterEClass, RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__SECURITY_PERMISSIONS); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__CONFIG_PROPERTIES); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER); - createEReference(resourceAdapterEClass, RESOURCE_ADAPTER__ADMIN_OBJECTS); - - authenticationMechanismEClass = createEClass(AUTHENTICATION_MECHANISM); - createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__DESCRIPTION); - createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM); - createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__AUTHENTICATION_MECHANISM_TYPE); - createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__CREDENTIAL_INTERFACE); - createEAttribute(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__CUSTOM_AUTH_MECH_TYPE); - createEReference(authenticationMechanismEClass, AUTHENTICATION_MECHANISM__DESCRIPTIONS); - - configPropertyEClass = createEClass(CONFIG_PROPERTY); - createEAttribute(configPropertyEClass, CONFIG_PROPERTY__DESCRIPTION); - createEAttribute(configPropertyEClass, CONFIG_PROPERTY__NAME); - createEAttribute(configPropertyEClass, CONFIG_PROPERTY__TYPE); - createEAttribute(configPropertyEClass, CONFIG_PROPERTY__VALUE); - createEReference(configPropertyEClass, CONFIG_PROPERTY__DESCRIPTIONS); - - securityPermissionEClass = createEClass(SECURITY_PERMISSION); - createEAttribute(securityPermissionEClass, SECURITY_PERMISSION__DESCRIPTION); - createEAttribute(securityPermissionEClass, SECURITY_PERMISSION__SPECIFICATION); - createEReference(securityPermissionEClass, SECURITY_PERMISSION__DESCRIPTIONS); - - licenseEClass = createEClass(LICENSE); - createEAttribute(licenseEClass, LICENSE__DESCRIPTION); - createEAttribute(licenseEClass, LICENSE__REQUIRED); - createEReference(licenseEClass, LICENSE__DESCRIPTIONS); - - inboundResourceAdapterEClass = createEClass(INBOUND_RESOURCE_ADAPTER); - createEReference(inboundResourceAdapterEClass, INBOUND_RESOURCE_ADAPTER__MESSAGE_ADAPTER); - - outboundResourceAdapterEClass = createEClass(OUTBOUND_RESOURCE_ADAPTER); - createEAttribute(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT); - createEAttribute(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT); - createEReference(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS); - createEReference(outboundResourceAdapterEClass, OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); - - messageAdapterEClass = createEClass(MESSAGE_ADAPTER); - createEReference(messageAdapterEClass, MESSAGE_ADAPTER__MESSAGE_LISTENERS); - - connectionDefinitionEClass = createEClass(CONNECTION_DEFINITION); - createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__MANAGED_CONNECTION_FACTORY_CLASS); - createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_FACTORY_INTERFACE); - createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_FACTORY_IMPL_CLASS); - createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_INTERFACE); - createEAttribute(connectionDefinitionEClass, CONNECTION_DEFINITION__CONNECTION_IMPL_CLASS); - createEReference(connectionDefinitionEClass, CONNECTION_DEFINITION__CONFIG_PROPERTIES); - - adminObjectEClass = createEClass(ADMIN_OBJECT); - createEAttribute(adminObjectEClass, ADMIN_OBJECT__ADMIN_OBJECT_INTERFACE); - createEAttribute(adminObjectEClass, ADMIN_OBJECT__ADMIN_OBJECT_CLASS); - createEReference(adminObjectEClass, ADMIN_OBJECT__CONFIG_PROPERTIES); - - messageListenerEClass = createEClass(MESSAGE_LISTENER); - createEAttribute(messageListenerEClass, MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE); - createEReference(messageListenerEClass, MESSAGE_LISTENER__ACTIVATION_SPEC); - - activationSpecEClass = createEClass(ACTIVATION_SPEC); - createEAttribute(activationSpecEClass, ACTIVATION_SPEC__ACTIVATION_SPEC_CLASS); - createEReference(activationSpecEClass, ACTIVATION_SPEC__REQUIRED_CONFIG_PROPERTIES); - - requiredConfigPropertyTypeEClass = createEClass(REQUIRED_CONFIG_PROPERTY_TYPE); - createEAttribute(requiredConfigPropertyTypeEClass, REQUIRED_CONFIG_PROPERTY_TYPE__NAME); - createEReference(requiredConfigPropertyTypeEClass, REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS); - - // Create enums - authenticationMechanismTypeEEnum = createEEnum(AUTHENTICATION_MECHANISM_TYPE); - transactionSupportKindEEnum = createEEnum(TRANSACTION_SUPPORT_KIND); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - - // Add supertypes to classes - connectorEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(connectorEClass, Connector.class, "Connector", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getConnector_VendorName(), ecorePackage.getEString(), "vendorName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnector_SpecVersion(), ecorePackage.getEString(), "specVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnector_EisType(), ecorePackage.getEString(), "eisType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnector_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getConnector_License(), this.getLicense(), null, "license", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getConnector_ResourceAdapter(), this.getResourceAdapter(), null, "resourceAdapter", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(resourceAdapterEClass, ResourceAdapter.class, "ResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ManagedConnectionFactoryClass(), ecorePackage.getEString(), "managedConnectionFactoryClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ConnectionFactoryInterface(), ecorePackage.getEString(), "connectionFactoryInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ConnectionFactoryImplClass(), ecorePackage.getEString(), "connectionFactoryImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ConnectionInterface(), ecorePackage.getEString(), "connectionInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ConnectionImplClass(), ecorePackage.getEString(), "connectionImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_TransactionSupport(), this.getTransactionSupportKind(), "transactionSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ReauthenticationSupport(), ecorePackage.getEBoolean(), "reauthenticationSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getResourceAdapter_ResourceAdapterClass(), ecorePackage.getEString(), "resourceAdapterClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_SecurityPermissions(), this.getSecurityPermission(), null, "securityPermissions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_AuthenticationMechanisms(), this.getAuthenticationMechanism(), null, "authenticationMechanisms", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_OutboundResourceAdapter(), this.getOutboundResourceAdapter(), null, "outboundResourceAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_InboundResourceAdapter(), this.getInboundResourceAdapter(), null, "inboundResourceAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getResourceAdapter_AdminObjects(), this.getAdminObject(), null, "adminObjects", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(authenticationMechanismEClass, AuthenticationMechanism.class, "AuthenticationMechanism", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getAuthenticationMechanism_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAuthenticationMechanism_AuthenticationMechanism(), ecorePackage.getEString(), "authenticationMechanism", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAuthenticationMechanism_AuthenticationMechanismType(), this.getAuthenticationMechanismType(), "authenticationMechanismType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAuthenticationMechanism_CredentialInterface(), ecorePackage.getEString(), "credentialInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAuthenticationMechanism_CustomAuthMechType(), ecorePackage.getEString(), "customAuthMechType", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getAuthenticationMechanism_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(configPropertyEClass, ConfigProperty.class, "ConfigProperty", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getConfigProperty_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConfigProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConfigProperty_Type(), ecorePackage.getEString(), "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConfigProperty_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getConfigProperty_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(securityPermissionEClass, SecurityPermission.class, "SecurityPermission", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getSecurityPermission_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getSecurityPermission_Specification(), ecorePackage.getEString(), "specification", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityPermission_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(licenseEClass, License.class, "License", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getLicense_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getLicense_Required(), ecorePackage.getEBoolean(), "required", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getLicense_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(inboundResourceAdapterEClass, InboundResourceAdapter.class, "InboundResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getInboundResourceAdapter_MessageAdapter(), this.getMessageAdapter(), null, "messageAdapter", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(outboundResourceAdapterEClass, OutboundResourceAdapter.class, "OutboundResourceAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getOutboundResourceAdapter_ReauthenticationSupport(), ecorePackage.getEBoolean(), "reauthenticationSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getOutboundResourceAdapter_TransactionSupport(), this.getTransactionSupportKind(), "transactionSupport", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getOutboundResourceAdapter_ConnectionDefinitions(), this.getConnectionDefinition(), null, "connectionDefinitions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getOutboundResourceAdapter_AuthenticationMechanisms(), this.getAuthenticationMechanism(), null, "authenticationMechanisms", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(messageAdapterEClass, MessageAdapter.class, "MessageAdapter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getMessageAdapter_MessageListeners(), this.getMessageListener(), null, "messageListeners", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(connectionDefinitionEClass, ConnectionDefinition.class, "ConnectionDefinition", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getConnectionDefinition_ManagedConnectionFactoryClass(), ecorePackage.getEString(), "managedConnectionFactoryClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnectionDefinition_ConnectionFactoryInterface(), ecorePackage.getEString(), "connectionFactoryInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnectionDefinition_ConnectionFactoryImplClass(), ecorePackage.getEString(), "connectionFactoryImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnectionDefinition_ConnectionInterface(), ecorePackage.getEString(), "connectionInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getConnectionDefinition_ConnectionImplClass(), ecorePackage.getEString(), "connectionImplClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getConnectionDefinition_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(adminObjectEClass, AdminObject.class, "AdminObject", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getAdminObject_AdminObjectInterface(), ecorePackage.getEString(), "adminObjectInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAdminObject_AdminObjectClass(), ecorePackage.getEString(), "adminObjectClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getAdminObject_ConfigProperties(), this.getConfigProperty(), null, "configProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(messageListenerEClass, MessageListener.class, "MessageListener", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getMessageListener_MessageListenerType(), ecorePackage.getEString(), "messageListenerType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getMessageListener_ActivationSpec(), this.getActivationSpec(), null, "activationSpec", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(activationSpecEClass, ActivationSpec.class, "ActivationSpec", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getActivationSpec_ActivationSpecClass(), ecorePackage.getEString(), "activationSpecClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getActivationSpec_RequiredConfigProperties(), this.getRequiredConfigPropertyType(), null, "requiredConfigProperties", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(requiredConfigPropertyTypeEClass, RequiredConfigPropertyType.class, "RequiredConfigPropertyType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getRequiredConfigPropertyType_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getRequiredConfigPropertyType_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(authenticationMechanismTypeEEnum, AuthenticationMechanismType.class, "AuthenticationMechanismType");//$NON-NLS-1$ - addEEnumLiteral(authenticationMechanismTypeEEnum, AuthenticationMechanismType.BASIC_PASSWORD_LITERAL);//$NON-NLS-1$ - addEEnumLiteral(authenticationMechanismTypeEEnum, AuthenticationMechanismType.KERBV5_LITERAL);//$NON-NLS-1$ - - initEEnum(transactionSupportKindEEnum, TransactionSupportKind.class, "TransactionSupportKind");//$NON-NLS-1$ - addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.NO_TRANSACTION_LITERAL); - addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.LOCAL_TRANSACTION_LITERAL); - addEEnumLiteral(transactionSupportKindEEnum, TransactionSupportKind.XA_TRANSACTION_LITERAL); - - // Create resource - createResource(eNS_URI); - } - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthenticationMechanism_CustomAuthMechType() { - return (EAttribute)authenticationMechanismEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getAuthenticationMechanism_Descriptions() { - return (EReference)authenticationMechanismEClass.getEStructuralFeatures().get(5); - } - -} //JcaPackageImpl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/LicenseImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/LicenseImpl.java deleted file mode 100644 index 43ab399f1..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/LicenseImpl.java +++ /dev/null @@ -1,275 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; - - -/** - * Specifies licensing requirements for the resource adapter module. Specifies whether a license is required to deploy and use this resource adapter, and an optional description of the licensing terms (examples: duration of license, number of connection restrictions). - */ -public class LicenseImpl extends EObjectImpl implements License, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #isRequired() Required}' attribute. - * - * - * @see #isRequired() - * @generated - * @ordered - */ - protected static final boolean REQUIRED_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean required = REQUIRED_EDEFAULT; - /** - * This is true if the Required attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean requiredESet = false; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected LicenseImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getLicense(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.LICENSE__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public boolean isRequired() { - return required; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRequired(boolean newRequired) { - boolean oldRequired = required; - required = newRequired; - boolean oldRequiredESet = requiredESet; - requiredESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.LICENSE__REQUIRED, oldRequired, required, !oldRequiredESet)); - } - - /** - * - * - * @generated - */ - public void unsetRequired() { - boolean oldRequired = required; - boolean oldRequiredESet = requiredESet; - required = REQUIRED_EDEFAULT; - requiredESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.LICENSE__REQUIRED, oldRequired, REQUIRED_EDEFAULT, oldRequiredESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetRequired() { - return requiredESet; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.LICENSE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.LICENSE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.LICENSE__DESCRIPTION: - return getDescription(); - case JcaPackage.LICENSE__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case JcaPackage.LICENSE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.LICENSE__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JcaPackage.LICENSE__REQUIRED: - return isSetRequired(); - case JcaPackage.LICENSE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.LICENSE__DESCRIPTION: - setDescription((String)newValue); - return; - case JcaPackage.LICENSE__REQUIRED: - setRequired(((Boolean)newValue).booleanValue()); - return; - case JcaPackage.LICENSE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.LICENSE__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JcaPackage.LICENSE__REQUIRED: - unsetRequired(); - return; - case JcaPackage.LICENSE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", required: ");//$NON-NLS-1$ - if (requiredESet) result.append(required); else result.append("");//$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageAdapterImpl.java deleted file mode 100644 index fe5d65ff8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageAdapterImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.MessageAdapter; -import org.eclipse.jst.j2ee.jca.MessageListener; - - -/** - * - * An implementation of the model object 'Message Adapter'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageAdapterImpl#getMessageListeners Message Listeners}
  • - *
- *

- * - * @generated - */ -public class MessageAdapterImpl extends EObjectImpl implements MessageAdapter { - /** - * The cached value of the '{@link #getMessageListeners() Message Listeners}' containment reference list. - * - * - * @see #getMessageListeners() - * @generated - * @ordered - */ - protected EList messageListeners = null; - - /** - * - * - * @generated - */ - protected MessageAdapterImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getMessageAdapter(); - } - - /** - * - * - * @generated - */ - public EList getMessageListeners() { - if (messageListeners == null) { - messageListeners = new EObjectContainmentEList(MessageListener.class, this, JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS); - } - return messageListeners; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: - return ((InternalEList)getMessageListeners()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: - return getMessageListeners(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: - getMessageListeners().clear(); - getMessageListeners().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: - getMessageListeners().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_ADAPTER__MESSAGE_LISTENERS: - return messageListeners != null && !messageListeners.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //MessageAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageListenerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageListenerImpl.java deleted file mode 100644 index ca8179892..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/MessageListenerImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.MessageListener; - - -/** - * - * An implementation of the model object 'Message Listener'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageListenerImpl#getMessageListenerType Message Listener Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.MessageListenerImpl#getActivationSpec Activation Spec}
  • - *
- *

- * - * @generated - */ -public class MessageListenerImpl extends EObjectImpl implements MessageListener { - /** - * The default value of the '{@link #getMessageListenerType() Message Listener Type}' attribute. - * - * - * @see #getMessageListenerType() - * @generated - * @ordered - */ - protected static final String MESSAGE_LISTENER_TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getMessageListenerType() Message Listener Type}' attribute. - * - * - * @see #getMessageListenerType() - * @generated - * @ordered - */ - protected String messageListenerType = MESSAGE_LISTENER_TYPE_EDEFAULT; - - /** - * The cached value of the '{@link #getActivationSpec() Activation Spec}' containment reference. - * - * - * @see #getActivationSpec() - * @generated - * @ordered - */ - protected ActivationSpec activationSpec = null; - - /** - * - * - * @generated - */ - protected MessageListenerImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getMessageListener(); - } - - /** - * - * - * @generated - */ - public String getMessageListenerType() { - return messageListenerType; - } - - /** - * - * - * @generated - */ - public void setMessageListenerType(String newMessageListenerType) { - String oldMessageListenerType = messageListenerType; - messageListenerType = newMessageListenerType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE, oldMessageListenerType, messageListenerType)); - } - - /** - * - * - * @generated - */ - public ActivationSpec getActivationSpec() { - return activationSpec; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetActivationSpec(ActivationSpec newActivationSpec, NotificationChain msgs) { - ActivationSpec oldActivationSpec = activationSpec; - activationSpec = newActivationSpec; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, oldActivationSpec, newActivationSpec); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setActivationSpec(ActivationSpec newActivationSpec) { - if (newActivationSpec != activationSpec) { - NotificationChain msgs = null; - if (activationSpec != null) - msgs = ((InternalEObject)activationSpec).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, null, msgs); - if (newActivationSpec != null) - msgs = ((InternalEObject)newActivationSpec).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, null, msgs); - msgs = basicSetActivationSpec(newActivationSpec, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC, newActivationSpec, newActivationSpec)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: - return basicSetActivationSpec(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: - return getMessageListenerType(); - case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: - return getActivationSpec(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: - setMessageListenerType((String)newValue); - return; - case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: - setActivationSpec((ActivationSpec)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: - setMessageListenerType(MESSAGE_LISTENER_TYPE_EDEFAULT); - return; - case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: - setActivationSpec((ActivationSpec)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.MESSAGE_LISTENER__MESSAGE_LISTENER_TYPE: - return MESSAGE_LISTENER_TYPE_EDEFAULT == null ? messageListenerType != null : !MESSAGE_LISTENER_TYPE_EDEFAULT.equals(messageListenerType); - case JcaPackage.MESSAGE_LISTENER__ACTIVATION_SPEC: - return activationSpec != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (messageListenerType: ");//$NON-NLS-1$ - result.append(messageListenerType); - result.append(')'); - return result.toString(); - } - -} //MessageListenerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/OutboundResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/OutboundResourceAdapterImpl.java deleted file mode 100644 index 219f287cd..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/OutboundResourceAdapterImpl.java +++ /dev/null @@ -1,383 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.TransactionSupportKind; - - -/** - * - * An implementation of the model object 'Outbound Resource Adapter'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#isReauthenticationSupport Reauthentication Support}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getTransactionSupport Transaction Support}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getConnectionDefinitions Connection Definitions}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.OutboundResourceAdapterImpl#getAuthenticationMechanisms Authentication Mechanisms}
  • - *
- *

- * - * @generated - */ -public class OutboundResourceAdapterImpl extends EObjectImpl implements OutboundResourceAdapter { - /** - * The default value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. - * - * - * @see #isReauthenticationSupport() - * @generated - * @ordered - */ - protected static final boolean REAUTHENTICATION_SUPPORT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. - * - * - * @see #isReauthenticationSupport() - * @generated - * @ordered - */ - protected boolean reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; - - /** - * This is true if the Reauthentication Support attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean reauthenticationSupportESet = false; - - /** - * The default value of the '{@link #getTransactionSupport() Transaction Support}' attribute. - * - * - * @see #getTransactionSupport() - * @generated - * @ordered - */ - protected static final TransactionSupportKind TRANSACTION_SUPPORT_EDEFAULT = TransactionSupportKind.NO_TRANSACTION_LITERAL; - - /** - * The cached value of the '{@link #getTransactionSupport() Transaction Support}' attribute. - * - * - * @see #getTransactionSupport() - * @generated - * @ordered - */ - protected TransactionSupportKind transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; - - /** - * This is true if the Transaction Support attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transactionSupportESet = false; - - /** - * The cached value of the '{@link #getConnectionDefinitions() Connection Definitions}' containment reference list. - * - * - * @see #getConnectionDefinitions() - * @generated - * @ordered - */ - protected EList connectionDefinitions = null; - - /** - * The cached value of the '{@link #getAuthenticationMechanisms() Authentication Mechanisms}' containment reference list. - * - * - * @see #getAuthenticationMechanisms() - * @generated - * @ordered - */ - protected EList authenticationMechanisms = null; - - /** - * - * - * @generated - */ - protected OutboundResourceAdapterImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getOutboundResourceAdapter(); - } - - /** - * - * - * @generated - */ - public boolean isReauthenticationSupport() { - return reauthenticationSupport; - } - - /** - * - * - * @generated - */ - public void setReauthenticationSupport(boolean newReauthenticationSupport) { - boolean oldReauthenticationSupport = reauthenticationSupport; - reauthenticationSupport = newReauthenticationSupport; - boolean oldReauthenticationSupportESet = reauthenticationSupportESet; - reauthenticationSupportESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, reauthenticationSupport, !oldReauthenticationSupportESet)); - } - - /** - * - * - * @generated - */ - public void unsetReauthenticationSupport() { - boolean oldReauthenticationSupport = reauthenticationSupport; - boolean oldReauthenticationSupportESet = reauthenticationSupportESet; - reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; - reauthenticationSupportESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, REAUTHENTICATION_SUPPORT_EDEFAULT, oldReauthenticationSupportESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetReauthenticationSupport() { - return reauthenticationSupportESet; - } - - /** - * - * - * @generated - */ - public TransactionSupportKind getTransactionSupport() { - return transactionSupport; - } - - /** - * - * - * @generated - */ - public void setTransactionSupport(TransactionSupportKind newTransactionSupport) { - TransactionSupportKind oldTransactionSupport = transactionSupport; - transactionSupport = newTransactionSupport == null ? TRANSACTION_SUPPORT_EDEFAULT : newTransactionSupport; - boolean oldTransactionSupportESet = transactionSupportESet; - transactionSupportESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, transactionSupport, !oldTransactionSupportESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransactionSupport() { - TransactionSupportKind oldTransactionSupport = transactionSupport; - boolean oldTransactionSupportESet = transactionSupportESet; - transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; - transactionSupportESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, TRANSACTION_SUPPORT_EDEFAULT, oldTransactionSupportESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransactionSupport() { - return transactionSupportESet; - } - - /** - * - * - * @generated - */ - public EList getConnectionDefinitions() { - if (connectionDefinitions == null) { - connectionDefinitions = new EObjectContainmentEList(ConnectionDefinition.class, this, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS); - } - return connectionDefinitions; - } - - /** - * - * - * @generated - */ - public EList getAuthenticationMechanisms() { - if (authenticationMechanisms == null) { - authenticationMechanisms = new EObjectContainmentEList(AuthenticationMechanism.class, this, JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); - } - return authenticationMechanisms; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: - return ((InternalEList)getConnectionDefinitions()).basicRemove(otherEnd, msgs); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return ((InternalEList)getAuthenticationMechanisms()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - return isReauthenticationSupport() ? Boolean.TRUE : Boolean.FALSE; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - return getTransactionSupport(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: - return getConnectionDefinitions(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return getAuthenticationMechanisms(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - setReauthenticationSupport(((Boolean)newValue).booleanValue()); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - setTransactionSupport((TransactionSupportKind)newValue); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: - getConnectionDefinitions().clear(); - getConnectionDefinitions().addAll((Collection)newValue); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - getAuthenticationMechanisms().clear(); - getAuthenticationMechanisms().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - unsetReauthenticationSupport(); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - unsetTransactionSupport(); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: - getConnectionDefinitions().clear(); - return; - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - getAuthenticationMechanisms().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - return isSetReauthenticationSupport(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - return isSetTransactionSupport(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__CONNECTION_DEFINITIONS: - return connectionDefinitions != null && !connectionDefinitions.isEmpty(); - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return authenticationMechanisms != null && !authenticationMechanisms.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (reauthenticationSupport: ");//$NON-NLS-1$ - if (reauthenticationSupportESet) result.append(reauthenticationSupport); else result.append("");//$NON-NLS-1$ - result.append(", transactionSupport: ");//$NON-NLS-1$ - if (transactionSupportESet) result.append(transactionSupport); else result.append("");//$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} //OutboundResourceAdapterImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/RequiredConfigPropertyTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/RequiredConfigPropertyTypeImpl.java deleted file mode 100644 index 96b7be83b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/RequiredConfigPropertyTypeImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; - - -/** - * - * An implementation of the model object 'Required Config Property Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.RequiredConfigPropertyTypeImpl#getName Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jca.impl.RequiredConfigPropertyTypeImpl#getDescriptions Descriptions}
  • - *
- *

- * - * @generated - */ -public class RequiredConfigPropertyTypeImpl extends EObjectImpl implements RequiredConfigPropertyType { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - /** - * - * - * @generated - */ - protected RequiredConfigPropertyTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getRequiredConfigPropertyType(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: - return getName(); - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: - setName((String)newValue); - return; - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: - setName(NAME_EDEFAULT); - return; - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: ");//$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -} //RequiredConfigPropertyTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ResourceAdapterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ResourceAdapterImpl.java deleted file mode 100644 index 4990c3be2..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/ResourceAdapterImpl.java +++ /dev/null @@ -1,817 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; -import org.eclipse.jst.j2ee.jca.TransactionSupportKind; - - -/** - * Specifies information about the resource adapter. The information includes fully-qualified names of class//interfaces required as part of the connector architecture specified contracts, level of transaction support provided, configurable properties for ManagedConnectionFactory instances, one or more authentication mechanisms supported and additional - * required security permissions. - * - * If there is no authentication-mechanism specified as part of - * resource adapter element then the resource adapter does not - * support any standard security authentication mechanisms as part - * of security contract. The application server ignores the security - * part of the system contracts in this case. - - */ -public class ResourceAdapterImpl extends EObjectImpl implements ResourceAdapter, EObject{ - - /** - * The default value of the '{@link #getManagedConnectionFactoryClass() Managed Connection Factory Class}' attribute. - * - * - * @see #getManagedConnectionFactoryClass() - * @generated - * @ordered - */ - protected static final String MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String managedConnectionFactoryClass = MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT; - /** - * The default value of the '{@link #getConnectionFactoryInterface() Connection Factory Interface}' attribute. - * - * - * @see #getConnectionFactoryInterface() - * @generated - * @ordered - */ - protected static final String CONNECTION_FACTORY_INTERFACE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String connectionFactoryInterface = CONNECTION_FACTORY_INTERFACE_EDEFAULT; - /** - * The default value of the '{@link #getConnectionFactoryImplClass() Connection Factory Impl Class}' attribute. - * - * - * @see #getConnectionFactoryImplClass() - * @generated - * @ordered - */ - protected static final String CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String connectionFactoryImplClass = CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT; - /** - * The default value of the '{@link #getConnectionInterface() Connection Interface}' attribute. - * - * - * @see #getConnectionInterface() - * @generated - * @ordered - */ - protected static final String CONNECTION_INTERFACE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String connectionInterface = CONNECTION_INTERFACE_EDEFAULT; - /** - * The default value of the '{@link #getConnectionImplClass() Connection Impl Class}' attribute. - * - * - * @see #getConnectionImplClass() - * @generated - * @ordered - */ - protected static final String CONNECTION_IMPL_CLASS_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String connectionImplClass = CONNECTION_IMPL_CLASS_EDEFAULT; - /** - * The default value of the '{@link #getTransactionSupport() Transaction Support}' attribute. - * - * - * @see #getTransactionSupport() - * @generated - * @ordered - */ - protected static final TransactionSupportKind TRANSACTION_SUPPORT_EDEFAULT = TransactionSupportKind.NO_TRANSACTION_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected TransactionSupportKind transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; - /** - * This is true if the Transaction Support attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transactionSupportESet = false; - - /** - * The default value of the '{@link #isReauthenticationSupport() Reauthentication Support}' attribute. - * - * - * @see #isReauthenticationSupport() - * @generated - * @ordered - */ - protected static final boolean REAUTHENTICATION_SUPPORT_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; - /** - * This is true if the Reauthentication Support attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean reauthenticationSupportESet = false; - - /** - * The default value of the '{@link #getResourceAdapterClass() Resource Adapter Class}' attribute. - * - * - * @see #getResourceAdapterClass() - * @generated - * @ordered - */ - protected static final String RESOURCE_ADAPTER_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getResourceAdapterClass() Resource Adapter Class}' attribute. - * - * - * @see #getResourceAdapterClass() - * @generated - * @ordered - */ - protected String resourceAdapterClass = RESOURCE_ADAPTER_CLASS_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityPermissions = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList authenticationMechanisms = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList configProperties = null; - /** - * The cached value of the '{@link #getOutboundResourceAdapter() Outbound Resource Adapter}' containment reference. - * - * - * @see #getOutboundResourceAdapter() - * @generated - * @ordered - */ - protected OutboundResourceAdapter outboundResourceAdapter = null; - - /** - * The cached value of the '{@link #getInboundResourceAdapter() Inbound Resource Adapter}' containment reference. - * - * - * @see #getInboundResourceAdapter() - * @generated - * @ordered - */ - protected InboundResourceAdapter inboundResourceAdapter = null; - - /** - * The cached value of the '{@link #getAdminObjects() Admin Objects}' containment reference list. - * - * - * @see #getAdminObjects() - * @generated - * @ordered - */ - protected EList adminObjects = null; - - protected ResourceAdapterImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getResourceAdapter(); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the fully qualified name of the Java class that implements the javax.resource.spi.Managed-ConnectionFactory interface. This Java class is provided as part of resource adapter's implementation of connector architecture specified contracts. - - */ - public String getManagedConnectionFactoryClass() { - return managedConnectionFactoryClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setManagedConnectionFactoryClass(String newManagedConnectionFactoryClass) { - String oldManagedConnectionFactoryClass = managedConnectionFactoryClass; - managedConnectionFactoryClass = newManagedConnectionFactoryClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS, oldManagedConnectionFactoryClass, managedConnectionFactoryClass)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the fully-qualified name of the ConnectionFactory interface supported by the resource adapter. - - */ - public String getConnectionFactoryInterface() { - return connectionFactoryInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setConnectionFactoryInterface(String newConnectionFactoryInterface) { - String oldConnectionFactoryInterface = connectionFactoryInterface; - connectionFactoryInterface = newConnectionFactoryInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE, oldConnectionFactoryInterface, connectionFactoryInterface)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the fully-qualified name of the ConnectionFactory class that implements resource adapter specific ConnectionFactory interface. - */ - public String getConnectionFactoryImplClass() { - return connectionFactoryImplClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setConnectionFactoryImplClass(String newConnectionFactoryImplClass) { - String oldConnectionFactoryImplClass = connectionFactoryImplClass; - connectionFactoryImplClass = newConnectionFactoryImplClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS, oldConnectionFactoryImplClass, connectionFactoryImplClass)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getConnectionInterface() { - return connectionInterface; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setConnectionInterface(String newConnectionInterface) { - String oldConnectionInterface = connectionInterface; - connectionInterface = newConnectionInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE, oldConnectionInterface, connectionInterface)); - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies the fully-qualified name of the Connection interface supported by the resource adapter. - */ - public String getConnectionImplClass() { - return connectionImplClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setConnectionImplClass(String newConnectionImplClass) { - String oldConnectionImplClass = connectionImplClass; - connectionImplClass = newConnectionImplClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS, oldConnectionImplClass, connectionImplClass)); - } - - /** - * @generated This field/method will be replaced during code generation - * The transaction-support element specifies the level of transaction - * support provided by the resource adapter. - * The value of transaction-support must be one of the following: - * NoTransaction - * LocalTransaction - * XATransaction - */ - public TransactionSupportKind getTransactionSupport() { - return transactionSupport; - } - - /** - * - * - * @generated - */ - public void setTransactionSupport(TransactionSupportKind newTransactionSupport) { - TransactionSupportKind oldTransactionSupport = transactionSupport; - transactionSupport = newTransactionSupport == null ? TRANSACTION_SUPPORT_EDEFAULT : newTransactionSupport; - boolean oldTransactionSupportESet = transactionSupportESet; - transactionSupportESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, transactionSupport, !oldTransactionSupportESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransactionSupport() { - TransactionSupportKind oldTransactionSupport = transactionSupport; - boolean oldTransactionSupportESet = transactionSupportESet; - transactionSupport = TRANSACTION_SUPPORT_EDEFAULT; - transactionSupportESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, TRANSACTION_SUPPORT_EDEFAULT, oldTransactionSupportESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransactionSupport() { - return transactionSupportESet; - } - - /** - * @generated This field/method will be replaced during code generation - * Specifies whether the resource adapter implementation supports re-authentication of existing Managed-Connection instance. Note that this information is for the resource adapter implementation and not for the underlying EIS instance. - */ - public boolean isReauthenticationSupport() { - return reauthenticationSupport; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setReauthenticationSupport(boolean newReauthenticationSupport) { - boolean oldReauthenticationSupport = reauthenticationSupport; - reauthenticationSupport = newReauthenticationSupport; - boolean oldReauthenticationSupportESet = reauthenticationSupportESet; - reauthenticationSupportESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, reauthenticationSupport, !oldReauthenticationSupportESet)); - } - - /** - * - * - * @generated - */ - public void unsetReauthenticationSupport() { - boolean oldReauthenticationSupport = reauthenticationSupport; - boolean oldReauthenticationSupportESet = reauthenticationSupportESet; - reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT; - reauthenticationSupportESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, REAUTHENTICATION_SUPPORT_EDEFAULT, oldReauthenticationSupportESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetReauthenticationSupport() { - return reauthenticationSupportESet; - } - - /** - * - * - * @generated - */ - public String getResourceAdapterClass() { - return resourceAdapterClass; - } - - /** - * - * - * @generated - */ - public void setResourceAdapterClass(String newResourceAdapterClass) { - String oldResourceAdapterClass = resourceAdapterClass; - resourceAdapterClass = newResourceAdapterClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS, oldResourceAdapterClass, resourceAdapterClass)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getSecurityPermissions() { - if (securityPermissions == null) { - securityPermissions = new EObjectContainmentEList(SecurityPermission.class, this, JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS); - } - return securityPermissions; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getAuthenticationMechanisms() { - if (authenticationMechanisms == null) { - authenticationMechanisms = new EObjectContainmentEList(AuthenticationMechanism.class, this, JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS); - } - return authenticationMechanisms; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getConfigProperties() { - if (configProperties == null) { - configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES); - } - return configProperties; - } - - /** - * - * - * @generated - */ - public OutboundResourceAdapter getOutboundResourceAdapter() { - return outboundResourceAdapter; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter, NotificationChain msgs) { - OutboundResourceAdapter oldOutboundResourceAdapter = outboundResourceAdapter; - outboundResourceAdapter = newOutboundResourceAdapter; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, oldOutboundResourceAdapter, newOutboundResourceAdapter); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter) { - if (newOutboundResourceAdapter != outboundResourceAdapter) { - NotificationChain msgs = null; - if (outboundResourceAdapter != null) - msgs = ((InternalEObject)outboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs); - if (newOutboundResourceAdapter != null) - msgs = ((InternalEObject)newOutboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs); - msgs = basicSetOutboundResourceAdapter(newOutboundResourceAdapter, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, newOutboundResourceAdapter, newOutboundResourceAdapter)); - } - - /** - * - * - * @generated - */ - public InboundResourceAdapter getInboundResourceAdapter() { - return inboundResourceAdapter; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter, NotificationChain msgs) { - InboundResourceAdapter oldInboundResourceAdapter = inboundResourceAdapter; - inboundResourceAdapter = newInboundResourceAdapter; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, oldInboundResourceAdapter, newInboundResourceAdapter); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter) { - if (newInboundResourceAdapter != inboundResourceAdapter) { - NotificationChain msgs = null; - if (inboundResourceAdapter != null) - msgs = ((InternalEObject)inboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs); - if (newInboundResourceAdapter != null) - msgs = ((InternalEObject)newInboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs); - msgs = basicSetInboundResourceAdapter(newInboundResourceAdapter, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, newInboundResourceAdapter, newInboundResourceAdapter)); - } - - /** - * - * - * @generated - */ - public EList getAdminObjects() { - if (adminObjects == null) { - adminObjects = new EObjectContainmentEList(AdminObject.class, this, JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS); - } - return adminObjects; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: - return ((InternalEList)getSecurityPermissions()).basicRemove(otherEnd, msgs); - case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return ((InternalEList)getAuthenticationMechanisms()).basicRemove(otherEnd, msgs); - case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: - return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs); - case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: - return basicSetOutboundResourceAdapter(null, msgs); - case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: - return basicSetInboundResourceAdapter(null, msgs); - case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: - return ((InternalEList)getAdminObjects()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: - return getManagedConnectionFactoryClass(); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: - return getConnectionFactoryInterface(); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: - return getConnectionFactoryImplClass(); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: - return getConnectionInterface(); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: - return getConnectionImplClass(); - case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - return getTransactionSupport(); - case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - return isReauthenticationSupport() ? Boolean.TRUE : Boolean.FALSE; - case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: - return getResourceAdapterClass(); - case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: - return getSecurityPermissions(); - case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return getAuthenticationMechanisms(); - case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: - return getConfigProperties(); - case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: - return getOutboundResourceAdapter(); - case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: - return getInboundResourceAdapter(); - case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: - return getAdminObjects(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: - return MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT == null ? managedConnectionFactoryClass != null : !MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT.equals(managedConnectionFactoryClass); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: - return CONNECTION_FACTORY_INTERFACE_EDEFAULT == null ? connectionFactoryInterface != null : !CONNECTION_FACTORY_INTERFACE_EDEFAULT.equals(connectionFactoryInterface); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: - return CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT == null ? connectionFactoryImplClass != null : !CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT.equals(connectionFactoryImplClass); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: - return CONNECTION_INTERFACE_EDEFAULT == null ? connectionInterface != null : !CONNECTION_INTERFACE_EDEFAULT.equals(connectionInterface); - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: - return CONNECTION_IMPL_CLASS_EDEFAULT == null ? connectionImplClass != null : !CONNECTION_IMPL_CLASS_EDEFAULT.equals(connectionImplClass); - case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - return isSetTransactionSupport(); - case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - return isSetReauthenticationSupport(); - case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: - return RESOURCE_ADAPTER_CLASS_EDEFAULT == null ? resourceAdapterClass != null : !RESOURCE_ADAPTER_CLASS_EDEFAULT.equals(resourceAdapterClass); - case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: - return securityPermissions != null && !securityPermissions.isEmpty(); - case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - return authenticationMechanisms != null && !authenticationMechanisms.isEmpty(); - case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: - return configProperties != null && !configProperties.isEmpty(); - case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: - return outboundResourceAdapter != null; - case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: - return inboundResourceAdapter != null; - case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: - return adminObjects != null && !adminObjects.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: - setManagedConnectionFactoryClass((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: - setConnectionFactoryInterface((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: - setConnectionFactoryImplClass((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: - setConnectionInterface((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: - setConnectionImplClass((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - setTransactionSupport((TransactionSupportKind)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - setReauthenticationSupport(((Boolean)newValue).booleanValue()); - return; - case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: - setResourceAdapterClass((String)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: - getSecurityPermissions().clear(); - getSecurityPermissions().addAll((Collection)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - getAuthenticationMechanisms().clear(); - getAuthenticationMechanisms().addAll((Collection)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: - getConfigProperties().clear(); - getConfigProperties().addAll((Collection)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: - setOutboundResourceAdapter((OutboundResourceAdapter)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: - setInboundResourceAdapter((InboundResourceAdapter)newValue); - return; - case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: - getAdminObjects().clear(); - getAdminObjects().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS: - setManagedConnectionFactoryClass(MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE: - setConnectionFactoryInterface(CONNECTION_FACTORY_INTERFACE_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS: - setConnectionFactoryImplClass(CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE: - setConnectionInterface(CONNECTION_INTERFACE_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS: - setConnectionImplClass(CONNECTION_IMPL_CLASS_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT: - unsetTransactionSupport(); - return; - case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT: - unsetReauthenticationSupport(); - return; - case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS: - setResourceAdapterClass(RESOURCE_ADAPTER_CLASS_EDEFAULT); - return; - case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS: - getSecurityPermissions().clear(); - return; - case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS: - getAuthenticationMechanisms().clear(); - return; - case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES: - getConfigProperties().clear(); - return; - case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER: - setOutboundResourceAdapter((OutboundResourceAdapter)null); - return; - case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER: - setInboundResourceAdapter((InboundResourceAdapter)null); - return; - case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS: - getAdminObjects().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (managedConnectionFactoryClass: ");//$NON-NLS-1$ - result.append(managedConnectionFactoryClass); - result.append(", connectionFactoryInterface: ");//$NON-NLS-1$ - result.append(connectionFactoryInterface); - result.append(", connectionFactoryImplClass: ");//$NON-NLS-1$ - result.append(connectionFactoryImplClass); - result.append(", connectionInterface: ");//$NON-NLS-1$ - result.append(connectionInterface); - result.append(", connectionImplClass: ");//$NON-NLS-1$ - result.append(connectionImplClass); - result.append(", transactionSupport: ");//$NON-NLS-1$ - if (transactionSupportESet) result.append(transactionSupport); else result.append("");//$NON-NLS-1$ - result.append(", reauthenticationSupport: ");//$NON-NLS-1$ - if (reauthenticationSupportESet) result.append(reauthenticationSupport); else result.append("");//$NON-NLS-1$ - result.append(", resourceAdapterClass: ");//$NON-NLS-1$ - result.append(resourceAdapterClass); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/SecurityPermissionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/SecurityPermissionImpl.java deleted file mode 100644 index d1ce6ae38..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/impl/SecurityPermissionImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.SecurityPermission; - - -/** - * Specifies a security permission that is required by the resource adapter code. - * - * The security permission listed in the deployment descriptor are ones that are different from those required by the default permission set as specified in the connector specification. The optional description can mention specific reason that resource adapter requires a given security permission. - - */ -public class SecurityPermissionImpl extends EObjectImpl implements SecurityPermission, EObject{ - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getSpecification() Specification}' attribute. - * - * - * @see #getSpecification() - * @generated - * @ordered - */ - protected static final String SPECIFICATION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String specification = SPECIFICATION_EDEFAULT; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected SecurityPermissionImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JcaPackage.eINSTANCE.getSecurityPermission(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.SECURITY_PERMISSION__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The element permission-spec specifies a security permission based on the Security policy file syntax. - - */ - public String getSpecification() { - return specification; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSpecification(String newSpecification) { - String oldSpecification = specification; - specification = newSpecification; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.SECURITY_PERMISSION__SPECIFICATION, oldSpecification, specification)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: - return getDescription(); - case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: - return getSpecification(); - case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: - return SPECIFICATION_EDEFAULT == null ? specification != null : !SPECIFICATION_EDEFAULT.equals(specification); - case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: - setDescription((String)newValue); - return; - case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: - setSpecification((String)newValue); - return; - case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JcaPackage.SECURITY_PERMISSION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JcaPackage.SECURITY_PERMISSION__SPECIFICATION: - setSpecification(SPECIFICATION_EDEFAULT); - return; - case JcaPackage.SECURITY_PERMISSION__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", specification: ");//$NON-NLS-1$ - result.append(specification); - result.append(')'); - return result.toString(); - } - -} - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JCADescriptionHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JCADescriptionHelper.java deleted file mode 100644 index 17c2d305f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JCADescriptionHelper.java +++ /dev/null @@ -1,157 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.util; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; -import org.eclipse.jst.j2ee.jca.SecurityPermission; - - -/** - * @deprecated - */ -public class JCADescriptionHelper { - public static void setDescription(ConfigProperty property, String description, int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - property.setDescription(description); - break; - case J2EEVersionConstants.JCA_1_5_ID: { - Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); - descriptionObj.setValue(description); - property.getDescriptions().add(descriptionObj); - } - } - } - public static String getDescription(ConfigProperty property,int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - return property.getDescription(); - case J2EEVersionConstants.JCA_1_5_ID: { - EList localizedDescriptions = property.getDescriptions(); - if(localizedDescriptions == null || localizedDescriptions.size() == 0) - return null; - Description localizedDescription = (Description)localizedDescriptions.get(0); - if(localizedDescription != null) - return localizedDescription.getValue(); - } - } - return null; - } - public static void setDescription(SecurityPermission property, String description, int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - property.setDescription(description); - break; - case J2EEVersionConstants.JCA_1_5_ID: { - Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); - descriptionObj.setValue(description); - property.getDescriptions().add(descriptionObj); - } - } - } - - public static String getDescription(SecurityPermission property,int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - return property.getDescription(); - case J2EEVersionConstants.JCA_1_5_ID: { - EList localizedDescriptions = property.getDescriptions(); - if(localizedDescriptions == null || localizedDescriptions.size() == 0) - return null; - Description localizedDescription = (Description)localizedDescriptions.get(0); - if(localizedDescription != null) - return localizedDescription.getValue(); - } - } - return null; - } - public static void setDescription(License property, String description, int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - property.setDescription(description); - break; - case J2EEVersionConstants.JCA_1_5_ID: { - Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); - descriptionObj.setValue(description); - property.getDescriptions().add(descriptionObj); - } - } - } - - public static String getDescription(License property,int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - return property.getDescription(); - case J2EEVersionConstants.JCA_1_5_ID: { - EList localizedDescriptions = property.getDescriptions(); - if(localizedDescriptions == null || localizedDescriptions.size() == 0) - return null; - Description localizedDescription = (Description)localizedDescriptions.get(0); - if(localizedDescription != null) - return localizedDescription.getValue(); - } - } - return null; - } - public static void setDescription(AuthenticationMechanism property, String description, int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - property.setDescription(description); - break; - case J2EEVersionConstants.JCA_1_5_ID: { - Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); - descriptionObj.setValue(description); - property.getDescriptions().add(descriptionObj); - } - } - } - - public static String getDescription(AuthenticationMechanism property,int jcaVersionID) { - switch(jcaVersionID) { - case J2EEVersionConstants.JCA_1_0_ID: - return property.getDescription(); - case J2EEVersionConstants.JCA_1_5_ID: { - EList localizedDescriptions = property.getDescriptions(); - if(localizedDescriptions == null || localizedDescriptions.size() == 0) - return null; - Description localizedDescription = (Description)localizedDescriptions.get(0); - if(localizedDescription != null) - return localizedDescription.getValue(); - } - } - return null; - } - public static void setDescription(RequiredConfigPropertyType property, String description, int jcaVersionID) { - if(jcaVersionID == J2EEVersionConstants.JCA_1_5_ID) { - Description descriptionObj = CommonFactory.eINSTANCE.createDescription(); - descriptionObj.setValue(description); - property.getDescriptions().add(descriptionObj); - } - } - public static String getDescription(RequiredConfigPropertyType property,int jcaVersionID) { - if(jcaVersionID == J2EEVersionConstants.JCA_1_5_ID) { - EList localizedDescriptions = property.getDescriptions(); - if(localizedDescriptions == null || localizedDescriptions.size() == 0) - return null; - Description localizedDescription = (Description)localizedDescriptions.get(0); - if(localizedDescription != null) - return localizedDescription.getValue(); - } - return null; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaAdapterFactory.java deleted file mode 100644 index 56757a7b0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaAdapterFactory.java +++ /dev/null @@ -1,392 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.MessageAdapter; -import org.eclipse.jst.j2ee.jca.MessageListener; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; - - - -public class JcaAdapterFactory extends AdapterFactoryImpl { - protected static JcaPackage modelPackage; - - public JcaAdapterFactory() { - if (modelPackage == null) { - modelPackage = (JcaPackage)EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - protected JcaSwitch sw = new JcaSwitch() { - public Object caseConnector(Connector object) { - return createConnectorAdapter(); - } - public Object caseLicense(License object) { - return createLicenseAdapter(); - } - public Object caseResourceAdapter(ResourceAdapter object) { - return createResourceAdapterAdapter(); - } - public Object caseSecurityPermission(SecurityPermission object) { - return createSecurityPermissionAdapter(); - } - public Object caseAuthenticationMechanism(AuthenticationMechanism object) { - return createAuthenticationMechanismAdapter(); - } - public Object caseConfigProperty(ConfigProperty object) { - return createConfigPropertyAdapter(); - } - }; - - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); // sw - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createConnectorAdapter() { - return null; - } - - public Adapter createLicenseAdapter() { - return null; - } - - public Adapter createResourceAdapterAdapter() { - return null; - } - - public Adapter createSecurityPermissionAdapter() { - return null; - } - - public Adapter createAuthenticationMechanismAdapter() { - return null; - } - - public Adapter createConfigPropertyAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected JcaSwitch modelSwitch = - new JcaSwitch() { - public Object caseConnector(Connector object) { - return createConnectorAdapter(); - } - public Object caseResourceAdapter(ResourceAdapter object) { - return createResourceAdapterAdapter(); - } - public Object caseAuthenticationMechanism(AuthenticationMechanism object) { - return createAuthenticationMechanismAdapter(); - } - public Object caseConfigProperty(ConfigProperty object) { - return createConfigPropertyAdapter(); - } - public Object caseSecurityPermission(SecurityPermission object) { - return createSecurityPermissionAdapter(); - } - public Object caseLicense(License object) { - return createLicenseAdapter(); - } - public Object caseInboundResourceAdapter(InboundResourceAdapter object) { - return createInboundResourceAdapterAdapter(); - } - public Object caseOutboundResourceAdapter(OutboundResourceAdapter object) { - return createOutboundResourceAdapterAdapter(); - } - public Object caseMessageAdapter(MessageAdapter object) { - return createMessageAdapterAdapter(); - } - public Object caseConnectionDefinition(ConnectionDefinition object) { - return createConnectionDefinitionAdapter(); - } - public Object caseAdminObject(AdminObject object) { - return createAdminObjectAdapter(); - } - public Object caseMessageListener(MessageListener object) { - return createMessageListenerAdapter(); - } - public Object caseActivationSpec(ActivationSpec object) { - return createActivationSpecAdapter(); - } - public Object caseRequiredConfigPropertyType(RequiredConfigPropertyType object) { - return createRequiredConfigPropertyTypeAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createConnectorAdapterGen() { - - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createLicenseAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.InboundResourceAdapter Inbound Resource Adapter}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.InboundResourceAdapter - * @generated - */ - public Adapter createInboundResourceAdapterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.OutboundResourceAdapter Outbound Resource Adapter}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.OutboundResourceAdapter - * @generated - */ - public Adapter createOutboundResourceAdapterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.MessageAdapter Message Adapter}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.MessageAdapter - * @generated - */ - public Adapter createMessageAdapterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.ConnectionDefinition Connection Definition}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.ConnectionDefinition - * @generated - */ - public Adapter createConnectionDefinitionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.AdminObject Admin Object}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.AdminObject - * @generated - */ - public Adapter createAdminObjectAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.MessageListener Message Listener}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.MessageListener - * @generated - */ - public Adapter createMessageListenerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.ActivationSpec Activation Spec}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.ActivationSpec - * @generated - */ - public Adapter createActivationSpecAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jca.RequiredConfigPropertyType Required Config Property Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jca.RequiredConfigPropertyType - * @generated - */ - public Adapter createRequiredConfigPropertyTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createResourceAdapterAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSecurityPermissionAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAuthenticationMechanismAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createConfigPropertyAdapterGen() { - return null; - } - -} //JcaAdapterFactory - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaSwitch.java deleted file mode 100644 index c9e699cc7..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/util/JcaSwitch.java +++ /dev/null @@ -1,427 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.jca.ActivationSpec; -import org.eclipse.jst.j2ee.jca.AdminObject; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.InboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.License; -import org.eclipse.jst.j2ee.jca.MessageAdapter; -import org.eclipse.jst.j2ee.jca.MessageListener; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.RequiredConfigPropertyType; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; - - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.jca.JcaPackage - * @generated - */ -public class JcaSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static JcaPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public JcaSwitch() { - if (modelPackage == null) { - modelPackage = JcaPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case JcaPackage.CONNECTOR: { - Connector connector = (Connector)theEObject; - Object result = caseConnector(connector); - if (result == null) result = caseCompatibilityDescriptionGroup(connector); - if (result == null) result = caseDescriptionGroup(connector); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.RESOURCE_ADAPTER: { - ResourceAdapter resourceAdapter = (ResourceAdapter)theEObject; - Object result = caseResourceAdapter(resourceAdapter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.AUTHENTICATION_MECHANISM: { - AuthenticationMechanism authenticationMechanism = (AuthenticationMechanism)theEObject; - Object result = caseAuthenticationMechanism(authenticationMechanism); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.CONFIG_PROPERTY: { - ConfigProperty configProperty = (ConfigProperty)theEObject; - Object result = caseConfigProperty(configProperty); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.SECURITY_PERMISSION: { - SecurityPermission securityPermission = (SecurityPermission)theEObject; - Object result = caseSecurityPermission(securityPermission); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.LICENSE: { - License license = (License)theEObject; - Object result = caseLicense(license); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.INBOUND_RESOURCE_ADAPTER: { - InboundResourceAdapter inboundResourceAdapter = (InboundResourceAdapter)theEObject; - Object result = caseInboundResourceAdapter(inboundResourceAdapter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.OUTBOUND_RESOURCE_ADAPTER: { - OutboundResourceAdapter outboundResourceAdapter = (OutboundResourceAdapter)theEObject; - Object result = caseOutboundResourceAdapter(outboundResourceAdapter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.MESSAGE_ADAPTER: { - MessageAdapter messageAdapter = (MessageAdapter)theEObject; - Object result = caseMessageAdapter(messageAdapter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.CONNECTION_DEFINITION: { - ConnectionDefinition connectionDefinition = (ConnectionDefinition)theEObject; - Object result = caseConnectionDefinition(connectionDefinition); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.ADMIN_OBJECT: { - AdminObject adminObject = (AdminObject)theEObject; - Object result = caseAdminObject(adminObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.MESSAGE_LISTENER: { - MessageListener messageListener = (MessageListener)theEObject; - Object result = caseMessageListener(messageListener); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.ACTIVATION_SPEC: { - ActivationSpec activationSpec = (ActivationSpec)theEObject; - Object result = caseActivationSpec(activationSpec); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JcaPackage.REQUIRED_CONFIG_PROPERTY_TYPE: { - RequiredConfigPropertyType requiredConfigPropertyType = (RequiredConfigPropertyType)theEObject; - Object result = caseRequiredConfigPropertyType(requiredConfigPropertyType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Connector'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Connector'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseConnector(Connector object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Resource Adapter'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Resource Adapter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseResourceAdapter(ResourceAdapter object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Authentication Mechanism'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Authentication Mechanism'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseAuthenticationMechanism(AuthenticationMechanism object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Config Property'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Config Property'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseConfigProperty(ConfigProperty object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Security Permission'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Security Permission'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSecurityPermission(SecurityPermission object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'License'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'License'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseLicense(License object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Inbound Resource Adapter'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Inbound Resource Adapter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseInboundResourceAdapter(InboundResourceAdapter object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Outbound Resource Adapter'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Outbound Resource Adapter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseOutboundResourceAdapter(OutboundResourceAdapter object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Adapter'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Adapter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageAdapter(MessageAdapter object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Connection Definition'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Connection Definition'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseConnectionDefinition(ConnectionDefinition object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Admin Object'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Admin Object'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseAdminObject(AdminObject object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Listener'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Listener'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageListener(MessageListener object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Activation Spec'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Activation Spec'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseActivationSpec(ActivationSpec object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Required Config Property Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Required Config Property Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRequiredConfigPropertyType(RequiredConfigPropertyType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //JcaSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspFactory.java index ed50d0a71..af17586f5 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspFactory.java @@ -27,7 +27,7 @@ public interface JspFactory extends EFactory{ * * @generated */ - JspFactory eINSTANCE = new org.eclipse.jst.j2ee.jsp.impl.JspFactoryImpl(); + JspFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.jsp.impl.JspFactoryImpl(); /** * Returns a new object of class 'JSP Config'. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspPackage.java index a1fcce4de..be214cb7b 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/JspPackage.java @@ -62,7 +62,7 @@ public interface JspPackage extends EPackage{ * * @generated */ - JspPackage eINSTANCE = org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl.init(); + JspPackage eINSTANCE = org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl.init(); /** * The meta object id for the '{@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPConfigImpl JSP Config}' class. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPConfigImpl.java deleted file mode 100644 index 0e7f76e34..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPConfigImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; - - -/** - * - * An implementation of the model object 'JSP Config'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPConfigImpl#getTagLibs Tag Libs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPConfigImpl#getPropertyGroups Property Groups}
  • - *
- *

- * - * @generated - */ -public class JSPConfigImpl extends EObjectImpl implements JSPConfig { - /** - * The cached value of the '{@link #getTagLibs() Tag Libs}' containment reference list. - * - * - * @see #getTagLibs() - * @generated - * @ordered - */ - protected EList tagLibs = null; - - /** - * The cached value of the '{@link #getPropertyGroups() Property Groups}' containment reference list. - * - * - * @see #getPropertyGroups() - * @generated - * @ordered - */ - protected EList propertyGroups = null; - - /** - * - * - * @generated - */ - protected JSPConfigImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JspPackage.eINSTANCE.getJSPConfig(); - } - - /** - * - * - * @generated - */ - public EList getTagLibs() { - if (tagLibs == null) { - tagLibs = new EObjectContainmentEList(TagLibRefType.class, this, JspPackage.JSP_CONFIG__TAG_LIBS); - } - return tagLibs; - } - - /** - * - * - * @generated - */ - public EList getPropertyGroups() { - if (propertyGroups == null) { - propertyGroups = new EObjectContainmentEList(JSPPropertyGroup.class, this, JspPackage.JSP_CONFIG__PROPERTY_GROUPS); - } - return propertyGroups; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JspPackage.JSP_CONFIG__TAG_LIBS: - return ((InternalEList)getTagLibs()).basicRemove(otherEnd, msgs); - case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: - return ((InternalEList)getPropertyGroups()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_CONFIG__TAG_LIBS: - return getTagLibs(); - case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: - return getPropertyGroups(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_CONFIG__TAG_LIBS: - getTagLibs().clear(); - getTagLibs().addAll((Collection)newValue); - return; - case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: - getPropertyGroups().clear(); - getPropertyGroups().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_CONFIG__TAG_LIBS: - getTagLibs().clear(); - return; - case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: - getPropertyGroups().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_CONFIG__TAG_LIBS: - return tagLibs != null && !tagLibs.isEmpty(); - case JspPackage.JSP_CONFIG__PROPERTY_GROUPS: - return propertyGroups != null && !propertyGroups.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //JSPConfigImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPPropertyGroupImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPPropertyGroupImpl.java deleted file mode 100644 index 0fb32b613..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JSPPropertyGroupImpl.java +++ /dev/null @@ -1,637 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspPackage; - - -/** - * - * An implementation of the model object 'JSP Property Group'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getUrlPattern Url Pattern}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isElIgnored El Ignored}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getPageEncoding Page Encoding}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isScriptingInvalid Scripting Invalid}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#isIsXML Is XML}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getIncludePreludes Include Preludes}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.JSPPropertyGroupImpl#getIncludeCodas Include Codas}
  • - *
- *

- * - * @generated - */ -public class JSPPropertyGroupImpl extends CompatibilityDescriptionGroupImpl implements JSPPropertyGroup { - /** - * The cached value of the '{@link #getUrlPattern() Url Pattern}' attribute list. - * - * - * @see #getUrlPattern() - * @generated - * @ordered - */ - protected EList urlPattern = null; - - /** - * The default value of the '{@link #isElIgnored() El Ignored}' attribute. - * - * - * @see #isElIgnored() - * @generated - * @ordered - */ - protected static final boolean EL_IGNORED_EDEFAULT = true; - - /** - * The cached value of the '{@link #isElIgnored() El Ignored}' attribute. - * - * - * @see #isElIgnored() - * @generated - * @ordered - */ - protected boolean elIgnored = EL_IGNORED_EDEFAULT; - - /** - * This is true if the El Ignored attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean elIgnoredESet = false; - - /** - * The default value of the '{@link #getPageEncoding() Page Encoding}' attribute. - * - * - * @see #getPageEncoding() - * @generated - * @ordered - */ - protected static final String PAGE_ENCODING_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPageEncoding() Page Encoding}' attribute. - * - * - * @see #getPageEncoding() - * @generated - * @ordered - */ - protected String pageEncoding = PAGE_ENCODING_EDEFAULT; - - /** - * The default value of the '{@link #isScriptingInvalid() Scripting Invalid}' attribute. - * - * - * @see #isScriptingInvalid() - * @generated - * @ordered - */ - protected static final boolean SCRIPTING_INVALID_EDEFAULT = true; - - /** - * The cached value of the '{@link #isScriptingInvalid() Scripting Invalid}' attribute. - * - * - * @see #isScriptingInvalid() - * @generated - * @ordered - */ - protected boolean scriptingInvalid = SCRIPTING_INVALID_EDEFAULT; - - /** - * This is true if the Scripting Invalid attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean scriptingInvalidESet = false; - - /** - * The default value of the '{@link #isIsXML() Is XML}' attribute. - * - * - * @see #isIsXML() - * @generated - * @ordered - */ - protected static final boolean IS_XML_EDEFAULT = false; - - /** - * The cached value of the '{@link #isIsXML() Is XML}' attribute. - * - * - * @see #isIsXML() - * @generated - * @ordered - */ - protected boolean isXML = IS_XML_EDEFAULT; - - /** - * This is true if the Is XML attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean isXMLESet = false; - - /** - * The cached value of the '{@link #getIncludePreludes() Include Preludes}' attribute list. - * - * - * @see #getIncludePreludes() - * @generated - * @ordered - */ - protected EList includePreludes = null; - - /** - * The cached value of the '{@link #getIncludeCodas() Include Codas}' attribute list. - * - * - * @see #getIncludeCodas() - * @generated - * @ordered - */ - protected EList includeCodas = null; - - /** - * - * - * @generated - */ - protected JSPPropertyGroupImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JspPackage.eINSTANCE.getJSPPropertyGroup(); - } - - /** - * - * - * @generated - */ - public EList getUrlPattern() { - if (urlPattern == null) { - urlPattern = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN); - } - return urlPattern; - } - - /** - * - * - * @generated - */ - public boolean isElIgnored() { - return elIgnored; - } - - /** - * - * - * @generated - */ - public void setElIgnored(boolean newElIgnored) { - boolean oldElIgnored = elIgnored; - elIgnored = newElIgnored; - boolean oldElIgnoredESet = elIgnoredESet; - elIgnoredESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED, oldElIgnored, elIgnored, !oldElIgnoredESet)); - } - - /** - * - * - * @generated - */ - public void unsetElIgnored() { - boolean oldElIgnored = elIgnored; - boolean oldElIgnoredESet = elIgnoredESet; - elIgnored = EL_IGNORED_EDEFAULT; - elIgnoredESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED, oldElIgnored, EL_IGNORED_EDEFAULT, oldElIgnoredESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetElIgnored() { - return elIgnoredESet; - } - - /** - * - * - * @generated - */ - public String getPageEncoding() { - return pageEncoding; - } - - /** - * - * - * @generated - */ - public void setPageEncoding(String newPageEncoding) { - String oldPageEncoding = pageEncoding; - pageEncoding = newPageEncoding; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING, oldPageEncoding, pageEncoding)); - } - - /** - * - * - * @generated - */ - public boolean isScriptingInvalid() { - return scriptingInvalid; - } - - /** - * - * - * @generated - */ - public void setScriptingInvalid(boolean newScriptingInvalid) { - boolean oldScriptingInvalid = scriptingInvalid; - scriptingInvalid = newScriptingInvalid; - boolean oldScriptingInvalidESet = scriptingInvalidESet; - scriptingInvalidESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID, oldScriptingInvalid, scriptingInvalid, !oldScriptingInvalidESet)); - } - - /** - * - * - * @generated - */ - public void unsetScriptingInvalid() { - boolean oldScriptingInvalid = scriptingInvalid; - boolean oldScriptingInvalidESet = scriptingInvalidESet; - scriptingInvalid = SCRIPTING_INVALID_EDEFAULT; - scriptingInvalidESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID, oldScriptingInvalid, SCRIPTING_INVALID_EDEFAULT, oldScriptingInvalidESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetScriptingInvalid() { - return scriptingInvalidESet; - } - - /** - * - * - * @generated - */ - public boolean isIsXML() { - return isXML; - } - - /** - * - * - * @generated - */ - public void setIsXML(boolean newIsXML) { - boolean oldIsXML = isXML; - isXML = newIsXML; - boolean oldIsXMLESet = isXMLESet; - isXMLESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.JSP_PROPERTY_GROUP__IS_XML, oldIsXML, isXML, !oldIsXMLESet)); - } - - /** - * - * - * @generated - */ - public void unsetIsXML() { - boolean oldIsXML = isXML; - boolean oldIsXMLESet = isXMLESet; - isXML = IS_XML_EDEFAULT; - isXMLESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, JspPackage.JSP_PROPERTY_GROUP__IS_XML, oldIsXML, IS_XML_EDEFAULT, oldIsXMLESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetIsXML() { - return isXMLESet; - } - - /** - * - * - * @generated - */ - public EList getIncludePreludes() { - if (includePreludes == null) { - includePreludes = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES); - } - return includePreludes; - } - - /** - * - * - * @generated - */ - public EList getIncludeCodas() { - if (includeCodas == null) { - includeCodas = new EDataTypeUniqueEList(String.class, this, JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS); - } - return includeCodas; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JspPackage.JSP_PROPERTY_GROUP__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_PROPERTY_GROUP__ICONS: - return getIcons(); - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: - return getDisplayNames(); - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: - return getDescriptions(); - case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: - return getSmallIcon(); - case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: - return getLargeIcon(); - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: - return getDescription(); - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: - return getDisplayName(); - case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: - return getUrlPattern(); - case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: - return isElIgnored() ? Boolean.TRUE : Boolean.FALSE; - case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: - return getPageEncoding(); - case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: - return isScriptingInvalid() ? Boolean.TRUE : Boolean.FALSE; - case JspPackage.JSP_PROPERTY_GROUP__IS_XML: - return isIsXML() ? Boolean.TRUE : Boolean.FALSE; - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: - return getIncludePreludes(); - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: - return getIncludeCodas(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_PROPERTY_GROUP__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: - setDescription((String)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: - getUrlPattern().clear(); - getUrlPattern().addAll((Collection)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: - setElIgnored(((Boolean)newValue).booleanValue()); - return; - case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: - setPageEncoding((String)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: - setScriptingInvalid(((Boolean)newValue).booleanValue()); - return; - case JspPackage.JSP_PROPERTY_GROUP__IS_XML: - setIsXML(((Boolean)newValue).booleanValue()); - return; - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: - getIncludePreludes().clear(); - getIncludePreludes().addAll((Collection)newValue); - return; - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: - getIncludeCodas().clear(); - getIncludeCodas().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_PROPERTY_GROUP__ICONS: - getIcons().clear(); - return; - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: - getDescriptions().clear(); - return; - case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: - getUrlPattern().clear(); - return; - case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: - unsetElIgnored(); - return; - case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: - setPageEncoding(PAGE_ENCODING_EDEFAULT); - return; - case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: - unsetScriptingInvalid(); - return; - case JspPackage.JSP_PROPERTY_GROUP__IS_XML: - unsetIsXML(); - return; - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: - getIncludePreludes().clear(); - return; - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: - getIncludeCodas().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.JSP_PROPERTY_GROUP__ICONS: - return icons != null && !icons.isEmpty(); - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case JspPackage.JSP_PROPERTY_GROUP__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case JspPackage.JSP_PROPERTY_GROUP__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case JspPackage.JSP_PROPERTY_GROUP__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case JspPackage.JSP_PROPERTY_GROUP__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN: - return urlPattern != null && !urlPattern.isEmpty(); - case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED: - return isSetElIgnored(); - case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING: - return PAGE_ENCODING_EDEFAULT == null ? pageEncoding != null : !PAGE_ENCODING_EDEFAULT.equals(pageEncoding); - case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID: - return isSetScriptingInvalid(); - case JspPackage.JSP_PROPERTY_GROUP__IS_XML: - return isSetIsXML(); - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES: - return includePreludes != null && !includePreludes.isEmpty(); - case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS: - return includeCodas != null && !includeCodas.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (urlPattern: ");//$NON-NLS-1$ - result.append(urlPattern); - result.append(", elIgnored: ");//$NON-NLS-1$ - if (elIgnoredESet) result.append(elIgnored); else result.append("");//$NON-NLS-1$ - result.append(", pageEncoding: ");//$NON-NLS-1$ - result.append(pageEncoding); - result.append(", scriptingInvalid: ");//$NON-NLS-1$ - if (scriptingInvalidESet) result.append(scriptingInvalid); else result.append("");//$NON-NLS-1$ - result.append(", isXML: ");//$NON-NLS-1$ - if (isXMLESet) result.append(isXML); else result.append("");//$NON-NLS-1$ - result.append(", includePreludes: ");//$NON-NLS-1$ - result.append(includePreludes); - result.append(", includeCodas: ");//$NON-NLS-1$ - result.append(includeCodas); - result.append(')'); - return result.toString(); - } - -} //JSPPropertyGroupImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspFactoryImpl.java deleted file mode 100644 index 2cb253e9d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspFactoryImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.impl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspFactory; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; - - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class JspFactoryImpl extends EFactoryImpl implements JspFactory { - /** - * Creates and instance of the factory. - * - * - * @generated - */ - public JspFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case JspPackage.JSP_CONFIG: return createJSPConfig(); - case JspPackage.JSP_PROPERTY_GROUP: return createJSPPropertyGroup(); - case JspPackage.TAG_LIB_REF_TYPE: return createTagLibRefType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public JSPConfig createJSPConfig() { - JSPConfigImpl jspConfig = new JSPConfigImpl(); - return jspConfig; - } - - /** - * - * - * @generated - */ - public JSPPropertyGroup createJSPPropertyGroup() { - JSPPropertyGroupImpl jspPropertyGroup = new JSPPropertyGroupImpl(); - return jspPropertyGroup; - } - - /** - * - * - * @generated - */ - public TagLibRefType createTagLibRefType() { - TagLibRefTypeImpl tagLibRefType = new TagLibRefTypeImpl(); - return tagLibRefType; - } - - /** - * - * - * @generated - */ - public JspPackage getJspPackage() { - return (JspPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static JspPackage getPackage() { - return JspPackage.eINSTANCE; - } -} //JspFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspPackageImpl.java deleted file mode 100644 index 22bf9ff62..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/JspPackageImpl.java +++ /dev/null @@ -1,398 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspFactory; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class JspPackageImpl extends EPackageImpl implements JspPackage { - /** - * - * - * @generated - */ - private EClass jspConfigEClass = null; - - /** - * - * - * @generated - */ - private EClass jspPropertyGroupEClass = null; - - /** - * - * - * @generated - */ - private EClass tagLibRefTypeEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage#eNS_URI - * @see #init() - * @generated - */ - private JspPackageImpl() { - super(eNS_URI, JspFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static JspPackage init() { - if (isInited) return (JspPackage)EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI); - - // Obtain or create and register package. - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JspPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - - // Step 1: create meta-model objects - theJspPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - - // Step 2: complete initialization - theJspPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - - return theJspPackage; - } - - /** - * - * - * @generated - */ - public EClass getJSPConfig() { - return jspConfigEClass; - } - - /** - * - * - * @generated - */ - public EReference getJSPConfig_TagLibs() { - return (EReference)jspConfigEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getJSPConfig_PropertyGroups() { - return (EReference)jspConfigEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getJSPPropertyGroup() { - return jspPropertyGroupEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_UrlPattern() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_ElIgnored() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_PageEncoding() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_ScriptingInvalid() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_IsXML() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_IncludePreludes() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPPropertyGroup_IncludeCodas() { - return (EAttribute)jspPropertyGroupEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EClass getTagLibRefType() { - return tagLibRefTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getTagLibRefType_TaglibURI() { - return (EAttribute)tagLibRefTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getTagLibRefType_TaglibLocation() { - return (EAttribute)tagLibRefTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public JspFactory getJspFactory() { - return (JspFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - jspConfigEClass = createEClass(JSP_CONFIG); - createEReference(jspConfigEClass, JSP_CONFIG__TAG_LIBS); - createEReference(jspConfigEClass, JSP_CONFIG__PROPERTY_GROUPS); - - jspPropertyGroupEClass = createEClass(JSP_PROPERTY_GROUP); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__URL_PATTERN); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__EL_IGNORED); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__PAGE_ENCODING); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__SCRIPTING_INVALID); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__IS_XML); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__INCLUDE_PRELUDES); - createEAttribute(jspPropertyGroupEClass, JSP_PROPERTY_GROUP__INCLUDE_CODAS); - - tagLibRefTypeEClass = createEClass(TAG_LIB_REF_TYPE); - createEAttribute(tagLibRefTypeEClass, TAG_LIB_REF_TYPE__TAGLIB_URI); - createEAttribute(tagLibRefTypeEClass, TAG_LIB_REF_TYPE__TAGLIB_LOCATION); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - - // Add supertypes to classes - jspPropertyGroupEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(jspConfigEClass, JSPConfig.class, "JSPConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getJSPConfig_TagLibs(), this.getTagLibRefType(), null, "tagLibs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPConfig_PropertyGroups(), this.getJSPPropertyGroup(), null, "propertyGroups", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(jspPropertyGroupEClass, JSPPropertyGroup.class, "JSPPropertyGroup", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getJSPPropertyGroup_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPPropertyGroup_ElIgnored(), ecorePackage.getEBoolean(), "elIgnored", "true", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getJSPPropertyGroup_PageEncoding(), ecorePackage.getEString(), "pageEncoding", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPPropertyGroup_ScriptingInvalid(), ecorePackage.getEBoolean(), "scriptingInvalid", "true", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getJSPPropertyGroup_IsXML(), ecorePackage.getEBoolean(), "isXML", "false", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getJSPPropertyGroup_IncludePreludes(), ecorePackage.getEString(), "includePreludes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPPropertyGroup_IncludeCodas(), ecorePackage.getEString(), "includeCodas", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(tagLibRefTypeEClass, TagLibRefType.class, "TagLibRefType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getTagLibRefType_TaglibURI(), ecorePackage.getEString(), "taglibURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagLibRefType_TaglibLocation(), ecorePackage.getEString(), "taglibLocation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } -} //JspPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/TagLibRefTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/TagLibRefTypeImpl.java deleted file mode 100644 index 8b253bf2c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/impl/TagLibRefTypeImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; - - -/** - * - * An implementation of the model object 'Tag Lib Ref Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.TagLibRefTypeImpl#getTaglibURI Taglib URI}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.jsp.impl.TagLibRefTypeImpl#getTaglibLocation Taglib Location}
  • - *
- *

- * - * @generated - */ -public class TagLibRefTypeImpl extends EObjectImpl implements TagLibRefType { - /** - * The default value of the '{@link #getTaglibURI() Taglib URI}' attribute. - * - * - * @see #getTaglibURI() - * @generated - * @ordered - */ - protected static final String TAGLIB_URI_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTaglibURI() Taglib URI}' attribute. - * - * - * @see #getTaglibURI() - * @generated - * @ordered - */ - protected String taglibURI = TAGLIB_URI_EDEFAULT; - - /** - * The default value of the '{@link #getTaglibLocation() Taglib Location}' attribute. - * - * - * @see #getTaglibLocation() - * @generated - * @ordered - */ - protected static final String TAGLIB_LOCATION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTaglibLocation() Taglib Location}' attribute. - * - * - * @see #getTaglibLocation() - * @generated - * @ordered - */ - protected String taglibLocation = TAGLIB_LOCATION_EDEFAULT; - - /** - * - * - * @generated - */ - protected TagLibRefTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return JspPackage.eINSTANCE.getTagLibRefType(); - } - - /** - * - * - * @generated - */ - public String getTaglibURI() { - return taglibURI; - } - - /** - * - * - * @generated - */ - public void setTaglibURI(String newTaglibURI) { - String oldTaglibURI = taglibURI; - taglibURI = newTaglibURI; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI, oldTaglibURI, taglibURI)); - } - - /** - * - * - * @generated - */ - public String getTaglibLocation() { - return taglibLocation; - } - - /** - * - * - * @generated - */ - public void setTaglibLocation(String newTaglibLocation) { - String oldTaglibLocation = taglibLocation; - taglibLocation = newTaglibLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION, oldTaglibLocation, taglibLocation)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: - return getTaglibURI(); - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: - return getTaglibLocation(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: - setTaglibURI((String)newValue); - return; - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: - setTaglibLocation((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: - setTaglibURI(TAGLIB_URI_EDEFAULT); - return; - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: - setTaglibLocation(TAGLIB_LOCATION_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI: - return TAGLIB_URI_EDEFAULT == null ? taglibURI != null : !TAGLIB_URI_EDEFAULT.equals(taglibURI); - case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION: - return TAGLIB_LOCATION_EDEFAULT == null ? taglibLocation != null : !TAGLIB_LOCATION_EDEFAULT.equals(taglibLocation); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (taglibURI: ");//$NON-NLS-1$ - result.append(taglibURI); - result.append(", taglibLocation: ");//$NON-NLS-1$ - result.append(taglibLocation); - result.append(')'); - return result.toString(); - } - -} //TagLibRefTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspAdapterFactory.java deleted file mode 100644 index b25f2e512..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspAdapterFactory.java +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; - - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage - * @generated - */ -public class JspAdapterFactory extends AdapterFactoryImpl -{ - /** - * The cached model package. - * - * - * @generated - */ - protected static JspPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public JspAdapterFactory() { - if (modelPackage == null) { - modelPackage = JspPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected JspSwitch modelSwitch = - new JspSwitch() { - public Object caseJSPConfig(JSPConfig object) { - return createJSPConfigAdapter(); - } - public Object caseJSPPropertyGroup(JSPPropertyGroup object) { - return createJSPPropertyGroupAdapter(); - } - public Object caseTagLibRefType(TagLibRefType object) { - return createTagLibRefTypeAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.JSPConfig JSP Config}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jsp.JSPConfig - * @generated - */ - public Adapter createJSPConfigAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.JSPPropertyGroup JSP Property Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jsp.JSPPropertyGroup - * @generated - */ - public Adapter createJSPPropertyGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.jsp.TagLibRefType Tag Lib Ref Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.jsp.TagLibRefType - * @generated - */ - public Adapter createTagLibRefTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //JspAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspSwitch.java deleted file mode 100644 index 8c3363eb5..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jsp/util/JspSwitch.java +++ /dev/null @@ -1,184 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.jsp.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.jsp.JspPackage - * @generated - */ -public class JspSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static JspPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public JspSwitch() { - if (modelPackage == null) { - modelPackage = JspPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case JspPackage.JSP_CONFIG: { - JSPConfig jspConfig = (JSPConfig)theEObject; - Object result = caseJSPConfig(jspConfig); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JspPackage.JSP_PROPERTY_GROUP: { - JSPPropertyGroup jspPropertyGroup = (JSPPropertyGroup)theEObject; - Object result = caseJSPPropertyGroup(jspPropertyGroup); - if (result == null) result = caseCompatibilityDescriptionGroup(jspPropertyGroup); - if (result == null) result = caseDescriptionGroup(jspPropertyGroup); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JspPackage.TAG_LIB_REF_TYPE: { - TagLibRefType tagLibRefType = (TagLibRefType)theEObject; - Object result = caseTagLibRefType(tagLibRefType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'JSP Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JSP Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJSPConfig(JSPConfig object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'JSP Property Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JSP Property Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJSPPropertyGroup(JSPPropertyGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Tag Lib Ref Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Tag Lib Ref Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseTagLibRefType(TagLibRefType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //JspSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/Connector14SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/Connector14SpecificationMigrator.java deleted file mode 100644 index 091868a0a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/Connector14SpecificationMigrator.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 31, 2004 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.migration; - -import java.util.List; - -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanism; -import org.eclipse.jst.j2ee.jca.AuthenticationMechanismType; -import org.eclipse.jst.j2ee.jca.ConfigProperty; -import org.eclipse.jst.j2ee.jca.ConnectionDefinition; -import org.eclipse.jst.j2ee.jca.Connector; -import org.eclipse.jst.j2ee.jca.JcaFactory; -import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter; -import org.eclipse.jst.j2ee.jca.ResourceAdapter; -import org.eclipse.jst.j2ee.jca.SecurityPermission; - - -/** - * To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -public class Connector14SpecificationMigrator { - /** - * @param connector - */ - public J2EEMigrationStatus migrateConnectorTo14(Connector connector) { - migrateResourceAdaptor(connector); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,( - new J2EEMigrationStatus()).format(J2EESpecificationMigrator.DEFAULT_COMPLETED_STATUS_MSG,connector.getDisplayName())); - } - - /** - * @param connector - */ - private void migrateResourceAdaptor(Connector connector) { - ResourceAdapter resAdaptor = connector.getResourceAdapter(); - if(resAdaptor != null) { - OutboundResourceAdapter outboundAdaptor = JcaFactory.eINSTANCE.createOutboundResourceAdapter(); - outboundAdaptor.setReauthenticationSupport(resAdaptor.isReauthenticationSupport()); - outboundAdaptor.setTransactionSupport(resAdaptor.getTransactionSupport()); - - ConnectionDefinition connDefinition = JcaFactory.eINSTANCE.createConnectionDefinition(); - connDefinition.setManagedConnectionFactoryClass(resAdaptor.getManagedConnectionFactoryClass()); - connDefinition.setConnectionFactoryInterface(resAdaptor.getConnectionFactoryInterface()); - connDefinition.setConnectionFactoryImplClass(resAdaptor.getConnectionFactoryImplClass()); - connDefinition.setConnectionInterface(resAdaptor.getConnectionInterface()); - connDefinition.setConnectionImplClass(resAdaptor.getConnectionImplClass()); - - outboundAdaptor.getConnectionDefinitions().add(connDefinition); - - resAdaptor.setOutboundResourceAdapter(outboundAdaptor); - - migrateAuthenticationMechanism(resAdaptor); - - migrateDescriptions(resAdaptor); - - } - } - /** - * @param resAdaptor - */ - private void migrateDescriptions(ResourceAdapter resAdaptor) { - List secPermissions = resAdaptor.getSecurityPermissions(); - if(!secPermissions.isEmpty()) { - for(int i = 0; i < secPermissions.size(); i++) { - SecurityPermission secPerm = (SecurityPermission)secPermissions.get(i); - String secDescription = secPerm.getDescription(); - if(secDescription != null && secDescription.length() > 0) { - Description description = CommonFactory.eINSTANCE.createDescription(); - description.setValue(secDescription); - secPerm.getDescriptions().add(description); - } - - } - } - List authMechanisms = resAdaptor.getAuthenticationMechanisms(); - if(!authMechanisms.isEmpty()) { - for(int i = 0 ; i < authMechanisms.size(); i++) { - AuthenticationMechanism authMech = (AuthenticationMechanism)authMechanisms.get(i); - String authDescrition = authMech.getDescription(); - if(authDescrition != null && authDescrition.length() > 0) { - Description description = CommonFactory.eINSTANCE.createDescription(); - description.setValue(authDescrition); - authMech.getDescriptions().add(description); - } - } - } - List configProps = resAdaptor.getConfigProperties(); - if(!configProps.isEmpty()) { - for(int i = 0; i < configProps.size(); i++) { - ConfigProperty configProp = (ConfigProperty)configProps.get(i); - String configDescription = configProp.getDescription(); - if(configDescription != null && configDescription.length() > 0) { - Description description = CommonFactory.eINSTANCE.createDescription(); - description.setValue(configDescription); - configProp.getDescriptions().add(description); - } - } - } - } - /** - * @param resAdaptor - */ - private void migrateAuthenticationMechanism(ResourceAdapter resAdaptor) { - List authMechanisms = resAdaptor.getAuthenticationMechanisms(); - for (int i = 0; i < authMechanisms.size(); i++) { - AuthenticationMechanism authMech = (AuthenticationMechanism)authMechanisms.get(i); - AuthenticationMechanismType authType = authMech.getAuthenticationMechanismType(); - if(authType != null) { - authMech.setAuthenticationMechanism(authType.getName()); - } else { - String customAuth = authMech.getCustomAuthMechType(); - if(customAuth != null && customAuth.length() > 0) { - authMech.setAuthenticationMechanism(customAuth); - } - } - } - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationMultiStatus.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationMultiStatus.java deleted file mode 100644 index ae44238aa..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationMultiStatus.java +++ /dev/null @@ -1,114 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.migration; - -/** - * @author DABERG - */ -public class J2EEMigrationMultiStatus extends J2EEMigrationStatus { - private J2EEMigrationStatus[] children = new J2EEMigrationStatus[0]; - - public void add(J2EEMigrationStatus status) { - J2EEMigrationStatus[] result = - new J2EEMigrationStatus[children.length + 1]; - System.arraycopy(children, 0, result, 0, children.length); - result[result.length - 1] = status; - children = result; - int newSev = status.getSeverity(); - int currentSev = getSeverity(); - /* If all the statuses are NOT_NEEDED OR NOT_POSSIBLE, you want the combined status to be the highest severity - * however, if all but one status are NOT_NEEDED or NOT_POSSIBLE, and one status completed, then the combined status - * should be OK. If there is a warning or error, then they take precedence - */ - if (children.length == 1) - setSeverity(newSev); - else if (currentSev > COMPLETED_OK && currentSev < WARNING && newSev == COMPLETED_OK) - setSeverity(newSev); - else if (newSev > currentSev && (currentSev != COMPLETED_OK || newSev >= WARNING) ) - setSeverity(newSev); - - } - /** - * Adds all of the children of the given status to this multi-status. - * Does nothing if the given status has no children (which includes - * the case where it is not a multi-status). - * - * @param status the status whose children are to be added to this one - */ - public void addAll(J2EEMigrationStatus status) { - if (status == null) - return; - J2EEMigrationStatus[] statuses = status.getChildren(); - for (int i = 0; i < statuses.length; i++) { - add(statuses[i]); - } - } - - public J2EEMigrationStatus[] getChildren() { - return children; - } - - public boolean isMultiStatus() { - return true; - } - /** - * Merges the given status into this multi-status. - * Equivalent to add(status) if the - * given status is not a multi-status. - * Equivalent to addAll(status) if the - * given status is a multi-status. - * - * @param status the status to merge into this one - * @see #add - * @see #addAll - */ - public void merge(J2EEMigrationStatus status) { - if (status == null) - return; - if (!status.isMultiStatus()) { - add(status); - } else { - addAll(status); - } - } - /** - * Returns a string representation of the status, suitable - * for debugging purposes only. - */ - public String toString() { - StringBuffer buf = new StringBuffer(super.toString()); - buf.append(" children={"); //$NON-NLS-1$ - for (int i = 0; i < children.length; i++) { - if (i != 0) { - buf.append("\n"); //$NON-NLS-1$ - } - buf.append(children[i].toString()); - } - buf.append("}"); //$NON-NLS-1$ - return buf.toString(); - } - - /** - * @see com.ibm.ejs.models.base.extensions.helper.J2EEMigrationStatus#append(J2EEMigrationStatus) - */ - public J2EEMigrationStatus append(J2EEMigrationStatus aStatus) { - if (aStatus != null) - merge(aStatus); - return this; - } - - public boolean isEmpty() { - return children.length == 0; - } - - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationStatus.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationStatus.java deleted file mode 100644 index 6f68ceb07..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EEMigrationStatus.java +++ /dev/null @@ -1,232 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.migration; - -import java.text.MessageFormat; - -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.XMLResource; - - -/** - * @author DABERG - * - */ -public class J2EEMigrationStatus implements J2EESpecificationMigrationConstants { - - public static final int COMPLETED_OK = 0; - public static final int NOT_NEEDED = 1; - public static final int NOT_POSSIBLE = 2; - public static final int WARNING = 3; - public static final int ERROR = 4; - - public static final J2EEMigrationStatus OK_STATUS = new J2EEMigrationStatus(COMPLETED_OK, ""); - - private static final J2EEMigrationStatus[] EmptyStatusArray = new J2EEMigrationStatus[0]; - - private int severity; - private String message; - private XMLResource resource; - private EObject targetObject; - - J2EEMigrationStatus() { - } - - public J2EEMigrationStatus(int aSeverity, String aMessage) { - this(aSeverity, (EObject)null, aMessage); - } - public J2EEMigrationStatus(int aSeverity, XMLResource xmlResource) { - this(aSeverity, xmlResource, null); - } - - public J2EEMigrationStatus(int aSeverity, EObject anObject) { - this(aSeverity, anObject, null); - } - - public J2EEMigrationStatus(int aSeverity, XMLResource xmlResource, String aMessage) { - severity = aSeverity; - resource = xmlResource; - message = aMessage; - } - - public J2EEMigrationStatus(int aSeverity, EObject anObject, String aMessage) { - severity = aSeverity; - targetObject = anObject; - message = aMessage; - } - - protected String format(String aPattern, String arg1) { - return MessageFormat.format(aPattern, new String[]{arg1}); - } - - /** - * Returns the message. - * @return String - */ - public String getMessage() { - if (message == null) - message = createDefaultMessage(); - return message; - } - - public String getMessageForDisplay() { - return getSeverityText()+" "+getMessage(); //$NON-NLS-1$ - } - - protected String getSeverityText() { - switch (severity) { - case ERROR: - return ERROR_TEXT; - case WARNING: - return WARNING_TEXT; - case NOT_NEEDED: - case NOT_POSSIBLE: - return INFO_TEXT; - default: - return ""; //$NON-NLS-1$ - } - } - - /** - * Method createDefaultMessage. - * @return String - */ - private String createDefaultMessage() { - String objDesc; - if (getResource() != null) - objDesc = getResource().getURI().toString(); - else if (getTargetObject() != null && getTargetObject() instanceof ENamedElement) - objDesc = ((ENamedElement) getTargetObject()).getName(); - else - return null; - switch (getSeverity()) { - case COMPLETED_OK : - return format(DEFAULT_COMPLETED_STATUS_MSG, objDesc); - case NOT_NEEDED : - return format(DEFAULT_NOT_NEEDED_STATUS_MSG, objDesc); - case NOT_POSSIBLE : - return format(DEFAULT_NOT_POSSIBLE_STATUS_MSG, objDesc); - case ERROR : - return format(DEFAULT_ERROR_STATUS_MSG, objDesc); - } - return null; - } - - - /** - * Sets the message. - * @param message The message to set - */ - public void setMessage(String message) { - this.message = message; - } - - /** - * The migration was completed fine or was not needed. - */ - public boolean isOK() { - return severity == COMPLETED_OK || severity == NOT_NEEDED; - } - - /** - * An error ocurred during migration. - */ - public boolean isError() { - return severity == ERROR; - } - - /** - * A warning ocurred during migration. - */ - public boolean isWarning() { - return severity == WARNING; - } - - /** - * The migration was not required. - */ - public boolean isNotNeeded() { - return severity == NOT_NEEDED; - } - /** - * The migration was not possible. - */ - public boolean isNotPossible() { - return severity == NOT_POSSIBLE; - } - /** - * Returns the severity. - * @return int - */ - public int getSeverity() { - return severity; - } - - /** - * Sets the severity. - * @param severity The severity to set - */ - public void setSeverity(int severity) { - this.severity = severity; - } - - public J2EEMigrationStatus[] getChildren() { - return EmptyStatusArray; - } - - public boolean isMultiStatus() { - return false; - } - public XMLResource getResource() { - return resource; - } - public EObject getTargetObject() { - return targetObject; - } - - public String toString() { - StringBuffer buf = new StringBuffer(); - buf.append("MigrationStatus "); //$NON-NLS-1$ - if (severity == COMPLETED_OK) { - buf.append("Completed OK"); //$NON-NLS-1$ - } else if (severity == ERROR) { - buf.append("ERROR"); //$NON-NLS-1$ - } else if (severity == WARNING) { - buf.append("WARNING"); //$NON-NLS-1$ - } else if (severity == NOT_NEEDED) { - buf.append("Not Needed"); //$NON-NLS-1$ - } else if (severity == NOT_POSSIBLE) { - buf.append("Not Possible"); //$NON-NLS-1$ - } else { - buf.append("severity="); //$NON-NLS-1$ - buf.append(severity); - } - buf.append(' '); - buf.append(message); - return buf.toString(); - } - - /** - * Append the paramater to this status, and return the resultant status; - * clients must be careful to set their cached status to the return value, - * as it may be a new instance. - */ - public J2EEMigrationStatus append(J2EEMigrationStatus aStatus) { - if (aStatus == null) - return this; - J2EEMigrationMultiStatus multi = new J2EEMigrationMultiStatus(); - multi.merge(this); - multi.merge(aStatus); - return multi; - } -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrationConstants.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrationConstants.java deleted file mode 100644 index efbdb64c3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrationConstants.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.migration; - -import org.eclipse.jst.j2ee.internal.MOFJ2EEResourceHandler; - - -public interface J2EESpecificationMigrationConstants { - String J2EE_VERSION_1_2 = "J2EE_1.2"; //$NON-NLS-1$ - String J2EE_VERSION_1_3 = "J2EE_1.3"; //$NON-NLS-1$ - String J2EE_VERSION_1_4 = "J2EE_1.4"; //$NON-NLS-1$ - - String DEFAULT_COMPLETED_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_COMPLETED_STATUS_MSG"); //$NON-NLS-1$ - String DEFAULT_NOT_NEEDED_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_NOT_NEEDED_STATUS_MSG"); //$NON-NLS-1$ - String DEFAULT_NOT_POSSIBLE_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_NOT_POSSIBLE_STATUS_MSG"); //$NON-NLS-1$ - String DEFAULT_ERROR_STATUS_MSG = MOFJ2EEResourceHandler.getString("DEFAULT_ERROR_STATUS_MSG"); //$NON-NLS-1$ - - String REMOVED_LOCAL_CLIENT_MSG = MOFJ2EEResourceHandler.getString("REMOVED_LOCAL_CLIENT_MSG"); //$NON-NLS-1$ - String REMOVED_ACCESS_INTENTS_MSG = MOFJ2EEResourceHandler.getString("REMOVED_ACCESS_INTENTS_MSG"); //$NON-NLS-1$ - String REMOVED_ISOLATION_LEVELS_MSG = MOFJ2EEResourceHandler.getString("REMOVED_ISOLATION_LEVELS_MSG"); //$NON-NLS-1$ - String CONVERTED_FINDER_MSG = MOFJ2EEResourceHandler.getString("CONVERTED_FINDER_MSG"); //$NON-NLS-1$ - String UNNAMED_EJB = MOFJ2EEResourceHandler.getString("UNNAMED_EJB"); //$NON-NLS-1$ - String CONVERTED_QUERY_DESCRIPTION = MOFJ2EEResourceHandler.getString("CONVERTED_QUERY_DESCRIPTION"); //$NON-NLS-1$ - String MIGRATED_DEFAULT_DATASOURCE_JAR_MSG = MOFJ2EEResourceHandler.getString("MIGRATED_DEFAULT_DATASOURCE_JAR_MSG"); //$NON-NLS-1$ - String MIGRATED_DEFAULT_DATASOURCE_MSG = MOFJ2EEResourceHandler.getString("MIGRATED_DEFAULT_DATASOURCE_MSG"); //$NON-NLS-1$ - String ERROR_TEXT = MOFJ2EEResourceHandler.getString("ERROR"); //$NON-NLS-1$ - String WARNING_TEXT = MOFJ2EEResourceHandler.getString("WARNING"); //$NON-NLS-1$ - String INFO_TEXT = MOFJ2EEResourceHandler.getString("INFO"); //$NON-NLS-1$ -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrator.java deleted file mode 100644 index a92e66623..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/J2EESpecificationMigrator.java +++ /dev/null @@ -1,484 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.migration; - -import java.text.MessageFormat; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jem.java.JavaHelpers; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.application.ApplicationResource; -import org.eclipse.jst.j2ee.client.ApplicationClientResource; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.ejb.AcknowledgeMode; -import org.eclipse.jst.j2ee.ejb.ActivationConfig; -import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.DestinationType; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EJBResource; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.ejb.MessageDriven; -import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination; -import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.QueryMethod; -import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.jca.ConnectorResource; -import org.eclipse.jst.j2ee.webapplication.WebAppResource; - -import com.ibm.wtp.common.logger.proxy.Logger; - -/** - * @author DABERG - * - * This class is used to migrate J2EE specific objects from one - * J2EE version to another. - */ -public class J2EESpecificationMigrator extends SpecificationMigrator implements J2EEConstants, J2EESpecificationMigrationConstants { - - - /** - * Public constructor for migrating a single ejb - */ - public J2EESpecificationMigrator(String aVersion, boolean complex) { - super(aVersion, complex); - } - - /** - * Public constructor for migrating the entire deployment descriptor - */ - public J2EESpecificationMigrator(XMLResource anXmlResource, String aVersion, boolean complex) { - super(anXmlResource, aVersion, complex); - } - - protected QueryMethod convertMethodElementToQueryMethod(MethodElement me) { - QueryMethod queryMethod = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createQueryMethod(); - queryMethod.setParms(me.getParms()); - queryMethod.setName(me.getName()); - return queryMethod; - } - protected void ensureBeanVersionsSet(EJBJar jar) { - if (jar != null) { - List beans = jar.getEnterpriseBeans(); - int size = beans.size(); - EnterpriseBean bean; - for (int i = 0; i < size; i++) { - bean = (EnterpriseBean) beans.get(i); - if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion1_X()) - ((ContainerManagedEntity)bean).setVersion(ContainerManagedEntity.VERSION_1_X); - } - } - } - protected String format(String aPattern, String arg1) { - return MessageFormat.format(aPattern, new String[]{arg1}); - } - protected String format(String aPattern, String arg1, String arg2) { - return MessageFormat.format(aPattern, new String[]{arg1, arg2}); - } - protected J2EEMigrationStatus getMigrateToLowerLevelStatus(EJBJar ejbJar) { - J2EEMigrationStatus status = null, beanStatus; - if (ejbJar != null) { - List beans = ejbJar.getEnterpriseBeans(); - int size = beans.size(); - EnterpriseBean bean; - for (int i = 0; i < size; i++) { - bean = (EnterpriseBean) beans.get(i); - beanStatus = getMigrateToLowerLevelStatus(bean); - if (status == null) - status = beanStatus; - else - status = status.append(beanStatus); - } - } - return status; - } - protected J2EEMigrationStatus getMigrateToLowerLevelStatus(EnterpriseBean bean) { - if (bean.isMessageDriven() && isVersion1_2()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, bean); - if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion2_X() && isVersion1_2()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, bean); - return null; - } - - protected J2EEMigrationStatus migrate(ContainerManagedEntity aCMP) { - boolean is1_x = aCMP.getVersion().equals(ContainerManagedEntity.VERSION_1_X); - if (isVersion1_2() && !is1_x) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, aCMP); - else if ((isVersion1_4() || isVersion1_3()) && is1_x) { - return migrate1_xCMPFor2_0Target(aCMP); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, aCMP); - } - - protected void migrateDescriptionsTo14(XMLResource resource) { - ((EJBResource)resource).getEJBJar().getDescription(); - - } - - - protected J2EEMigrationStatus migrateTo13(EnterpriseBean anEJB) { - if (anEJB != null && getVersion() != null) { - if (anEJB.isContainerManagedEntity()) - return migrate((ContainerManagedEntity) anEJB); - return migrateBeanInterfaces(anEJB); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); - } - - /** - * Migrate a 1.1 CMP to a 1.1 CMP in a 2.0 EJB project. - * Set the cmp-version to 1.x. - * @param aCMP - * @return J2EEMigrationStatus - */ - protected J2EEMigrationStatus migrate1_xCMPFor2_0Target(ContainerManagedEntity aCMP) { - //This is necessary to force a change in the version so the event is - //not a TOUCH which will do nothing. - aCMP.setVersion(ContainerManagedEntity.VERSION_2_X); - if (!isComplex()) - //reset it if we are not doing full migration - aCMP.setVersion(ContainerManagedEntity.VERSION_1_X); - else - aCMP.setAbstractSchemaName(aCMP.getName()); - - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, aCMP); - } - protected J2EEMigrationStatus migrateBeanInterfaces(EnterpriseBean anEJB) { - if (isVersion1_2() && anEJB.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID && anEJB.hasLocalClient()) { - anEJB.setLocalInterface(null); - anEJB.setLocalHomeInterface(null); - return new J2EEMigrationStatus(J2EEMigrationStatus.WARNING, anEJB, format(REMOVED_LOCAL_CLIENT_MSG, anEJB.getName())); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); - } - - private J2EEMigrationMultiStatus migrateBeans13(EJBJar jar) { - J2EEMigrationMultiStatus status = new J2EEMigrationMultiStatus(); - if (jar != null) { - List beans = jar.getEnterpriseBeans(); - int size = beans.size(); - EnterpriseBean bean; - for (int i = 0; i < size; i++) { - bean = (EnterpriseBean) beans.get(i); - status.merge(migrateTo13(bean)); - } - } - return status; - } - - private J2EEMigrationMultiStatus migrateBeans14(EJBJar jar,HashMap beanMap) { - J2EEMigrationMultiStatus status = new J2EEMigrationMultiStatus(); - if (jar != null) { - List beans = jar.getEnterpriseBeans(); - int size = beans.size(); - EnterpriseBean bean; - for (int i = 0; i < size; i++) { - bean = (EnterpriseBean) beans.get(i); - status.merge(migrateTo14Bean(bean,beanMap)); - } - } - return status; - } - /** - * - */ - private J2EEMigrationStatus migrateMessageDrivenTo14(MessageDriven anEJB) { - - ActivationConfig config = EjbFactoryImpl.getActiveFactory().createActivationConfig(); - ActivationConfigProperty property = null; - AcknowledgeMode ackMode = anEJB.getAcknowledgeMode(); - String ackModeName = ackMode.getName(); - - if(ackModeName != null && ackModeName.length() > 0) { - property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); - property.setName("acknowledgeMode"); property.setValue(ackModeName); //$NON-NLS-1$ - config.getConfigProperties().add(property); - anEJB.setAcknowledgeMode(null); - } - - MessageDrivenDestination destination = anEJB.getDestination(); - if(destination != null) - create14Destination(anEJB,destination,config); - - String messageSelector = anEJB.getMessageSelector(); - - if(messageSelector != null && messageSelector.length() > 0) { - property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); - property.setName("messageSelector"); property.setValue(messageSelector); //$NON-NLS-1$ - config.getConfigProperties().add(property); - anEJB.setMessageSelector(null); - - } - anEJB.setActivationConfig(config); - - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, anEJB); - } - - /** - * - */ - private void create14Destination(MessageDriven bean,MessageDrivenDestination destination,ActivationConfig config ) { - DestinationType type = destination.getType(); - String typeString = null; - if (type != null) { - switch (type.getValue()) { - case DestinationType.QUEUE : - typeString = "javax.jms.Queue"; //$NON-NLS-1$ - break; - case DestinationType.TOPIC : - typeString = "javax.jms.Topic"; //$NON-NLS-1$ - break; - } - } - JavaHelpers helper = JavaRefFactory.eINSTANCE.reflectType(typeString,bean.eContainer()); - if(helper != null) - bean.setMessageDestination(helper.getWrapper()); - - ActivationConfigProperty property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); - property.setName("destinationType"); property.setValue(typeString); //$NON-NLS-1$ - config.getConfigProperties().add(property); - - SubscriptionDurabilityKind durability = destination.getSubscriptionDurability(); - String durabilityName = durability.getName(); - if(durabilityName != null && durabilityName.length() > 0) { - property = EjbFactoryImpl.getActiveFactory().createActivationConfigProperty(); - property.setName("subscriptionDurability"); property.setValue(durabilityName); //$NON-NLS-1$ - config.getConfigProperties().add(property); - bean.getDestination().setSubscriptionDurability(null); - } - } - - - protected J2EEMigrationStatus migrateTo13(ApplicationClientResource appClientResource) { - if (!basicNeedsToMigrate()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appClientResource); - String pubId, sysId; - boolean isVersion1_3 = isVersion1_3(); - pubId = isVersion1_3 ? APP_CLIENT_PUBLICID_1_3 : APP_CLIENT_PUBLICID_1_2; - sysId = isVersion1_3 ? APP_CLIENT_SYSTEMID_1_3 : APP_CLIENT_SYSTEMID_1_2; - appClientResource.setDoctypeValues(pubId, sysId); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appClientResource); - } - - protected J2EEMigrationStatus migrateTo13(ApplicationResource appResource) { - if (!basicNeedsToMigrate()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appResource); - String pubId, sysId; - boolean isVersion1_3 = isVersion1_3(); - pubId = isVersion1_3 ? APPLICATION_PUBLICID_1_3 : APPLICATION_PUBLICID_1_2; - sysId = isVersion1_3 ? APPLICATION_SYSTEMID_1_3 : APPLICATION_SYSTEMID_1_2; - appResource.setDoctypeValues(pubId, sysId); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appResource); - } - - protected J2EEMigrationStatus migrateTo13(EJBResource ejbResource) { - J2EEMigrationStatus status = null; - boolean b = basicNeedsToMigrate(); - String pubId, sysId; - boolean isVersion1_3 = isVersion1_3(); - EJBJar jar = ejbResource.getEJBJar(); - if (b) { - if (!isVersion1_3) { - status = getMigrateToLowerLevelStatus(jar); - if (status != null) - return status; - } - ensureBeanVersionsSet(jar); - pubId = isVersion1_3 ? EJBJAR_PUBLICID_2_0 : EJBJAR_PUBLICID_1_1; - sysId = isVersion1_3 ? EJBJAR_SYSTEMID_2_0 : EJBJAR_SYSTEMID_1_1; - ejbResource.setDoctypeValues(pubId, sysId); - } else { - status = new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, ejbResource); - } - boolean notNeeded = status != null; - status = mergeStatuses(status, migrateBeans13(jar)); - if (!notNeeded) - status = mergeStatuses(status, new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, ejbResource)); - return status; - } - - protected J2EEMigrationStatus migrateTo13(WebAppResource webResource) { - if (!basicNeedsToMigrate()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, webResource); - String pubId, sysId; - boolean isVersion1_3 = isVersion1_3(); - pubId = isVersion1_3 ? WEBAPP_PUBLICID_2_3 : WEBAPP_PUBLICID_2_2; - sysId = isVersion1_3 ? WEBAPP_SYSTEMID_2_3 : WEBAPP_SYSTEMID_2_2; - webResource.setDoctypeValues(pubId, sysId); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, webResource); - } - - protected J2EEMigrationStatus migrateTo14(ApplicationClientResource appClientResource) { - if (!basicNeedsMigrationTo14()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appClientResource); - appClientResource.setModuleVersionID(J2EEVersionConstants.J2EE_1_4_ID); - migrateCompatibilityDescriptionGroup(appClientResource); - EObject rootObject = appClientResource.getRootObject(); - appClientResource.removePreservingIds(rootObject); - appClientResource.getContents().remove(rootObject); - appClientResource.getContents().add(rootObject); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appClientResource); - } - - protected J2EEMigrationStatus migrateTo14(ApplicationResource appResource) { - if (!basicNeedsMigrationTo14()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, appResource); - appResource.setJ2EEVersionID(J2EEVersionConstants.J2EE_1_4_ID); - migrateCompatibilityDescriptionGroup(appResource); - EObject rootObject = appResource.getRootObject(); - appResource.removePreservingIds(rootObject); - appResource.getContents().add(rootObject); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, appResource); - } - - protected J2EEMigrationStatus migrateTo14(ConnectorResource connectorResource) { - if (!basicNeedsMigrationTo14()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED,connectorResource); - connectorResource.setModuleVersionID(J2EEVersionConstants.JCA_1_5_ID); - EObject rootObject = connectorResource.getRootObject(); - connectorResource.getContents().remove(rootObject); - connectorResource.getContents().add(rootObject); - Connector14SpecificationMigrator migrator = new Connector14SpecificationMigrator(); - J2EEMigrationStatus status = migrator.migrateConnectorTo14(connectorResource.getConnector()); - status = mergeStatuses(status,new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,connectorResource)); - return status; - } - - protected J2EEMigrationStatus migrateTo14(EJBResource ejbResource) { - J2EEMigrationStatus status = null; - boolean b = basicNeedsMigrationTo14(); - boolean isVersion1_4 = isVersion1_4(); - EJBJar jar = ejbResource.getEJBJar(); - HashMap beanCache = new HashMap(); - if(jar.getVersionID() == EJB_1_1_ID) - createBeanCache(jar,beanCache); - if (b) { - if (!isVersion1_4) { - status = getMigrateToLowerLevelStatus(jar); - if (status != null) - return status; - } - ejbResource.setModuleVersionID(J2EEVersionConstants.EJB_2_1_ID); - migrateCompatibilityDescriptionGroup(ejbResource); - EObject rootObject = ejbResource.getRootObject(); - ejbResource.removePreservingIds(rootObject); - ejbResource.getContents().add(rootObject); - - } else { - status = new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, ejbResource); - } - boolean notNeeded = status != null; - status = mergeStatuses(status, migrateBeans14(jar,beanCache)); - if (!notNeeded) - status = mergeStatuses(status, new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, ejbResource)); - return status; - } - - protected void migrateCompatibilityDescriptionGroup(XMLResource resource) { - TreeIterator contents = resource.getAllContents(); - EObject object = null; - while(contents.hasNext()) { - object = (EObject) contents.next(); - migrateCompatibilityDescriptionGroup(object); - } - } - - private static final EClass COMPATIBILITY_DESCRIPTION_GROUP_ECLASS = CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup(); - - protected void migrateCompatibilityDescriptionGroup(EObject eObj) { - if(COMPATIBILITY_DESCRIPTION_GROUP_ECLASS.isInstance(eObj)) { - CompatibilityDescriptionGroupImpl cg = (CompatibilityDescriptionGroupImpl)eObj; - if(cg.getDisplayNameGen() != null) cg.setDisplayName(cg.getDisplayNameGen()); - if(cg.getDescriptionGen() != null) cg.setDescription(cg.getDescriptionGen()); - if(cg.getLargeIconGen() != null) cg.setLargeIcon(cg.getLargeIconGen()); - if(cg.getSmallIconGen() != null) cg.setSmallIcon(cg.getSmallIconGen()); - } - } - - /** - * @param jar - * @param beanCache - */ - private void createBeanCache(EJBJar jar, HashMap beanCache) { - List beans = jar.getEnterpriseBeans(); - EnterpriseBean bean; - for (int i = 0; i < beans.size(); i++) { - bean = (EnterpriseBean) beans.get(i); - if (bean.isContainerManagedEntity() && ((ContainerManagedEntity)bean).isVersion1_X()) - beanCache.put(bean,ContainerManagedEntity.VERSION_1_X); - } - } - - protected J2EEMigrationStatus migrateTo14(WebAppResource webResource) { - J2EEMigrationStatus status = null; - try { - if (!basicNeedsMigrationTo14()) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, webResource); - webResource.setModuleVersionID(J2EEVersionConstants.WEB_2_4_ID); - migrateCompatibilityDescriptionGroup(webResource); - EObject rootObject = webResource.getRootObject(); - webResource.removePreservingIds(rootObject); - webResource.getContents().add(rootObject); - webResource.saveIfNecessary(); - War14SpecificationMigrator migrator = new War14SpecificationMigrator(); - status = migrator.migrateWebAppTo14(webResource.getWebApp()); - status = mergeStatuses(status,new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK, webResource)); - return status; - } catch (Exception e) { - Logger.getLogger().logError(e); - } - return status; - } - private J2EEMigrationStatus migrateTo14Bean(EnterpriseBean anEJB,HashMap beanMap) { - if(!anEJB.isMessageDriven()) { - if (anEJB != null && getVersion() != null) { - if (anEJB.isContainerManagedEntity()) - return migrate((ContainerManagedEntity)anEJB,beanMap); - return migrateBeanInterfaces(anEJB); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, anEJB); - } - if(anEJB.isMessageDriven()) { - return migrateMessageDrivenTo14((MessageDriven)anEJB); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED,anEJB); - } - - /** - * @param entity - * @param beanMap - * @return - */ - protected J2EEMigrationStatus migrate(ContainerManagedEntity aCMP, HashMap beanMap) { - String versionString = (String)beanMap.get(aCMP); - boolean is1_x = versionString != null && versionString.equals(ContainerManagedEntity.VERSION_1_X); - if (isVersion1_2() && !is1_x) - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_POSSIBLE, aCMP); - else if ((isVersion1_4() || isVersion1_3()) && is1_x) { - return migrate1_xCMPFor2_0Target(aCMP); - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, aCMP); - } - -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/SpecificationMigrator.java deleted file mode 100644 index 25693ce57..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/SpecificationMigrator.java +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.migration; - -import org.eclipse.jst.j2ee.application.ApplicationResource; -import org.eclipse.jst.j2ee.client.ApplicationClientResource; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.ejb.EJBResource; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.jca.ConnectorResource; -import org.eclipse.jst.j2ee.webapplication.WebAppResource; - - - -/** - * @author mdelder - * - */ -public class SpecificationMigrator implements J2EEConstants, J2EESpecificationMigrationConstants { - private boolean isComplex; - private String version; - private XMLResource xmlResource; - - /** - * Public constructor for migrating a single ejb - */ - public SpecificationMigrator(String aVersion, boolean complex) { - version = aVersion; - isComplex = complex; - } - - /** - * Public constructor for migrating the entire deployment descriptor - */ - public SpecificationMigrator(XMLResource anXmlResource, String aVersion, boolean complex) { - xmlResource = anXmlResource; - version = aVersion; - isComplex = complex; - } - - - public J2EEMigrationStatus migrateTo13() { - if (xmlResource != null && version != null) { - switch (xmlResource.getType()) { - case XMLResource.APP_CLIENT_TYPE : - return migrateTo13((ApplicationClientResource)xmlResource); - case XMLResource.APPLICATION_TYPE : - return migrateTo13((ApplicationResource)xmlResource); - case XMLResource.EJB_TYPE : - return migrateTo13((EJBResource)xmlResource); - case XMLResource.WEB_APP_TYPE : - return migrateTo13((WebAppResource)xmlResource); - } - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, xmlResource); - } - - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo13(WebAppResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo13(EJBResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo13(ApplicationResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo13(ApplicationClientResource resource) { - return null; - } - - public J2EEMigrationStatus migrateTo14() { - if (xmlResource != null && version != null) { - switch (xmlResource.getType()) { - case XMLResource.APP_CLIENT_TYPE : - return migrateTo14((ApplicationClientResource)xmlResource); - case XMLResource.APPLICATION_TYPE : - return migrateTo14((ApplicationResource)xmlResource); - case XMLResource.EJB_TYPE : - return migrateTo14((EJBResource)xmlResource); - case XMLResource.WEB_APP_TYPE : - return migrateTo14((WebAppResource)xmlResource); - case XMLResource.RAR_TYPE : - return migrateTo14 ((ConnectorResource)xmlResource); - } - } - return new J2EEMigrationStatus(J2EEMigrationStatus.NOT_NEEDED, xmlResource); - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo14(ApplicationClientResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo14(ApplicationResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo14(EJBResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo14(WebAppResource resource) { - return null; - } - - /** - * @param resource - * @return - */ - protected J2EEMigrationStatus migrateTo14(ConnectorResource resource) { - return null; - } - - protected boolean basicNeedsMigrationTo14() { - boolean isResource1_4, isTarget1_4; - isResource1_4 = xmlResource.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID; - isTarget1_4 = isVersion1_4(); - return (isResource1_4 && !isTarget1_4) || (!isResource1_4 && isTarget1_4); - } - - protected boolean basicNeedsToMigrate() { - boolean isResource1_3, isTarget1_3; - isResource1_3 = xmlResource.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID; - isTarget1_3 = isVersion1_3(); - return (isResource1_3 && !isTarget1_3) || (!isResource1_3 && isTarget1_3); - } - - protected J2EEMigrationStatus mergeStatuses(J2EEMigrationStatus status1, J2EEMigrationStatus status2) { - if (status1 != null) - return status1.append(status2); - return status2; - } - - - protected boolean isVersion1_2() { - return version == J2EE_VERSION_1_2; - } - - protected boolean isVersion1_3() { - return version == J2EE_VERSION_1_3; - } - - protected boolean isVersion1_4() { - return version == J2EE_VERSION_1_4; - } - - /** - * @return Returns the isComplex. - */ - protected boolean isComplex() { - return isComplex; - } - /** - * @return Returns the version. - */ - public String getVersion() { - return version; - } - /** - * @return Returns the xmlResource. - */ - public XMLResource getXmlResource() { - return xmlResource; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/War14SpecificationMigrator.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/War14SpecificationMigrator.java deleted file mode 100644 index 62274ca87..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/migration/War14SpecificationMigrator.java +++ /dev/null @@ -1,202 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 31, 2004 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.migration; - -import java.util.List; - -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.jsp.JspFactory; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.WebApp; - - -/** - * @author vijayb - * - * To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -public class War14SpecificationMigrator { - - /** - * @param app - */ - public J2EEMigrationStatus migrateWebAppTo14(WebApp app) { - migrateTabLibs(app); - migrateContextParam(app); - migrateInitParams(app); - return new J2EEMigrationStatus(J2EEMigrationStatus.COMPLETED_OK,(new J2EEMigrationStatus()).format(J2EESpecificationMigrator.DEFAULT_COMPLETED_STATUS_MSG,app.getDisplayName())); - } - /** - * @param app - */ - private void migrateInitParams(WebApp app) { - migrateServletInitParams(app); - migrateFilterInitParams(app); - } - /** - * @param app - */ - private void migrateFilterInitParams(WebApp app) { - List filters = app.getFilters(); - if(filters != null && !filters.isEmpty()) { - for(int i = 0; i < filters.size(); i++) { - Filter filter = (Filter)filters.get(i); - List initParam = filter.getInitParams(); - for(int j = 0; j < initParam.size(); j++) { - InitParam param = (InitParam)initParam.get(j); - if(param != null) { - ParamValue cParam = createParamValue(param); - List contextParams = filter.getInitParamValues(); - if(!paramValueExist(contextParams,cParam)) - filter.getInitParamValues().add(cParam); - } - } - } - } - } - /** - * @param app - */ - private void migrateServletInitParams(WebApp app) { - List servlets = app.getServlets(); - if(servlets != null && !servlets.isEmpty()) { - for(int i = 0; i < servlets.size(); i++) { - Servlet servlet = (Servlet)servlets.get(i); - List initParam = servlet.getParams(); - for(int j = 0; j < initParam.size(); j++) { - InitParam param = (InitParam)initParam.get(j); - if(param != null) { - ParamValue cParam = createParamValue(param); - List contextParams = servlet.getInitParams(); - if(!paramValueExist(contextParams,cParam)) - servlet.getInitParams().add(cParam); - } - } - } - } - } - /** - * @param param - * @return - */ - private ParamValue createParamValue(InitParam param) { - ParamValue cParam = CommonFactory.eINSTANCE.createParamValue(); - cParam.setName(param.getParamName()); - cParam.setValue(param.getParamValue()); - String desc = param.getDescription(); - if(desc != null && desc.length() > 0) - cParam.getDescriptions().add(createDescription(desc)); - return cParam; - } - /** - * @param desc - * @return - */ - private Object createDescription(String desc) { - Description description = CommonFactory.eINSTANCE.createDescription(); - description.setValue(desc); - return description; - } - /** - * @param contextParam - * @param param - * @return - */ - private boolean paramValueExist(List contextParams, ParamValue param) { - boolean exists = false; - for(int i = 0; i < contextParams.size(); i++) { - ParamValue paramValue = (ParamValue)contextParams.get(i); - if(paramValue.getName().equals(param.getName()) && paramValue.getValue().equals(param.getValue())) { - exists = true; - break; - } - } - return exists; - } - - /** - * @param contextParams - * @param param - * @return - */ - private boolean tagLibURITypeExists(List tagLibsURITypes, TagLibRefType tlut) { - boolean exists = false; - for(int i = 0; i < tagLibsURITypes.size(); i++) { - TagLibRefType tempTlut = (TagLibRefType)tagLibsURITypes.get(i); - if(tempTlut.getTaglibLocation().equals(tlut.getTaglibLocation()) && tempTlut.getTaglibURI().equals(tempTlut.getTaglibURI())) { - exists = true; - break; - } - } - return exists; - } - /** - * @param app - */ - private void migrateContextParam(WebApp app) { - List contexts = app.getContexts(); - if(contexts != null && !contexts.isEmpty()) { - for(int j = 0; j < contexts.size(); j++) { - ContextParam param = (ContextParam)contexts.get(j); - if(param != null) { - ParamValue cParam = CommonFactory.eINSTANCE.createParamValue(); - cParam.setName(param.getParamName()); - cParam.setValue(param.getParamValue()); - cParam.setDescription(param.getDescription()); - List contextParams = app.getContextParams(); - if(!paramValueExist(contextParams,cParam)) - app.getContextParams().add(cParam); - } - } - } - } - - - /** - * @param app - */ - private void migrateTabLibs(WebApp app) { - List tagLibs = app.getTagLibs(); - JSPConfig config = app.getJspConfig(); - if(tagLibs != null && !tagLibs.isEmpty()) { - if(config == null) { - config = JspFactory.eINSTANCE.createJSPConfig(); - app.setJspConfig(config); - config = app.getJspConfig(); - } - for(int i = 0; i < tagLibs.size(); i++) { - TagLibRef tlr = (TagLibRef)tagLibs.get(i); - TagLibRefType tlrt = JspFactory.eINSTANCE.createTagLibRefType(); - tlrt.setTaglibLocation(tlr.getTaglibLocation()); - tlrt.setTaglibURI(tlr.getTaglibURI()); - List tagLibRefTypes = config.getTagLibs(); - if(!tagLibURITypeExists(tagLibRefTypes,tlrt)) - config.getTagLibs().add(tlrt); - } - - } - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibFactory.java index 3a094a4b2..ba87cce25 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibFactory.java @@ -21,7 +21,7 @@ public interface TaglibFactory extends EFactory{ * * @generated */ - TaglibFactory eINSTANCE = new org.eclipse.jst.j2ee.taglib.impl.TaglibFactoryImpl(); + TaglibFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.taglib.impl.TaglibFactoryImpl(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibPackage.java index e763ccf39..b63fcd2a7 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/TaglibPackage.java @@ -606,7 +606,7 @@ public interface TaglibPackage extends EPackage{ * * @generated */ - TaglibPackage eINSTANCE = org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl.init(); + TaglibPackage eINSTANCE = org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ExtensibleTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ExtensibleTypeImpl.java deleted file mode 100644 index 70cb2e94a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ExtensibleTypeImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.taglib.ExtensibleType; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; - - -/** - * - * An implementation of the model object 'Extensible Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.ExtensibleTypeImpl#getValue Value}
  • - *
- *

- * - * @generated - */ -public abstract class ExtensibleTypeImpl extends EObjectImpl implements ExtensibleType { - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * - * - * @generated - */ - protected ExtensibleTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getExtensibleType(); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.EXTENSIBLE_TYPE__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.EXTENSIBLE_TYPE__VALUE: - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.EXTENSIBLE_TYPE__VALUE: - setValue((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.EXTENSIBLE_TYPE__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.EXTENSIBLE_TYPE__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (value: ");//$NON-NLS-1$ - result.append(value); - result.append(')'); - return result.toString(); - } - -} //ExtensibleTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/FunctionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/FunctionImpl.java deleted file mode 100644 index 75bd41c53..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/FunctionImpl.java +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.impl.DescriptionGroupImpl; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; - - -/** - * - * An implementation of the model object 'Function'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getName Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getSignature Signature}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getExample Example}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getFunctionClass Function Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.FunctionImpl#getFunctionExtensions Function Extensions}
  • - *
- *

- * - * @generated - */ -public class FunctionImpl extends DescriptionGroupImpl implements Function { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getSignature() Signature}' attribute. - * - * - * @see #getSignature() - * @generated - * @ordered - */ - protected static final String SIGNATURE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSignature() Signature}' attribute. - * - * - * @see #getSignature() - * @generated - * @ordered - */ - protected String signature = SIGNATURE_EDEFAULT; - - /** - * The default value of the '{@link #getExample() Example}' attribute. - * - * - * @see #getExample() - * @generated - * @ordered - */ - protected static final String EXAMPLE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getExample() Example}' attribute. - * - * - * @see #getExample() - * @generated - * @ordered - */ - protected String example = EXAMPLE_EDEFAULT; - - /** - * The cached value of the '{@link #getFunctionClass() Function Class}' reference. - * - * - * @see #getFunctionClass() - * @generated - * @ordered - */ - protected JavaClass functionClass = null; - - /** - * The cached value of the '{@link #getFunctionExtensions() Function Extensions}' containment reference list. - * - * - * @see #getFunctionExtensions() - * @generated - * @ordered - */ - protected EList functionExtensions = null; - - /** - * - * - * @generated - */ - protected FunctionImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getFunction(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getSignature() { - return signature; - } - - /** - * - * - * @generated - */ - public void setSignature(String newSignature) { - String oldSignature = signature; - signature = newSignature; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__SIGNATURE, oldSignature, signature)); - } - - /** - * - * - * @generated - */ - public String getExample() { - return example; - } - - /** - * - * - * @generated - */ - public void setExample(String newExample) { - String oldExample = example; - example = newExample; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__EXAMPLE, oldExample, example)); - } - - /** - * - * - * @generated - */ - public JavaClass getFunctionClass() { - if (functionClass != null && functionClass.eIsProxy()) { - JavaClass oldFunctionClass = functionClass; - functionClass = (JavaClass)eResolveProxy((InternalEObject)functionClass); - if (functionClass != oldFunctionClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.FUNCTION__FUNCTION_CLASS, oldFunctionClass, functionClass)); - } - } - return functionClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetFunctionClass() { - return functionClass; - } - - /** - * - * - * @generated - */ - public void setFunctionClass(JavaClass newFunctionClass) { - JavaClass oldFunctionClass = functionClass; - functionClass = newFunctionClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.FUNCTION__FUNCTION_CLASS, oldFunctionClass, functionClass)); - } - - /** - * - * - * @generated - */ - public EList getFunctionExtensions() { - if (functionExtensions == null) { - functionExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS); - } - return functionExtensions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.FUNCTION__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case TaglibPackage.FUNCTION__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case TaglibPackage.FUNCTION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: - return ((InternalEList)getFunctionExtensions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.FUNCTION__ICONS: - return getIcons(); - case TaglibPackage.FUNCTION__DISPLAY_NAMES: - return getDisplayNames(); - case TaglibPackage.FUNCTION__DESCRIPTIONS: - return getDescriptions(); - case TaglibPackage.FUNCTION__NAME: - return getName(); - case TaglibPackage.FUNCTION__SIGNATURE: - return getSignature(); - case TaglibPackage.FUNCTION__EXAMPLE: - return getExample(); - case TaglibPackage.FUNCTION__FUNCTION_CLASS: - if (resolve) return getFunctionClass(); - return basicGetFunctionClass(); - case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: - return getFunctionExtensions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.FUNCTION__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case TaglibPackage.FUNCTION__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case TaglibPackage.FUNCTION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case TaglibPackage.FUNCTION__NAME: - setName((String)newValue); - return; - case TaglibPackage.FUNCTION__SIGNATURE: - setSignature((String)newValue); - return; - case TaglibPackage.FUNCTION__EXAMPLE: - setExample((String)newValue); - return; - case TaglibPackage.FUNCTION__FUNCTION_CLASS: - setFunctionClass((JavaClass)newValue); - return; - case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: - getFunctionExtensions().clear(); - getFunctionExtensions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.FUNCTION__ICONS: - getIcons().clear(); - return; - case TaglibPackage.FUNCTION__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case TaglibPackage.FUNCTION__DESCRIPTIONS: - getDescriptions().clear(); - return; - case TaglibPackage.FUNCTION__NAME: - setName(NAME_EDEFAULT); - return; - case TaglibPackage.FUNCTION__SIGNATURE: - setSignature(SIGNATURE_EDEFAULT); - return; - case TaglibPackage.FUNCTION__EXAMPLE: - setExample(EXAMPLE_EDEFAULT); - return; - case TaglibPackage.FUNCTION__FUNCTION_CLASS: - setFunctionClass((JavaClass)null); - return; - case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: - getFunctionExtensions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.FUNCTION__ICONS: - return icons != null && !icons.isEmpty(); - case TaglibPackage.FUNCTION__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case TaglibPackage.FUNCTION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case TaglibPackage.FUNCTION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case TaglibPackage.FUNCTION__SIGNATURE: - return SIGNATURE_EDEFAULT == null ? signature != null : !SIGNATURE_EDEFAULT.equals(signature); - case TaglibPackage.FUNCTION__EXAMPLE: - return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); - case TaglibPackage.FUNCTION__FUNCTION_CLASS: - return functionClass != null; - case TaglibPackage.FUNCTION__FUNCTION_EXTENSIONS: - return functionExtensions != null && !functionExtensions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: ");//$NON-NLS-1$ - result.append(name); - result.append(", signature: ");//$NON-NLS-1$ - result.append(signature); - result.append(", example: ");//$NON-NLS-1$ - result.append(example); - result.append(')'); - return result.toString(); - } - -} //FunctionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagAttributeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagAttributeImpl.java deleted file mode 100644 index d5b98a28f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagAttributeImpl.java +++ /dev/null @@ -1,473 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; - - -/** - * The attribute tag defines an attribute for the nesting tag - */ -public class JSPTagAttributeImpl extends EObjectImpl implements JSPTagAttribute, EObject{ - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #isRequired() Required}' attribute. - * - * - * @see #isRequired() - * @generated - * @ordered - */ - protected static final boolean REQUIRED_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean required = REQUIRED_EDEFAULT; - /** - * This is true if the Required attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean requiredESet = false; - - /** - * The default value of the '{@link #isRtExprValue() Rt Expr Value}' attribute. - * - * - * @see #isRtExprValue() - * @generated - * @ordered - */ - protected static final boolean RT_EXPR_VALUE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean rtExprValue = RT_EXPR_VALUE_EDEFAULT; - /** - * This is true if the Rt Expr Value attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean rtExprValueESet = false; - - /** - * The default value of the '{@link #isFragment() Fragment}' attribute. - * - * - * @see #isFragment() - * @generated - * @ordered - */ - protected static final boolean FRAGMENT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isFragment() Fragment}' attribute. - * - * - * @see #isFragment() - * @generated - * @ordered - */ - protected boolean fragment = FRAGMENT_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass type = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public JSPTagAttributeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getJSPTagAttribute(); - } - - /** - * @generated This field/method will be replaced during code generation - * Defines the canonical name of a tag or attribute being defined (required). - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - * Defines if the nesting attribute is required or optional. - */ - public boolean isRequired() { - return required; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRequired(boolean newRequired) { - boolean oldRequired = required; - required = newRequired; - boolean oldRequiredESet = requiredESet; - requiredESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED, oldRequired, required, !oldRequiredESet)); - } - - /** - * - * - * @generated - */ - public void unsetRequired() { - boolean oldRequired = required; - boolean oldRequiredESet = requiredESet; - required = REQUIRED_EDEFAULT; - requiredESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED, oldRequired, REQUIRED_EDEFAULT, oldRequiredESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetRequired() { - return requiredESet; - } - - /** - * @generated This field/method will be replaced during code generation - * Defines if the nesting attribute can have scriptlet expressions asa value, i.e - * the value of the attribute may be dynamically calculatedat request time, as - * opposed to a static value determined at translationtime. (optional) - * Default = false - */ - public boolean isRtExprValue() { - return rtExprValue; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRtExprValue(boolean newRtExprValue) { - boolean oldRtExprValue = rtExprValue; - rtExprValue = newRtExprValue; - boolean oldRtExprValueESet = rtExprValueESet; - rtExprValueESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE, oldRtExprValue, rtExprValue, !oldRtExprValueESet)); - } - - /** - * - * - * @generated - */ - public void unsetRtExprValue() { - boolean oldRtExprValue = rtExprValue; - boolean oldRtExprValueESet = rtExprValueESet; - rtExprValue = RT_EXPR_VALUE_EDEFAULT; - rtExprValueESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE, oldRtExprValue, RT_EXPR_VALUE_EDEFAULT, oldRtExprValueESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetRtExprValue() { - return rtExprValueESet; - } - - /** - * - * - * @generated - */ - public boolean isFragment() { - return fragment; - } - - /** - * - * - * @generated - */ - public void setFragment(boolean newFragment) { - boolean oldFragment = fragment; - fragment = newFragment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT, oldFragment, fragment)); - } - - /** - * @generated This field/method will be replaced during code generation - * The value of the type element describes the Java type of the attributes value. - * For static values (those determined at translation time) the type is always - * java.lang.String. - */ - public JavaClass getType() { - if (type != null && type.eIsProxy()) { - JavaClass oldType = type; - type = (JavaClass)eResolveProxy((InternalEObject)type); - if (type != oldType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE, oldType, type)); - } - } - return type; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetType() { - return type; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setType(JavaClass newType) { - JavaClass oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: - return getName(); - case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: - return isRtExprValue() ? Boolean.TRUE : Boolean.FALSE; - case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: - return isFragment() ? Boolean.TRUE : Boolean.FALSE; - case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: - if (resolve) return getType(); - return basicGetType(); - case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: - return isSetRequired(); - case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: - return isSetRtExprValue(); - case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: - return fragment != FRAGMENT_EDEFAULT; - case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: - return type != null; - case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: - setName((String)newValue); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: - setRequired(((Boolean)newValue).booleanValue()); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: - setRtExprValue(((Boolean)newValue).booleanValue()); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: - setFragment(((Boolean)newValue).booleanValue()); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: - setType((JavaClass)newValue); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG_ATTRIBUTE__NAME: - setName(NAME_EDEFAULT); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__REQUIRED: - unsetRequired(); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE: - unsetRtExprValue(); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__FRAGMENT: - setFragment(FRAGMENT_EDEFAULT); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__TYPE: - setType((JavaClass)null); - return; - case TaglibPackage.JSP_TAG_ATTRIBUTE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: ");//$NON-NLS-1$ - result.append(name); - result.append(", required: ");//$NON-NLS-1$ - if (requiredESet) result.append(required); else result.append("");//$NON-NLS-1$ - result.append(", rtExprValue: ");//$NON-NLS-1$ - if (rtExprValueESet) result.append(rtExprValue); else result.append("");//$NON-NLS-1$ - result.append(", fragment: ");//$NON-NLS-1$ - result.append(fragment); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagImpl.java deleted file mode 100644 index 8c03bb3bc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPTagImpl.java +++ /dev/null @@ -1,599 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.impl.DescriptionGroupImpl; -import org.eclipse.jst.j2ee.taglib.BodyContentType; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; - - -/** - * The tag element defines an action in this tag library. The tag element has one attribute, id. - * The tag element may have several subelements defining: - * name -- The unique action name - * tag-class -- The tag handler class implementing javax.servlet.jsp.tagext.Tag - * tei-class -- An optional subclass of javax.servlet.jsp.tagext.TagExtraInfo - * body-content -- The body content type - * display-name -- A short name that is intended to be displayed by tools - * small-icon -- Optional small-icon that can be used by tools - * large-icon -- Optional large-icon that can be used by tools - * description -- Optional tag-specific information - * variable -- Optional scripting variable information - * attribute -- All attributes of this action - * example -- Optional informal description of an example of a use of this action. - - */ -public class JSPTagImpl extends DescriptionGroupImpl implements JSPTag{ - - /** - * The default value of the '{@link #getBodyContent() Body Content}' attribute. - * - * - * @see #getBodyContent() - * @generated - * @ordered - */ - protected static final BodyContentType BODY_CONTENT_EDEFAULT = BodyContentType.TAGDEPENDENT_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected BodyContentType bodyContent = BODY_CONTENT_EDEFAULT; - /** - * This is true if the Body Content attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean bodyContentESet = false; - - /** - * The default value of the '{@link #getExample() Example}' attribute. - * - * - * @see #getExample() - * @generated - * @ordered - */ - protected static final String EXAMPLE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String example = EXAMPLE_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #isDynamicAttributes() Dynamic Attributes}' attribute. - * - * - * @see #isDynamicAttributes() - * @generated - * @ordered - */ - protected static final boolean DYNAMIC_ATTRIBUTES_EDEFAULT = false; - - /** - * The cached value of the '{@link #isDynamicAttributes() Dynamic Attributes}' attribute. - * - * - * @see #isDynamicAttributes() - * @generated - * @ordered - */ - protected boolean dynamicAttributes = DYNAMIC_ATTRIBUTES_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList attributes = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList variables = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass tagClass = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass teiClass = null; - public JSPTagImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getJSPTag(); - } - - /** - * @generated This field/method will be replaced during code generation - * Provides a hint as to the content of the body of this tag. Primarily intended - * for use by page composition tools.There are currently three values specified: - * - * tagdependent - The body of the tag is interpreted by the tag implementation - * itself, and is most likely in a different "langage", e.g embedded SQL - * statements. - * - * JSP - The body of the tag contains nested JSP syntax - * - * empty - The body must be emptyThe default (if not defined) is JSP#PCDATA ::= - * tagdependent | JSP | empty - */ - public BodyContentType getBodyContent() { - return bodyContent; - } - - /** - * - * - * @generated - */ - public void setBodyContent(BodyContentType newBodyContent) { - BodyContentType oldBodyContent = bodyContent; - bodyContent = newBodyContent == null ? BODY_CONTENT_EDEFAULT : newBodyContent; - boolean oldBodyContentESet = bodyContentESet; - bodyContentESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__BODY_CONTENT, oldBodyContent, bodyContent, !oldBodyContentESet)); - } - - /** - * - * - * @generated - */ - public void unsetBodyContent() { - BodyContentType oldBodyContent = bodyContent; - boolean oldBodyContentESet = bodyContentESet; - bodyContent = BODY_CONTENT_EDEFAULT; - bodyContentESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, TaglibPackage.JSP_TAG__BODY_CONTENT, oldBodyContent, BODY_CONTENT_EDEFAULT, oldBodyContentESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetBodyContent() { - return bodyContentESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The example element provides an informal description of an example of the use - * of a tag. - */ - public String getExample() { - return example; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setExample(String newExample) { - String oldExample = example; - example = newExample; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__EXAMPLE, oldExample, example)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public boolean isDynamicAttributes() { - return dynamicAttributes; - } - - /** - * - * - * @generated - */ - public void setDynamicAttributes(boolean newDynamicAttributes) { - boolean oldDynamicAttributes = dynamicAttributes; - dynamicAttributes = newDynamicAttributes; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES, oldDynamicAttributes, dynamicAttributes)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getAttributes() { - if (attributes == null) { - attributes = new EObjectContainmentEList(JSPTagAttribute.class, this, TaglibPackage.JSP_TAG__ATTRIBUTES); - } - return attributes; - } - - /** - * @generated This field/method will be replaced during code generation - * The variable element provides information on the scripting variables defined by - * this tag. - * It is a (translation time) error for an action that has one or more variable - * subelements to have a TagExtraInfo class that returns a non-null object. - * The subelements of variable are of the form: - * name-given -- The variable name as a constant - * name-from-attribute -- The name of an attribute whose (translation time) value - * will give the name of the variable. One of name-given or namefrom-attribute is - * required. - * variable-class -- Name of the class of the variable. java.lang.String is - * default. - * declare -- Whether the variable is declared or not. True is the default. - * scope -- The scope of the scripting variable defined. NESTED is default. - - */ - public EList getVariables() { - if (variables == null) { - variables = new EObjectContainmentEList(JSPVariable.class, this, TaglibPackage.JSP_TAG__VARIABLES); - } - return variables; - } - - /** - * @generated This field/method will be replaced during code generation - * The tag-class element indicates the subclass of javax.serlvet.jsp.tagext.Tag - * that implements the request time semantics for this tag. This element is - * required. - * @regexp fully qualified Java class name - - */ - public JavaClass getTagClass() { - if (tagClass != null && tagClass.eIsProxy()) { - JavaClass oldTagClass = tagClass; - tagClass = (JavaClass)eResolveProxy((InternalEObject)tagClass); - if (tagClass != oldTagClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG__TAG_CLASS, oldTagClass, tagClass)); - } - } - return tagClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetTagClass() { - return tagClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setTagClass(JavaClass newTagClass) { - JavaClass oldTagClass = tagClass; - tagClass = newTagClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__TAG_CLASS, oldTagClass, tagClass)); - } - - /** - * @generated This field/method will be replaced during code generation - * The tei-class element indicates the subclass of - * javax.servlet.jsp.tagext.TagExtraInfo for this tag. The class is instantiated - * at translation time. This element is optional. - * @regexp fully qualified Java class name - */ - public JavaClass getTeiClass() { - if (teiClass != null && teiClass.eIsProxy()) { - JavaClass oldTeiClass = teiClass; - teiClass = (JavaClass)eResolveProxy((InternalEObject)teiClass); - if (teiClass != oldTeiClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_TAG__TEI_CLASS, oldTeiClass, teiClass)); - } - } - return teiClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetTeiClass() { - return teiClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setTeiClass(JavaClass newTeiClass) { - JavaClass oldTeiClass = teiClass; - teiClass = newTeiClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_TAG__TEI_CLASS, oldTeiClass, teiClass)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.JSP_TAG__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case TaglibPackage.JSP_TAG__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case TaglibPackage.JSP_TAG__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case TaglibPackage.JSP_TAG__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - case TaglibPackage.JSP_TAG__VARIABLES: - return ((InternalEList)getVariables()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG__ICONS: - return getIcons(); - case TaglibPackage.JSP_TAG__DISPLAY_NAMES: - return getDisplayNames(); - case TaglibPackage.JSP_TAG__DESCRIPTIONS: - return getDescriptions(); - case TaglibPackage.JSP_TAG__BODY_CONTENT: - return getBodyContent(); - case TaglibPackage.JSP_TAG__EXAMPLE: - return getExample(); - case TaglibPackage.JSP_TAG__NAME: - return getName(); - case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: - return isDynamicAttributes() ? Boolean.TRUE : Boolean.FALSE; - case TaglibPackage.JSP_TAG__ATTRIBUTES: - return getAttributes(); - case TaglibPackage.JSP_TAG__VARIABLES: - return getVariables(); - case TaglibPackage.JSP_TAG__TAG_CLASS: - if (resolve) return getTagClass(); - return basicGetTagClass(); - case TaglibPackage.JSP_TAG__TEI_CLASS: - if (resolve) return getTeiClass(); - return basicGetTeiClass(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG__ICONS: - return icons != null && !icons.isEmpty(); - case TaglibPackage.JSP_TAG__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case TaglibPackage.JSP_TAG__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case TaglibPackage.JSP_TAG__BODY_CONTENT: - return isSetBodyContent(); - case TaglibPackage.JSP_TAG__EXAMPLE: - return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); - case TaglibPackage.JSP_TAG__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: - return dynamicAttributes != DYNAMIC_ATTRIBUTES_EDEFAULT; - case TaglibPackage.JSP_TAG__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case TaglibPackage.JSP_TAG__VARIABLES: - return variables != null && !variables.isEmpty(); - case TaglibPackage.JSP_TAG__TAG_CLASS: - return tagClass != null; - case TaglibPackage.JSP_TAG__TEI_CLASS: - return teiClass != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case TaglibPackage.JSP_TAG__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case TaglibPackage.JSP_TAG__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case TaglibPackage.JSP_TAG__BODY_CONTENT: - setBodyContent((BodyContentType)newValue); - return; - case TaglibPackage.JSP_TAG__EXAMPLE: - setExample((String)newValue); - return; - case TaglibPackage.JSP_TAG__NAME: - setName((String)newValue); - return; - case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: - setDynamicAttributes(((Boolean)newValue).booleanValue()); - return; - case TaglibPackage.JSP_TAG__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case TaglibPackage.JSP_TAG__VARIABLES: - getVariables().clear(); - getVariables().addAll((Collection)newValue); - return; - case TaglibPackage.JSP_TAG__TAG_CLASS: - setTagClass((JavaClass)newValue); - return; - case TaglibPackage.JSP_TAG__TEI_CLASS: - setTeiClass((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_TAG__ICONS: - getIcons().clear(); - return; - case TaglibPackage.JSP_TAG__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case TaglibPackage.JSP_TAG__DESCRIPTIONS: - getDescriptions().clear(); - return; - case TaglibPackage.JSP_TAG__BODY_CONTENT: - unsetBodyContent(); - return; - case TaglibPackage.JSP_TAG__EXAMPLE: - setExample(EXAMPLE_EDEFAULT); - return; - case TaglibPackage.JSP_TAG__NAME: - setName(NAME_EDEFAULT); - return; - case TaglibPackage.JSP_TAG__DYNAMIC_ATTRIBUTES: - setDynamicAttributes(DYNAMIC_ATTRIBUTES_EDEFAULT); - return; - case TaglibPackage.JSP_TAG__ATTRIBUTES: - getAttributes().clear(); - return; - case TaglibPackage.JSP_TAG__VARIABLES: - getVariables().clear(); - return; - case TaglibPackage.JSP_TAG__TAG_CLASS: - setTagClass((JavaClass)null); - return; - case TaglibPackage.JSP_TAG__TEI_CLASS: - setTeiClass((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (bodyContent: ");//$NON-NLS-1$ - if (bodyContentESet) result.append(bodyContent); else result.append("");//$NON-NLS-1$ - result.append(", example: ");//$NON-NLS-1$ - result.append(example); - result.append(", name: ");//$NON-NLS-1$ - result.append(name); - result.append(", dynamicAttributes: ");//$NON-NLS-1$ - result.append(dynamicAttributes); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPVariableImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPVariableImpl.java deleted file mode 100644 index deac6f68c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/JSPVariableImpl.java +++ /dev/null @@ -1,397 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; - - -/** - * @generated - */ -public class JSPVariableImpl extends EObjectImpl implements JSPVariable{ - - /** - * The default value of the '{@link #getNameGiven() Name Given}' attribute. - * - * - * @see #getNameGiven() - * @generated - * @ordered - */ - protected static final String NAME_GIVEN_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String nameGiven = NAME_GIVEN_EDEFAULT; - /** - * The default value of the '{@link #getNameFromAttribute() Name From Attribute}' attribute. - * - * - * @see #getNameFromAttribute() - * @generated - * @ordered - */ - protected static final String NAME_FROM_ATTRIBUTE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String nameFromAttribute = NAME_FROM_ATTRIBUTE_EDEFAULT; - /** - * The default value of the '{@link #isDeclare() Declare}' attribute. - * - * - * @see #isDeclare() - * @generated - * @ordered - */ - protected static final boolean DECLARE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean declare = DECLARE_EDEFAULT; - /** - * The default value of the '{@link #getScope() Scope}' attribute. - * - * - * @see #getScope() - * @generated - * @ordered - */ - protected static final JSPScriptingVariableScope SCOPE_EDEFAULT = JSPScriptingVariableScope.NESTED_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected JSPScriptingVariableScope scope = SCOPE_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass variableClass = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public JSPVariableImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getJSPVariable(); - } - - /** - * @generated This field/method will be replaced during code generation - * The name-given element provides the name for the scripting variable. - * - * One of name-given or name-from-attribute is required. - */ - public String getNameGiven() { - return nameGiven; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setNameGiven(String newNameGiven) { - String oldNameGiven = nameGiven; - nameGiven = newNameGiven; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__NAME_GIVEN, oldNameGiven, nameGiven)); - } - - /** - * @generated This field/method will be replaced during code generation - * The name of an attribute whose (translation-time) value will give the name of - * the variable. - */ - public String getNameFromAttribute() { - return nameFromAttribute; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setNameFromAttribute(String newNameFromAttribute) { - String oldNameFromAttribute = nameFromAttribute; - nameFromAttribute = newNameFromAttribute; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE, oldNameFromAttribute, nameFromAttribute)); - } - - /** - * @generated This field/method will be replaced during code generation - * The value of the declare element indicates whether the scripting variable is to - * be defined or not. See TagExtraInfo for details. - * This element is optional and is the default is true. - - */ - public boolean isDeclare() { - return declare; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDeclare(boolean newDeclare) { - boolean oldDeclare = declare; - declare = newDeclare; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__DECLARE, oldDeclare, declare)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JSPScriptingVariableScope getScope() { - return scope; - } - - /** - * - * - * @generated - */ - public void setScope(JSPScriptingVariableScope newScope) { - JSPScriptingVariableScope oldScope = scope; - scope = newScope == null ? SCOPE_EDEFAULT : newScope; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__SCOPE, oldScope, scope)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public JavaClass getVariableClass() { - if (variableClass != null && variableClass.eIsProxy()) { - JavaClass oldVariableClass = variableClass; - variableClass = (JavaClass)eResolveProxy((InternalEObject)variableClass); - if (variableClass != oldVariableClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS, oldVariableClass, variableClass)); - } - } - return variableClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetVariableClass() { - return variableClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setVariableClass(JavaClass newVariableClass) { - JavaClass oldVariableClass = variableClass; - variableClass = newVariableClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS, oldVariableClass, variableClass)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.JSP_VARIABLE__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: - return getNameGiven(); - case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: - return getNameFromAttribute(); - case TaglibPackage.JSP_VARIABLE__DECLARE: - return isDeclare() ? Boolean.TRUE : Boolean.FALSE; - case TaglibPackage.JSP_VARIABLE__SCOPE: - return getScope(); - case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: - if (resolve) return getVariableClass(); - return basicGetVariableClass(); - case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: - return NAME_GIVEN_EDEFAULT == null ? nameGiven != null : !NAME_GIVEN_EDEFAULT.equals(nameGiven); - case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: - return NAME_FROM_ATTRIBUTE_EDEFAULT == null ? nameFromAttribute != null : !NAME_FROM_ATTRIBUTE_EDEFAULT.equals(nameFromAttribute); - case TaglibPackage.JSP_VARIABLE__DECLARE: - return declare != DECLARE_EDEFAULT; - case TaglibPackage.JSP_VARIABLE__SCOPE: - return scope != SCOPE_EDEFAULT; - case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: - return variableClass != null; - case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: - setNameGiven((String)newValue); - return; - case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: - setNameFromAttribute((String)newValue); - return; - case TaglibPackage.JSP_VARIABLE__DECLARE: - setDeclare(((Boolean)newValue).booleanValue()); - return; - case TaglibPackage.JSP_VARIABLE__SCOPE: - setScope((JSPScriptingVariableScope)newValue); - return; - case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: - setVariableClass((JavaClass)newValue); - return; - case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.JSP_VARIABLE__NAME_GIVEN: - setNameGiven(NAME_GIVEN_EDEFAULT); - return; - case TaglibPackage.JSP_VARIABLE__NAME_FROM_ATTRIBUTE: - setNameFromAttribute(NAME_FROM_ATTRIBUTE_EDEFAULT); - return; - case TaglibPackage.JSP_VARIABLE__DECLARE: - setDeclare(DECLARE_EDEFAULT); - return; - case TaglibPackage.JSP_VARIABLE__SCOPE: - setScope(SCOPE_EDEFAULT); - return; - case TaglibPackage.JSP_VARIABLE__VARIABLE_CLASS: - setVariableClass((JavaClass)null); - return; - case TaglibPackage.JSP_VARIABLE__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (nameGiven: ");//$NON-NLS-1$ - result.append(nameGiven); - result.append(", nameFromAttribute: ");//$NON-NLS-1$ - result.append(nameFromAttribute); - result.append(", declare: ");//$NON-NLS-1$ - result.append(declare); - result.append(", scope: ");//$NON-NLS-1$ - result.append(scope); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagFileImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagFileImpl.java deleted file mode 100644 index 616b1323f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagFileImpl.java +++ /dev/null @@ -1,370 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.impl.DescriptionGroupImpl; -import org.eclipse.jst.j2ee.taglib.TagFile; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; - - -/** - * - * An implementation of the model object 'Tag File'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getName Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getPath Path}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getExample Example}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TagFileImpl#getTagExtensions Tag Extensions}
  • - *
- *

- * - * @generated - */ -public class TagFileImpl extends DescriptionGroupImpl implements TagFile { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getPath() Path}' attribute. - * - * - * @see #getPath() - * @generated - * @ordered - */ - protected static final String PATH_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPath() Path}' attribute. - * - * - * @see #getPath() - * @generated - * @ordered - */ - protected String path = PATH_EDEFAULT; - - /** - * The default value of the '{@link #getExample() Example}' attribute. - * - * - * @see #getExample() - * @generated - * @ordered - */ - protected static final String EXAMPLE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getExample() Example}' attribute. - * - * - * @see #getExample() - * @generated - * @ordered - */ - protected String example = EXAMPLE_EDEFAULT; - - /** - * The cached value of the '{@link #getTagExtensions() Tag Extensions}' containment reference list. - * - * - * @see #getTagExtensions() - * @generated - * @ordered - */ - protected EList tagExtensions = null; - - /** - * - * - * @generated - */ - protected TagFileImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getTagFile(); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getPath() { - return path; - } - - /** - * - * - * @generated - */ - public void setPath(String newPath) { - String oldPath = path; - path = newPath; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__PATH, oldPath, path)); - } - - /** - * - * - * @generated - */ - public String getExample() { - return example; - } - - /** - * - * - * @generated - */ - public void setExample(String newExample) { - String oldExample = example; - example = newExample; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_FILE__EXAMPLE, oldExample, example)); - } - - /** - * - * - * @generated - */ - public EList getTagExtensions() { - if (tagExtensions == null) { - tagExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.TAG_FILE__TAG_EXTENSIONS); - } - return tagExtensions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.TAG_FILE__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_FILE__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_FILE__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: - return ((InternalEList)getTagExtensions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_FILE__ICONS: - return getIcons(); - case TaglibPackage.TAG_FILE__DISPLAY_NAMES: - return getDisplayNames(); - case TaglibPackage.TAG_FILE__DESCRIPTIONS: - return getDescriptions(); - case TaglibPackage.TAG_FILE__NAME: - return getName(); - case TaglibPackage.TAG_FILE__PATH: - return getPath(); - case TaglibPackage.TAG_FILE__EXAMPLE: - return getExample(); - case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: - return getTagExtensions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_FILE__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_FILE__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_FILE__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_FILE__NAME: - setName((String)newValue); - return; - case TaglibPackage.TAG_FILE__PATH: - setPath((String)newValue); - return; - case TaglibPackage.TAG_FILE__EXAMPLE: - setExample((String)newValue); - return; - case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: - getTagExtensions().clear(); - getTagExtensions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_FILE__ICONS: - getIcons().clear(); - return; - case TaglibPackage.TAG_FILE__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case TaglibPackage.TAG_FILE__DESCRIPTIONS: - getDescriptions().clear(); - return; - case TaglibPackage.TAG_FILE__NAME: - setName(NAME_EDEFAULT); - return; - case TaglibPackage.TAG_FILE__PATH: - setPath(PATH_EDEFAULT); - return; - case TaglibPackage.TAG_FILE__EXAMPLE: - setExample(EXAMPLE_EDEFAULT); - return; - case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: - getTagExtensions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_FILE__ICONS: - return icons != null && !icons.isEmpty(); - case TaglibPackage.TAG_FILE__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case TaglibPackage.TAG_FILE__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case TaglibPackage.TAG_FILE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case TaglibPackage.TAG_FILE__PATH: - return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); - case TaglibPackage.TAG_FILE__EXAMPLE: - return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); - case TaglibPackage.TAG_FILE__TAG_EXTENSIONS: - return tagExtensions != null && !tagExtensions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: ");//$NON-NLS-1$ - result.append(name); - result.append(", path: ");//$NON-NLS-1$ - result.append(path); - result.append(", example: ");//$NON-NLS-1$ - result.append(example); - result.append(')'); - return result.toString(); - } - -} //TagFileImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagLibImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagLibImpl.java deleted file mode 100644 index be51420e3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TagLibImpl.java +++ /dev/null @@ -1,594 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.TagLib; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; -import org.eclipse.jst.j2ee.taglib.Validator; - - -/** - * The taglib tag is the document root. - - */ -public class TagLibImpl extends CompatibilityDescriptionGroupImpl implements TagLib{ - - /** - * The default value of the '{@link #getTagLibVersion() Tag Lib Version}' attribute. - * - * - * @see #getTagLibVersion() - * @generated - * @ordered - */ - protected static final String TAG_LIB_VERSION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String tagLibVersion = TAG_LIB_VERSION_EDEFAULT; - /** - * The default value of the '{@link #getJspVersion() Jsp Version}' attribute. - * - * - * @see #getJspVersion() - * @generated - * @ordered - */ - protected static final String JSP_VERSION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String jspVersion = JSP_VERSION_EDEFAULT; - /** - * The default value of the '{@link #getShortName() Short Name}' attribute. - * - * - * @see #getShortName() - * @generated - * @ordered - */ - protected static final String SHORT_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String shortName = SHORT_NAME_EDEFAULT; - /** - * The default value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected static final String URI_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String uri = URI_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList tags = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected Validator validator = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList listeners = null; - /** - * The cached value of the '{@link #getFunctions() Functions}' containment reference list. - * - * - * @see #getFunctions() - * @generated - * @ordered - */ - protected EList functions = null; - - /** - * The cached value of the '{@link #getTaglibExtensions() Taglib Extensions}' containment reference list. - * - * - * @see #getTaglibExtensions() - * @generated - * @ordered - */ - protected EList taglibExtensions = null; - - public TagLibImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getTagLib(); - } - - /** - * @generated This field/method will be replaced during code generation - * Describes this version number of the tag library (dewey decimal). - * @regexp [0-9]*{ "."[0-9] }0..3 - */ - public String getTagLibVersion() { - return tagLibVersion; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setTagLibVersion(String newTagLibVersion) { - String oldTagLibVersion = tagLibVersion; - tagLibVersion = newTagLibVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__TAG_LIB_VERSION, oldTagLibVersion, tagLibVersion)); - } - - /** - * @generated This field/method will be replaced during code generation - * Describes the JSP version (number) this tag library requires in order to - * function (dewey decimal). Default is 1.2 - * @regexp [0-9]*{ "."[0-9] }0..3 - */ - public String getJspVersion() { - return jspVersion; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setJspVersion(String newJspVersion) { - String oldJspVersion = jspVersion; - jspVersion = newJspVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__JSP_VERSION, oldJspVersion, jspVersion)); - } - - /** - * @generated This field/method will be replaced during code generation - * The value of the short-name element is a name that could be used by a JSP - * authoring tool to create names with a mnemonic value; for example, it may be - * used as the prefered prefix value in taglib directives. Do not use white space, - * and do not start with digits or underscore. - */ - public String getShortName() { - return shortName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setShortName(String newShortName) { - String oldShortName = shortName; - shortName = newShortName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__SHORT_NAME, oldShortName, shortName)); - } - - /** - * @generated This field/method will be replaced during code generation - * The value of the uri element is a public URI that uniquely identifies the exact - * semantics of this taglibrary. - */ - public String getUri() { - return uri; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUri(String newUri) { - String oldUri = uri; - uri = newUri; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__URI, oldUri, uri)); - } - - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(displayName); - } - - /** - This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ - public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getModuleVersionID(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getTags() { - if (tags == null) { - tags = new EObjectContainmentEList(JSPTag.class, this, TaglibPackage.TAG_LIB__TAGS); - } - return tags; - } - - /** - * @generated This field/method will be replaced during code generation - * The validator element provides information on an optional validator that can be - * used to validate the conformance of a JSP page to using this tag library. - - */ - public Validator getValidator() { - return validator; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetValidator(Validator newValidator, NotificationChain msgs) { - Validator oldValidator = validator; - validator = newValidator; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__VALIDATOR, oldValidator, newValidator); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setValidator(Validator newValidator) { - if (newValidator != validator) { - NotificationChain msgs = null; - if (validator != null) - msgs = ((InternalEObject)validator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaglibPackage.TAG_LIB__VALIDATOR, null, msgs); - if (newValidator != null) - msgs = ((InternalEObject)newValidator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TaglibPackage.TAG_LIB__VALIDATOR, null, msgs); - msgs = basicSetValidator(newValidator, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TAG_LIB__VALIDATOR, newValidator, newValidator)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getListeners() { - if (listeners == null) { - listeners = new EObjectContainmentEList(Listener.class, this, TaglibPackage.TAG_LIB__LISTENERS); - } - return listeners; - } - - /** - * - * - * @generated - */ - public EList getFunctions() { - if (functions == null) { - functions = new EObjectContainmentEList(Function.class, this, TaglibPackage.TAG_LIB__FUNCTIONS); - } - return functions; - } - - /** - * - * - * @generated - */ - public EList getTaglibExtensions() { - if (taglibExtensions == null) { - taglibExtensions = new EObjectContainmentEList(TldExtension.class, this, TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS); - } - return taglibExtensions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.TAG_LIB__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__TAGS: - return ((InternalEList)getTags()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__VALIDATOR: - return basicSetValidator(null, msgs); - case TaglibPackage.TAG_LIB__LISTENERS: - return ((InternalEList)getListeners()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__FUNCTIONS: - return ((InternalEList)getFunctions()).basicRemove(otherEnd, msgs); - case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: - return ((InternalEList)getTaglibExtensions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_LIB__ICONS: - return getIcons(); - case TaglibPackage.TAG_LIB__DISPLAY_NAMES: - return getDisplayNames(); - case TaglibPackage.TAG_LIB__DESCRIPTIONS: - return getDescriptions(); - case TaglibPackage.TAG_LIB__SMALL_ICON: - return getSmallIcon(); - case TaglibPackage.TAG_LIB__LARGE_ICON: - return getLargeIcon(); - case TaglibPackage.TAG_LIB__DESCRIPTION: - return getDescription(); - case TaglibPackage.TAG_LIB__DISPLAY_NAME: - return getDisplayName(); - case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: - return getTagLibVersion(); - case TaglibPackage.TAG_LIB__JSP_VERSION: - return getJspVersion(); - case TaglibPackage.TAG_LIB__SHORT_NAME: - return getShortName(); - case TaglibPackage.TAG_LIB__URI: - return getUri(); - case TaglibPackage.TAG_LIB__TAGS: - return getTags(); - case TaglibPackage.TAG_LIB__VALIDATOR: - return getValidator(); - case TaglibPackage.TAG_LIB__LISTENERS: - return getListeners(); - case TaglibPackage.TAG_LIB__FUNCTIONS: - return getFunctions(); - case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: - return getTaglibExtensions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_LIB__ICONS: - return icons != null && !icons.isEmpty(); - case TaglibPackage.TAG_LIB__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case TaglibPackage.TAG_LIB__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case TaglibPackage.TAG_LIB__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case TaglibPackage.TAG_LIB__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case TaglibPackage.TAG_LIB__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case TaglibPackage.TAG_LIB__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: - return TAG_LIB_VERSION_EDEFAULT == null ? tagLibVersion != null : !TAG_LIB_VERSION_EDEFAULT.equals(tagLibVersion); - case TaglibPackage.TAG_LIB__JSP_VERSION: - return JSP_VERSION_EDEFAULT == null ? jspVersion != null : !JSP_VERSION_EDEFAULT.equals(jspVersion); - case TaglibPackage.TAG_LIB__SHORT_NAME: - return SHORT_NAME_EDEFAULT == null ? shortName != null : !SHORT_NAME_EDEFAULT.equals(shortName); - case TaglibPackage.TAG_LIB__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case TaglibPackage.TAG_LIB__TAGS: - return tags != null && !tags.isEmpty(); - case TaglibPackage.TAG_LIB__VALIDATOR: - return validator != null; - case TaglibPackage.TAG_LIB__LISTENERS: - return listeners != null && !listeners.isEmpty(); - case TaglibPackage.TAG_LIB__FUNCTIONS: - return functions != null && !functions.isEmpty(); - case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: - return taglibExtensions != null && !taglibExtensions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_LIB__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case TaglibPackage.TAG_LIB__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case TaglibPackage.TAG_LIB__DESCRIPTION: - setDescription((String)newValue); - return; - case TaglibPackage.TAG_LIB__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: - setTagLibVersion((String)newValue); - return; - case TaglibPackage.TAG_LIB__JSP_VERSION: - setJspVersion((String)newValue); - return; - case TaglibPackage.TAG_LIB__SHORT_NAME: - setShortName((String)newValue); - return; - case TaglibPackage.TAG_LIB__URI: - setUri((String)newValue); - return; - case TaglibPackage.TAG_LIB__TAGS: - getTags().clear(); - getTags().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__VALIDATOR: - setValidator((Validator)newValue); - return; - case TaglibPackage.TAG_LIB__LISTENERS: - getListeners().clear(); - getListeners().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__FUNCTIONS: - getFunctions().clear(); - getFunctions().addAll((Collection)newValue); - return; - case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: - getTaglibExtensions().clear(); - getTaglibExtensions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TAG_LIB__ICONS: - getIcons().clear(); - return; - case TaglibPackage.TAG_LIB__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case TaglibPackage.TAG_LIB__DESCRIPTIONS: - getDescriptions().clear(); - return; - case TaglibPackage.TAG_LIB__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__TAG_LIB_VERSION: - setTagLibVersion(TAG_LIB_VERSION_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__JSP_VERSION: - setJspVersion(JSP_VERSION_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__SHORT_NAME: - setShortName(SHORT_NAME_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__URI: - setUri(URI_EDEFAULT); - return; - case TaglibPackage.TAG_LIB__TAGS: - getTags().clear(); - return; - case TaglibPackage.TAG_LIB__VALIDATOR: - setValidator((Validator)null); - return; - case TaglibPackage.TAG_LIB__LISTENERS: - getListeners().clear(); - return; - case TaglibPackage.TAG_LIB__FUNCTIONS: - getFunctions().clear(); - return; - case TaglibPackage.TAG_LIB__TAGLIB_EXTENSIONS: - getTaglibExtensions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (tagLibVersion: ");//$NON-NLS-1$ - result.append(tagLibVersion); - result.append(", jspVersion: ");//$NON-NLS-1$ - result.append(jspVersion); - result.append(", shortName: ");//$NON-NLS-1$ - result.append(shortName); - result.append(", uri: ");//$NON-NLS-1$ - result.append(uri); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibFactoryImpl.java deleted file mode 100644 index f9f364228..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibFactoryImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.taglib.BodyContentType; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TagFile; -import org.eclipse.jst.j2ee.taglib.TagLib; -import org.eclipse.jst.j2ee.taglib.TaglibFactory; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; -import org.eclipse.jst.j2ee.taglib.Validator; - -/** - * @generated - */ -public class TaglibFactoryImpl extends EFactoryImpl implements TaglibFactory{ - - public TaglibFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case TaglibPackage.TAG_LIB: return createTagLib(); - case TaglibPackage.JSP_TAG: return createJSPTag(); - case TaglibPackage.JSP_TAG_ATTRIBUTE: return createJSPTagAttribute(); - case TaglibPackage.VALIDATOR: return createValidator(); - case TaglibPackage.JSP_VARIABLE: return createJSPVariable(); - case TaglibPackage.FUNCTION: return createFunction(); - case TaglibPackage.TAG_FILE: return createTagFile(); - case TaglibPackage.TLD_EXTENSION: return createTldExtension(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case TaglibPackage.BODY_CONTENT_TYPE: - return BodyContentType.get(initialValue); - case TaglibPackage.JSP_SCRIPTING_VARIABLE_SCOPE: - return JSPScriptingVariableScope.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case TaglibPackage.BODY_CONTENT_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case TaglibPackage.JSP_SCRIPTING_VARIABLE_SCOPE: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - -public static TaglibFactory getActiveFactory() { - return (TaglibFactory) getPackage().getEFactoryInstance(); -} - /** - * @generated This field/method will be replaced during code generation. - */ - public TagLib createTagLib() { - TagLibImpl tagLib = new TagLibImpl(); - return tagLib; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Validator createValidator() { - ValidatorImpl validator = new ValidatorImpl(); - return validator; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JSPTag createJSPTag() { - JSPTagImpl jspTag = new JSPTagImpl(); - return jspTag; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JSPTagAttribute createJSPTagAttribute() { - JSPTagAttributeImpl jspTagAttribute = new JSPTagAttributeImpl(); - return jspTagAttribute; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JSPVariable createJSPVariable() { - JSPVariableImpl jspVariable = new JSPVariableImpl(); - return jspVariable; - } - - /** - * - * - * @generated - */ - public Function createFunction() { - FunctionImpl function = new FunctionImpl(); - return function; - } - - /** - * - * - * @generated - */ - public TagFile createTagFile() { - TagFileImpl tagFile = new TagFileImpl(); - return tagFile; - } - - /** - * - * - * @generated - */ - public TldExtension createTldExtension() { - TldExtensionImpl tldExtension = new TldExtensionImpl(); - return tldExtension; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public TaglibPackage getTaglibPackage() { - return (TaglibPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static TaglibPackage getPackage() { - return TaglibPackage.eINSTANCE; - } -} - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibPackageImpl.java deleted file mode 100644 index 97e1e66c8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TaglibPackageImpl.java +++ /dev/null @@ -1,851 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.BodyContentType; -import org.eclipse.jst.j2ee.taglib.ExtensibleType; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.JSPScriptingVariableScope; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TagFile; -import org.eclipse.jst.j2ee.taglib.TagLib; -import org.eclipse.jst.j2ee.taglib.TaglibFactory; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; -import org.eclipse.jst.j2ee.taglib.Validator; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class TaglibPackageImpl extends EPackageImpl implements TaglibPackage, EPackage { - /** - * - * - * @generated - */ - private EClass tagLibEClass = null; - - /** - * - * - * @generated - */ - private EClass jspTagEClass = null; - - /** - * - * - * @generated - */ - private EClass jspTagAttributeEClass = null; - - /** - * - * - * @generated - */ - private EClass validatorEClass = null; - - /** - * - * - * @generated - */ - private EClass jspVariableEClass = null; - - /** - * - * - * @generated - */ - private EClass functionEClass = null; - - /** - * - * - * @generated - */ - private EClass tagFileEClass = null; - - /** - * - * - * @generated - */ - private EClass tldExtensionEClass = null; - - /** - * - * - * @generated - */ - private EClass extensibleTypeEClass = null; - - /** - * - * - * @generated - */ - private EEnum bodyContentTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum jspScriptingVariableScopeEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private TaglibPackageImpl() { - super(eNS_URI, TaglibFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static TaglibPackage init() { - if (isInited) return (TaglibPackage)EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI); - - // Obtain or create and register package. - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new TaglibPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - - // Step 1: create meta-model objects - theTaglibPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - - // Step 2: complete initialization - theTaglibPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - - return theTaglibPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getTagLib() { - return tagLibEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLib_TagLibVersion() { - return (EAttribute)tagLibEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLib_JspVersion() { - return (EAttribute)tagLibEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLib_ShortName() { - return (EAttribute)tagLibEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLib_Uri() { - return (EAttribute)tagLibEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getTagLib_Tags() { - return (EReference)tagLibEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getTagLib_Validator() { - return (EReference)tagLibEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getTagLib_Listeners() { - return (EReference)tagLibEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getTagLib_Functions() { - return (EReference)tagLibEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EReference getTagLib_TaglibExtensions() { - return (EReference)tagLibEClass.getEStructuralFeatures().get(8); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getValidator() { - return validatorEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getValidator_ValidatorClass() { - return (EReference)validatorEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getValidator_InitParams() { - return (EReference)validatorEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getValidator_Descriptions() { - return (EReference)validatorEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getJSPTag() { - return jspTagEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPTag_BodyContent() { - return (EAttribute)jspTagEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPTag_Example() { - return (EAttribute)jspTagEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPTag_Name() { - return (EAttribute)jspTagEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPTag_DynamicAttributes() { - return (EAttribute)jspTagEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPTag_Attributes() { - return (EReference)jspTagEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPTag_Variables() { - return (EReference)jspTagEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPTag_TagClass() { - return (EReference)jspTagEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPTag_TeiClass() { - return (EReference)jspTagEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getJSPTagAttribute() { - return jspTagAttributeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPTagAttribute_Name() { - return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPTagAttribute_Required() { - return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPTagAttribute_RtExprValue() { - return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getJSPTagAttribute_Fragment() { - return (EAttribute)jspTagAttributeEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPTagAttribute_Type() { - return (EReference)jspTagAttributeEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getJSPTagAttribute_Descriptions() { - return (EReference)jspTagAttributeEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getJSPVariable() { - return jspVariableEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPVariable_NameGiven() { - return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPVariable_NameFromAttribute() { - return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPVariable_Declare() { - return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPVariable_Scope() { - return (EAttribute)jspVariableEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getJSPVariable_VariableClass() { - return (EReference)jspVariableEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getJSPVariable_Descriptions() { - return (EReference)jspVariableEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EClass getFunction() { - return functionEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getFunction_Name() { - return (EAttribute)functionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getFunction_Signature() { - return (EAttribute)functionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getFunction_Example() { - return (EAttribute)functionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getFunction_FunctionClass() { - return (EReference)functionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getFunction_FunctionExtensions() { - return (EReference)functionEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getTagFile() { - return tagFileEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getTagFile_Name() { - return (EAttribute)tagFileEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getTagFile_Path() { - return (EAttribute)tagFileEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getTagFile_Example() { - return (EAttribute)tagFileEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getTagFile_TagExtensions() { - return (EReference)tagFileEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getTldExtension() { - return tldExtensionEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getTldExtension_Namespace() { - return (EAttribute)tldExtensionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getTldExtension_ExtensionElements() { - return (EReference)tldExtensionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getExtensibleType() { - return extensibleTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getExtensibleType_Value() { - return (EAttribute)extensibleTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getBodyContentType() { - return bodyContentTypeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getJSPScriptingVariableScope() { - return jspScriptingVariableScopeEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public TaglibFactory getTaglibFactory() { - return (TaglibFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - tagLibEClass = createEClass(TAG_LIB); - createEAttribute(tagLibEClass, TAG_LIB__TAG_LIB_VERSION); - createEAttribute(tagLibEClass, TAG_LIB__JSP_VERSION); - createEAttribute(tagLibEClass, TAG_LIB__SHORT_NAME); - createEAttribute(tagLibEClass, TAG_LIB__URI); - createEReference(tagLibEClass, TAG_LIB__TAGS); - createEReference(tagLibEClass, TAG_LIB__VALIDATOR); - createEReference(tagLibEClass, TAG_LIB__LISTENERS); - createEReference(tagLibEClass, TAG_LIB__FUNCTIONS); - createEReference(tagLibEClass, TAG_LIB__TAGLIB_EXTENSIONS); - - jspTagEClass = createEClass(JSP_TAG); - createEAttribute(jspTagEClass, JSP_TAG__BODY_CONTENT); - createEAttribute(jspTagEClass, JSP_TAG__EXAMPLE); - createEAttribute(jspTagEClass, JSP_TAG__NAME); - createEAttribute(jspTagEClass, JSP_TAG__DYNAMIC_ATTRIBUTES); - createEReference(jspTagEClass, JSP_TAG__ATTRIBUTES); - createEReference(jspTagEClass, JSP_TAG__VARIABLES); - createEReference(jspTagEClass, JSP_TAG__TAG_CLASS); - createEReference(jspTagEClass, JSP_TAG__TEI_CLASS); - - jspTagAttributeEClass = createEClass(JSP_TAG_ATTRIBUTE); - createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__NAME); - createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__REQUIRED); - createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__RT_EXPR_VALUE); - createEAttribute(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__FRAGMENT); - createEReference(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__TYPE); - createEReference(jspTagAttributeEClass, JSP_TAG_ATTRIBUTE__DESCRIPTIONS); - - validatorEClass = createEClass(VALIDATOR); - createEReference(validatorEClass, VALIDATOR__VALIDATOR_CLASS); - createEReference(validatorEClass, VALIDATOR__INIT_PARAMS); - createEReference(validatorEClass, VALIDATOR__DESCRIPTIONS); - - jspVariableEClass = createEClass(JSP_VARIABLE); - createEAttribute(jspVariableEClass, JSP_VARIABLE__NAME_GIVEN); - createEAttribute(jspVariableEClass, JSP_VARIABLE__NAME_FROM_ATTRIBUTE); - createEAttribute(jspVariableEClass, JSP_VARIABLE__DECLARE); - createEAttribute(jspVariableEClass, JSP_VARIABLE__SCOPE); - createEReference(jspVariableEClass, JSP_VARIABLE__VARIABLE_CLASS); - createEReference(jspVariableEClass, JSP_VARIABLE__DESCRIPTIONS); - - functionEClass = createEClass(FUNCTION); - createEAttribute(functionEClass, FUNCTION__NAME); - createEAttribute(functionEClass, FUNCTION__SIGNATURE); - createEAttribute(functionEClass, FUNCTION__EXAMPLE); - createEReference(functionEClass, FUNCTION__FUNCTION_CLASS); - createEReference(functionEClass, FUNCTION__FUNCTION_EXTENSIONS); - - tagFileEClass = createEClass(TAG_FILE); - createEAttribute(tagFileEClass, TAG_FILE__NAME); - createEAttribute(tagFileEClass, TAG_FILE__PATH); - createEAttribute(tagFileEClass, TAG_FILE__EXAMPLE); - createEReference(tagFileEClass, TAG_FILE__TAG_EXTENSIONS); - - tldExtensionEClass = createEClass(TLD_EXTENSION); - createEAttribute(tldExtensionEClass, TLD_EXTENSION__NAMESPACE); - createEReference(tldExtensionEClass, TLD_EXTENSION__EXTENSION_ELEMENTS); - - extensibleTypeEClass = createEClass(EXTENSIBLE_TYPE); - createEAttribute(extensibleTypeEClass, EXTENSIBLE_TYPE__VALUE); - - // Create enums - bodyContentTypeEEnum = createEEnum(BODY_CONTENT_TYPE); - jspScriptingVariableScopeEEnum = createEEnum(JSP_SCRIPTING_VARIABLE_SCOPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); - - // Add supertypes to classes - tagLibEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - jspTagEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); - functionEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); - tagFileEClass.getESuperTypes().add(theCommonPackage.getDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(tagLibEClass, TagLib.class, "TagLib", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getTagLib_TagLibVersion(), ecorePackage.getEString(), "tagLibVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagLib_JspVersion(), ecorePackage.getEString(), "jspVersion", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagLib_ShortName(), ecorePackage.getEString(), "shortName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagLib_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLib_Tags(), this.getJSPTag(), null, "tags", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLib_Validator(), this.getValidator(), null, "validator", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLib_Listeners(), theCommonPackage.getListener(), null, "listeners", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLib_Functions(), this.getFunction(), null, "functions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLib_TaglibExtensions(), this.getTldExtension(), null, "taglibExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(jspTagEClass, JSPTag.class, "JSPTag", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getJSPTag_BodyContent(), this.getBodyContentType(), "bodyContent", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPTag_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPTag_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPTag_DynamicAttributes(), ecorePackage.getEBoolean(), "dynamicAttributes", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTag_Attributes(), this.getJSPTagAttribute(), null, "attributes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTag_Variables(), this.getJSPVariable(), null, "variables", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTag_TagClass(), theJavaRefPackage.getJavaClass(), null, "tagClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTag_TeiClass(), theJavaRefPackage.getJavaClass(), null, "teiClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(jspTagAttributeEClass, JSPTagAttribute.class, "JSPTagAttribute", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getJSPTagAttribute_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPTagAttribute_Required(), ecorePackage.getEBoolean(), "required", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPTagAttribute_RtExprValue(), ecorePackage.getEBoolean(), "rtExprValue", "false", 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getJSPTagAttribute_Fragment(), ecorePackage.getEBoolean(), "fragment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTagAttribute_Type(), theJavaRefPackage.getJavaClass(), null, "type", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPTagAttribute_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(validatorEClass, Validator.class, "Validator", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getValidator_ValidatorClass(), theJavaRefPackage.getJavaClass(), null, "validatorClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getValidator_InitParams(), theWebapplicationPackage.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getValidator_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(jspVariableEClass, JSPVariable.class, "JSPVariable", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getJSPVariable_NameGiven(), ecorePackage.getEString(), "nameGiven", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPVariable_NameFromAttribute(), ecorePackage.getEString(), "nameFromAttribute", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPVariable_Declare(), ecorePackage.getEBoolean(), "declare", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getJSPVariable_Scope(), this.getJSPScriptingVariableScope(), "scope", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPVariable_VariableClass(), theJavaRefPackage.getJavaClass(), null, "variableClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getJSPVariable_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(functionEClass, Function.class, "Function", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getFunction_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getFunction_Signature(), ecorePackage.getEString(), "signature", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEAttribute(getFunction_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED); //$NON-NLS-1$ - initEReference(getFunction_FunctionClass(), theJavaRefPackage.getJavaClass(), null, "functionClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFunction_FunctionExtensions(), this.getTldExtension(), null, "functionExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(tagFileEClass, TagFile.class, "TagFile", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getTagFile_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagFile_Path(), ecorePackage.getEString(), "path", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagFile_Example(), ecorePackage.getEString(), "example", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagFile_TagExtensions(), this.getTldExtension(), null, "tagExtensions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(tldExtensionEClass, TldExtension.class, "TldExtension", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getTldExtension_Namespace(), ecorePackage.getEString(), "namespace", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTldExtension_ExtensionElements(), this.getExtensibleType(), null, "extensionElements", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(extensibleTypeEClass, ExtensibleType.class, "ExtensibleType", IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getExtensibleType_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(bodyContentTypeEEnum, BodyContentType.class, "BodyContentType");//$NON-NLS-1$ - addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.TAGDEPENDENT_LITERAL);//$NON-NLS-1$ - addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.JSP_LITERAL);//$NON-NLS-1$ - addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.EMPTY_LITERAL);//$NON-NLS-1$ - addEEnumLiteral(bodyContentTypeEEnum, BodyContentType.SCRIPTLESS_LITERAL);//$NON-NLS-1$ - - initEEnum(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.class, "JSPScriptingVariableScope");//$NON-NLS-1$ - addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.NESTED_LITERAL); - addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.AT_BEGIN_LITERAL); - addEEnumLiteral(jspScriptingVariableScopeEEnum, JSPScriptingVariableScope.AT_END_LITERAL); - - // Create resource - createResource(eNS_URI); - } -} //TaglibPackageImpl - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TldExtensionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TldExtensionImpl.java deleted file mode 100644 index bf15c17e3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/TldExtensionImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.taglib.ExtensibleType; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; - - -/** - * - * An implementation of the model object 'Tld Extension'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TldExtensionImpl#getNamespace Namespace}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.taglib.impl.TldExtensionImpl#getExtensionElements Extension Elements}
  • - *
- *

- * - * @generated - */ -public class TldExtensionImpl extends EObjectImpl implements TldExtension { - /** - * The default value of the '{@link #getNamespace() Namespace}' attribute. - * - * - * @see #getNamespace() - * @generated - * @ordered - */ - protected static final String NAMESPACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getNamespace() Namespace}' attribute. - * - * - * @see #getNamespace() - * @generated - * @ordered - */ - protected String namespace = NAMESPACE_EDEFAULT; - - /** - * The cached value of the '{@link #getExtensionElements() Extension Elements}' containment reference list. - * - * - * @see #getExtensionElements() - * @generated - * @ordered - */ - protected EList extensionElements = null; - - /** - * - * - * @generated - */ - protected TldExtensionImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getTldExtension(); - } - - /** - * - * - * @generated - */ - public String getNamespace() { - return namespace; - } - - /** - * - * - * @generated - */ - public void setNamespace(String newNamespace) { - String oldNamespace = namespace; - namespace = newNamespace; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.TLD_EXTENSION__NAMESPACE, oldNamespace, namespace)); - } - - /** - * - * - * @generated - */ - public EList getExtensionElements() { - if (extensionElements == null) { - extensionElements = new EObjectContainmentEList(ExtensibleType.class, this, TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS); - } - return extensionElements; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: - return ((InternalEList)getExtensionElements()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TLD_EXTENSION__NAMESPACE: - return getNamespace(); - case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: - return getExtensionElements(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TLD_EXTENSION__NAMESPACE: - setNamespace((String)newValue); - return; - case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: - getExtensionElements().clear(); - getExtensionElements().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TLD_EXTENSION__NAMESPACE: - setNamespace(NAMESPACE_EDEFAULT); - return; - case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: - getExtensionElements().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.TLD_EXTENSION__NAMESPACE: - return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace); - case TaglibPackage.TLD_EXTENSION__EXTENSION_ELEMENTS: - return extensionElements != null && !extensionElements.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (namespace: ");//$NON-NLS-1$ - result.append(namespace); - result.append(')'); - return result.toString(); - } - -} //TldExtensionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ValidatorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ValidatorImpl.java deleted file mode 100644 index 2fa3e0a47..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/impl/ValidatorImpl.java +++ /dev/null @@ -1,245 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.Validator; -import org.eclipse.jst.j2ee.webapplication.InitParam; - - -/** - * The validator element provides information on an optional validator that can be used to validate the conformance of a JSP page to using this tag library. - - */ -public class ValidatorImpl extends EObjectImpl implements Validator, EObject{ - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass validatorClass = null; - public ValidatorImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return TaglibPackage.eINSTANCE.getValidator(); - } - - /** - * - * - * @generated - */ - public JavaClass getValidatorClass() { - if (validatorClass != null && validatorClass.eIsProxy()) { - JavaClass oldValidatorClass = validatorClass; - validatorClass = (JavaClass)eResolveProxy((InternalEObject)validatorClass); - if (validatorClass != oldValidatorClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaglibPackage.VALIDATOR__VALIDATOR_CLASS, oldValidatorClass, validatorClass)); - } - } - return validatorClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetValidatorClass() { - return validatorClass; - } - - /** - * - * - * @generated - */ - public void setValidatorClass(JavaClass newValidatorClass) { - JavaClass oldValidatorClass = validatorClass; - validatorClass = newValidatorClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TaglibPackage.VALIDATOR__VALIDATOR_CLASS, oldValidatorClass, validatorClass)); - } - - /** - * - * - * @generated - */ - public EList getInitParams() { - if (initParams == null) { - initParams = new EObjectContainmentEList(InitParam.class, this, TaglibPackage.VALIDATOR__INIT_PARAMS); - } - return initParams; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, TaglibPackage.VALIDATOR__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case TaglibPackage.VALIDATOR__INIT_PARAMS: - return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); - case TaglibPackage.VALIDATOR__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: - if (resolve) return getValidatorClass(); - return basicGetValidatorClass(); - case TaglibPackage.VALIDATOR__INIT_PARAMS: - return getInitParams(); - case TaglibPackage.VALIDATOR__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: - setValidatorClass((JavaClass)newValue); - return; - case TaglibPackage.VALIDATOR__INIT_PARAMS: - getInitParams().clear(); - getInitParams().addAll((Collection)newValue); - return; - case TaglibPackage.VALIDATOR__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: - setValidatorClass((JavaClass)null); - return; - case TaglibPackage.VALIDATOR__INIT_PARAMS: - getInitParams().clear(); - return; - case TaglibPackage.VALIDATOR__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case TaglibPackage.VALIDATOR__VALIDATOR_CLASS: - return validatorClass != null; - case TaglibPackage.VALIDATOR__INIT_PARAMS: - return initParams != null && !initParams.isEmpty(); - case TaglibPackage.VALIDATOR__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - protected EList initParams=null; - - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - protected boolean setValidatorClass=false; - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibAdapterFactory.java deleted file mode 100644 index d53aa9845..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibAdapterFactory.java +++ /dev/null @@ -1,303 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.taglib.ExtensibleType; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TagFile; -import org.eclipse.jst.j2ee.taglib.TagLib; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; -import org.eclipse.jst.j2ee.taglib.Validator; - - - -public class TaglibAdapterFactory extends AdapterFactoryImpl { - protected static TaglibPackage modelPackage; - - public TaglibAdapterFactory() { - if (modelPackage == null) { - modelPackage = (TaglibPackage)EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - protected TaglibSwitch sw = new TaglibSwitch() { - public Object caseTagLib(TagLib object) { - return createTagLibAdapter(); - } - public Object caseValidator(Validator object) { - return createValidatorAdapter(); - } - public Object caseJSPTag(JSPTag object) { - return createJSPTagAdapter(); - } - public Object caseJSPTagAttribute(JSPTagAttribute object) { - return createJSPTagAttributeAdapter(); - } - public Object caseJSPVariable(JSPVariable object) { - return createJSPVariableAdapter(); - } - }; - - public Adapter createAdapter(Notifier target) { - return (Adapter)sw.doSwitch((EObject)target); - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createTagLibAdapter() { - return null; - } - - public Adapter createValidatorAdapter() { - return null; - } - - public Adapter createJSPTagAdapter() { - return null; - } - - public Adapter createJSPTagAttributeAdapter() { - return null; - } - - public Adapter createJSPVariableAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected TaglibSwitch modelSwitch = - new TaglibSwitch() { - public Object caseTagLib(TagLib object) { - return createTagLibAdapter(); - } - public Object caseJSPTag(JSPTag object) { - return createJSPTagAdapter(); - } - public Object caseJSPTagAttribute(JSPTagAttribute object) { - return createJSPTagAttributeAdapter(); - } - public Object caseValidator(Validator object) { - return createValidatorAdapter(); - } - public Object caseJSPVariable(JSPVariable object) { - return createJSPVariableAdapter(); - } - public Object caseFunction(Function object) { - return createFunctionAdapter(); - } - public Object caseTagFile(TagFile object) { - return createTagFileAdapter(); - } - public Object caseTldExtension(TldExtension object) { - return createTldExtensionAdapter(); - } - public Object caseExtensibleType(ExtensibleType object) { - return createExtensibleTypeAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createTagLibAdapterGen() { - - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createValidatorAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createJSPTagAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createJSPTagAttributeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createJSPVariableAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.Function Function}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.taglib.Function - * @generated - */ - public Adapter createFunctionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.TagFile Tag File}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.taglib.TagFile - * @generated - */ - public Adapter createTagFileAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.TldExtension Tld Extension}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.taglib.TldExtension - * @generated - */ - public Adapter createTldExtensionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.taglib.ExtensibleType Extensible Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.taglib.ExtensibleType - * @generated - */ - public Adapter createExtensibleTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //TaglibAdapterFactory - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibSwitch.java deleted file mode 100644 index 7645cbf8f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/taglib/util/TaglibSwitch.java +++ /dev/null @@ -1,318 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.taglib.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.taglib.ExtensibleType; -import org.eclipse.jst.j2ee.taglib.Function; -import org.eclipse.jst.j2ee.taglib.JSPTag; -import org.eclipse.jst.j2ee.taglib.JSPTagAttribute; -import org.eclipse.jst.j2ee.taglib.JSPVariable; -import org.eclipse.jst.j2ee.taglib.TagFile; -import org.eclipse.jst.j2ee.taglib.TagLib; -import org.eclipse.jst.j2ee.taglib.TaglibFactory; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.TldExtension; -import org.eclipse.jst.j2ee.taglib.Validator; -import org.eclipse.jst.j2ee.taglib.impl.TaglibFactoryImpl; - -public class TaglibSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static TaglibPackage modelPackage; - - protected static TaglibFactory factory; - - public TaglibSwitch() { - factory = (TaglibFactory)TaglibFactoryImpl.getPackage().getEFactoryInstance(); - modelPackage = TaglibFactoryImpl.getPackage(); - } - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() != modelPackage) return defaultCase(theEObject); - - switch (theEClass.getClassifierID()) { - case TaglibPackage.TAG_LIB: - { - TagLib castedObject = (TagLib)theEObject; - Object result = caseTagLib(castedObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.VALIDATOR: - { - Validator castedObject = (Validator)theEObject; - Object result = caseValidator(castedObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_TAG: - { - JSPTag castedObject = (JSPTag)theEObject; - Object result = caseJSPTag(castedObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_TAG_ATTRIBUTE: - { - JSPTagAttribute castedObject = (JSPTagAttribute)theEObject; - Object result = caseJSPTagAttribute(castedObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_VARIABLE: - { - JSPVariable castedObject = (JSPVariable)theEObject; - Object result = caseJSPVariable(castedObject); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } // doSwitch - - public Object caseTagLib(TagLib object) { - return null; - } - - public Object caseValidator(Validator object) { - return null; - } - - public Object caseJSPTag(JSPTag object) { - return null; - } - - public Object caseJSPTagAttribute(JSPTagAttribute object) { - return null; - } - - public Object caseJSPVariable(JSPVariable object) { - return null; - } - - public Object defaultCase(EObject object) { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Object doSwitchGen(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case TaglibPackage.TAG_LIB: { - TagLib tagLib = (TagLib)theEObject; - Object result = caseTagLib(tagLib); - if (result == null) result = caseCompatibilityDescriptionGroup(tagLib); - if (result == null) result = caseDescriptionGroup(tagLib); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_TAG: { - JSPTag jspTag = (JSPTag)theEObject; - Object result = caseJSPTag(jspTag); - if (result == null) result = caseDescriptionGroup(jspTag); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_TAG_ATTRIBUTE: { - JSPTagAttribute jspTagAttribute = (JSPTagAttribute)theEObject; - Object result = caseJSPTagAttribute(jspTagAttribute); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.VALIDATOR: { - Validator validator = (Validator)theEObject; - Object result = caseValidator(validator); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.JSP_VARIABLE: { - JSPVariable jspVariable = (JSPVariable)theEObject; - Object result = caseJSPVariable(jspVariable); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.FUNCTION: { - Function function = (Function)theEObject; - Object result = caseFunction(function); - if (result == null) result = caseDescriptionGroup(function); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.TAG_FILE: { - TagFile tagFile = (TagFile)theEObject; - Object result = caseTagFile(tagFile); - if (result == null) result = caseDescriptionGroup(tagFile); - if (result == null) result = defaultCase(theEObject); - return result; - } - case TaglibPackage.TLD_EXTENSION: { - TldExtension tldExtension = (TldExtension)theEObject; - Object result = caseTldExtension(tldExtension); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseTagLibGen(TagLib object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseValidatorGen(Validator object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseJSPTagGen(JSPTag object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseJSPTagAttributeGen(JSPTagAttribute object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseJSPVariableGen(JSPVariable object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Function'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Function'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseFunction(Function object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Tag File'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Tag File'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseTagFile(TagFile object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Tld Extension'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Tld Extension'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseTldExtension(TldExtension object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Extensible Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Extensible Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseExtensibleType(ExtensibleType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object defaultCaseGen(EObject object) { - return null; - } - -} //TaglibSwitch - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationFactory.java index 2339a56c2..d8ec6397c 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationFactory.java @@ -21,7 +21,7 @@ public interface WebapplicationFactory extends EFactory{ * * @generated */ - WebapplicationFactory eINSTANCE = new org.eclipse.jst.j2ee.webapplication.impl.WebapplicationFactoryImpl(); + WebapplicationFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationFactoryImpl(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationPackage.java index 03d938559..41f9468df 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/WebapplicationPackage.java @@ -1219,7 +1219,7 @@ public interface WebapplicationPackage extends EPackage{ * * @generated */ - WebapplicationPackage eINSTANCE = org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl.init(); + WebapplicationPackage eINSTANCE = org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl.init(); /** * @generated This field/method will be replaced during code generation diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/AuthConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/AuthConstraintImpl.java deleted file mode 100644 index 444c7ec96..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/AuthConstraintImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * The auth-constraint element indicates the user roles that should be permitted access to this resource collection. The role used here must appear in a security-role-ref element. - */ -public class AuthConstraintImpl extends EObjectImpl implements AuthConstraint, EObject { - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList roles = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public AuthConstraintImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getAuthConstraint(); - } - - /** - * @generated This field/method will be replaced during code generation - * A description of the auth constraint. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * A list of role names for the auth constraint. Each element specifies the name - * of a security role (a String). - - */ - public EList getRoles() { - if (roles == null) { - roles = new EDataTypeUniqueEList(String.class, this, WebapplicationPackage.AUTH_CONSTRAINT__ROLES); - } - return roles; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public SecurityConstraint getSecConstraint() { - if (eContainerFeatureID != WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT) return null; - return (SecurityConstraint)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSecConstraint(SecurityConstraint newSecConstraint) { - if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT && newSecConstraint != null)) { - if (EcoreUtil.isAncestor(this, newSecConstraint)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newSecConstraint != null) - msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, SecurityConstraint.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - return eBasicSetContainer(null, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, msgs); - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, SecurityConstraint.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: - return getRoles(); - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - return getSecConstraint(); - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: - return roles != null && !roles.isEmpty(); - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - return getSecConstraint() != null; - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: - getRoles().clear(); - getRoles().addAll((Collection)newValue); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)newValue); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__ROLES: - getRoles().clear(); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)null); - return; - case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", roles: ");//$NON-NLS-1$ - result.append(roles); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ContextParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ContextParamImpl.java deleted file mode 100644 index c789f54d6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ContextParamImpl.java +++ /dev/null @@ -1,332 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The context-param element contains the declaration of a web application's servlet context initialization parameters. - */ -public class ContextParamImpl extends EObjectImpl implements ContextParam, EObject { - - /** - * The default value of the '{@link #getParamName() Param Name}' attribute. - * - * - * @see #getParamName() - * @generated - * @ordered - */ - protected static final String PARAM_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String paramName = PARAM_NAME_EDEFAULT; - /** - * The default value of the '{@link #getParamValue() Param Value}' attribute. - * - * - * @see #getParamValue() - * @generated - * @ordered - */ - protected static final String PARAM_VALUE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String paramValue = PARAM_VALUE_EDEFAULT; - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - public ContextParamImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getContextParam(); - } - - /** - * @generated This field/method will be replaced during code generation - * The param-name element contains the name of a parameter. - */ - public String getParamName() { - return paramName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setParamName(String newParamName) { - String oldParamName = paramName; - paramName = newParamName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME, oldParamName, paramName)); - } - - /** - * @generated This field/method will be replaced during code generation - * The param-value element contains the value of a parameter. - */ - public String getParamValue() { - return paramValue; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setParamValue(String newParamValue) { - String oldParamValue = paramValue; - paramValue = newParamValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.CONTEXT_PARAM__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.CONTEXT_PARAM__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__CONTEXTS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, newWebApp, newWebApp)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.CONTEXT_PARAM__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__CONTEXTS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: - return getParamName(); - case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: - return getParamValue(); - case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - return getWebApp(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: - return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); - case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: - return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); - case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - return getWebApp() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: - setParamName((String)newValue); - return; - case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: - setParamValue((String)newValue); - return; - case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - setWebApp((WebApp)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME: - setParamName(PARAM_NAME_EDEFAULT); - return; - case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE: - setParamValue(PARAM_VALUE_EDEFAULT); - return; - case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.CONTEXT_PARAM__WEB_APP: - setWebApp((WebApp)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (paramName: "); //$NON-NLS-1$ - result.append(paramName); - result.append(", paramValue: "); //$NON-NLS-1$ - result.append(paramValue); - result.append(", description: "); //$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorCodeErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorCodeErrorPageImpl.java deleted file mode 100644 index 5a769c5d4..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorCodeErrorPageImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * @generated - */ -public class ErrorCodeErrorPageImpl extends ErrorPageImpl implements ErrorCodeErrorPage { - - /** - * The default value of the '{@link #getErrorCode() Error Code}' attribute. - * - * - * @see #getErrorCode() - * @generated - * @ordered - */ - protected static final String ERROR_CODE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String errorCode = ERROR_CODE_EDEFAULT; - public ErrorCodeErrorPageImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getErrorCodeErrorPage(); - } - -/** - * isErrorCode method comment. - */ -public boolean isErrorCode() { - return true; -} - /** - * @generated This field/method will be replaced during code generation - * The error-code contains an HTTP error code, ex: 404 - - */ - public String getErrorCode() { - return errorCode; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setErrorCode(String newErrorCode) { - String oldErrorCode = errorCode; - errorCode = newErrorCode; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE, oldErrorCode, errorCode)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: - return getLocation(); - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - return getWebApp(); - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: - return getErrorCode(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: - return ERROR_CODE_EDEFAULT == null ? errorCode != null : !ERROR_CODE_EDEFAULT.equals(errorCode); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: - setLocation((String)newValue); - return; - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: - setErrorCode((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE: - setErrorCode(ERROR_CODE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (errorCode: ");//$NON-NLS-1$ - result.append(errorCode); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorPageImpl.java deleted file mode 100644 index 5ce81317d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ErrorPageImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The error-page element contains a mapping between an error code or exception type to the path of a resource in the web application - */ -public class ErrorPageImpl extends EObjectImpl implements ErrorPage, EObject { - - /** - * The default value of the '{@link #getLocation() Location}' attribute. - * - * - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String location = LOCATION_EDEFAULT; - public ErrorPageImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getErrorPage(); - } - -/** - * isErrorCode method comment. - */ -public boolean isErrorCode() { - return false; -} -/** - * isExceptionType method comment. - */ -public boolean isExceptionType() { - return false; -} - /** - * @generated This field/method will be replaced during code generation - * The location element contains the location of the resource in the web - * application - */ - public String getLocation() { - return location; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLocation(String newLocation) { - String oldLocation = location; - location = newLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_PAGE__LOCATION, oldLocation, location)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.ERROR_PAGE__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.ERROR_PAGE__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ERROR_PAGE__WEB_APP, newWebApp, newWebApp)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_PAGE__LOCATION: - return getLocation(); - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - return getWebApp(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_PAGE__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - return getWebApp() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_PAGE__LOCATION: - setLocation((String)newValue); - return; - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - setWebApp((WebApp)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ERROR_PAGE__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - case WebapplicationPackage.ERROR_PAGE__WEB_APP: - setWebApp((WebApp)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (location: ");//$NON-NLS-1$ - result.append(location); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ExceptionTypeErrorPageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ExceptionTypeErrorPageImpl.java deleted file mode 100644 index c939324de..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ExceptionTypeErrorPageImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * @generated - */ -public class ExceptionTypeErrorPageImpl extends ErrorPageImpl implements ExceptionTypeErrorPage { - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass exceptionType = null; - public ExceptionTypeErrorPageImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getExceptionTypeErrorPage(); - } - -/** - * Helper method to set the ExceptionType to a JavaClass having a fully qualified - * name specified by the parameter - */ -public String getExceptionTypeName() { - getExceptionType(); - return exceptionType == null ? null : exceptionType.getQualifiedName(); -}/** - * Helper method to set the ExceptionType to a JavaClass having a fully qualified - * name specified by the parameter - */ -public boolean isExceptionType() { - return true; -} -public void setExceptionTypeName(String exceptionTypeName) { - setExceptionType(JavaRefFactory.eINSTANCE.createClassRef(exceptionTypeName)); -} -/** - * @deprecated Use @link{#setExceptionTypeName(String)} - */ -public void setExceptionTypeName(String exceptionTypeName, ResourceSet context) { - setExceptionTypeName(exceptionTypeName); -} - /** - * @generated This field/method will be replaced during code generation - * The exception type contains a fully qualified class name of a Java exception type. - */ - public JavaClass getExceptionType() { - if (exceptionType != null && exceptionType.eIsProxy()) { - JavaClass oldExceptionType = exceptionType; - exceptionType = (JavaClass)eResolveProxy((InternalEObject)exceptionType); - if (exceptionType != oldExceptionType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE, oldExceptionType, exceptionType)); - } - } - return exceptionType; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetExceptionType() { - return exceptionType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setExceptionType(JavaClass newExceptionType) { - JavaClass oldExceptionType = exceptionType; - exceptionType = newExceptionType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE, oldExceptionType, exceptionType)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: - return getLocation(); - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - return getWebApp(); - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: - if (resolve) return getExceptionType(); - return basicGetExceptionType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: - return exceptionType != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: - setLocation((String)newValue); - return; - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: - setExceptionType((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE: - setExceptionType((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - -} - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterImpl.java deleted file mode 100644 index 92829d984..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterImpl.java +++ /dev/null @@ -1,387 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * Declares a filter in the web application application. The filter is mapped to either a servlet or a URL pattern in the filter-mapping element, using the filter-name value to reference. Filters can access the initialization parameters declared in the deployment descriptor at runtime via the FilterConfig interface. - - */ -public class FilterImpl extends CompatibilityDescriptionGroupImpl implements Filter { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList initParams = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected JavaClass filterClass = null; - /** - * The cached value of the '{@link #getInitParamValues() Init Param Values}' containment reference list. - * - * - * @see #getInitParamValues() - * @generated - * @ordered - */ - protected EList initParamValues = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected FilterImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getFilter(); - } - - /** - * @generated This field/method will be replaced during code generation - * The logical name of the filter. This name is used to map the filter. - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER__NAME, oldName, name)); - } - - - /** - * - * getInitParams() is used for J2EE1.3 - * - * @generated This field/method will be replaced during code generation - * The init-params contain a name//value pairs as initialization params for the - * filter - - */ - public EList getInitParams() { - if (initParams == null) { - initParams = new EObjectContainmentEList(InitParam.class, this, WebapplicationPackage.FILTER__INIT_PARAMS); - } - return initParams; - } - - /** - * @generated This field/method will be replaced during code generation - * The fully qualified classname of the filter. - */ - public JavaClass getFilterClass() { - if (filterClass != null && filterClass.eIsProxy()) { - JavaClass oldFilterClass = filterClass; - filterClass = (JavaClass)eResolveProxy((InternalEObject)filterClass); - if (filterClass != oldFilterClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER__FILTER_CLASS, oldFilterClass, filterClass)); - } - } - return filterClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetFilterClass() { - return filterClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFilterClass(JavaClass newFilterClass) { - JavaClass oldFilterClass = filterClass; - filterClass = newFilterClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER__FILTER_CLASS, oldFilterClass, filterClass)); - } - - /** - * - * getInitParamValues() is used for J2EE1.4 - * - * @generated - */ - public EList getInitParamValues() { - if (initParamValues == null) { - initParamValues = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.FILTER__INIT_PARAM_VALUES); - } - return initParamValues; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.FILTER__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.FILTER__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.FILTER__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.FILTER__INIT_PARAMS: - return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: - return ((InternalEList)getInitParamValues()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER__ICONS: - return getIcons(); - case WebapplicationPackage.FILTER__DISPLAY_NAMES: - return getDisplayNames(); - case WebapplicationPackage.FILTER__DESCRIPTIONS: - return getDescriptions(); - case WebapplicationPackage.FILTER__SMALL_ICON: - return getSmallIcon(); - case WebapplicationPackage.FILTER__LARGE_ICON: - return getLargeIcon(); - case WebapplicationPackage.FILTER__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.FILTER__DISPLAY_NAME: - return getDisplayName(); - case WebapplicationPackage.FILTER__NAME: - return getName(); - case WebapplicationPackage.FILTER__INIT_PARAMS: - return getInitParams(); - case WebapplicationPackage.FILTER__FILTER_CLASS: - if (resolve) return getFilterClass(); - return basicGetFilterClass(); - case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: - return getInitParamValues(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER__ICONS: - return icons != null && !icons.isEmpty(); - case WebapplicationPackage.FILTER__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case WebapplicationPackage.FILTER__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WebapplicationPackage.FILTER__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WebapplicationPackage.FILTER__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WebapplicationPackage.FILTER__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.FILTER__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WebapplicationPackage.FILTER__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case WebapplicationPackage.FILTER__INIT_PARAMS: - return initParams != null && !initParams.isEmpty(); - case WebapplicationPackage.FILTER__FILTER_CLASS: - return filterClass != null; - case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: - return initParamValues != null && !initParamValues.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case WebapplicationPackage.FILTER__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case WebapplicationPackage.FILTER__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WebapplicationPackage.FILTER__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WebapplicationPackage.FILTER__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WebapplicationPackage.FILTER__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.FILTER__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WebapplicationPackage.FILTER__NAME: - setName((String)newValue); - return; - case WebapplicationPackage.FILTER__INIT_PARAMS: - getInitParams().clear(); - getInitParams().addAll((Collection)newValue); - return; - case WebapplicationPackage.FILTER__FILTER_CLASS: - setFilterClass((JavaClass)newValue); - return; - case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: - getInitParamValues().clear(); - getInitParamValues().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER__ICONS: - getIcons().clear(); - return; - case WebapplicationPackage.FILTER__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case WebapplicationPackage.FILTER__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WebapplicationPackage.FILTER__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WebapplicationPackage.FILTER__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WebapplicationPackage.FILTER__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.FILTER__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WebapplicationPackage.FILTER__NAME: - setName(NAME_EDEFAULT); - return; - case WebapplicationPackage.FILTER__INIT_PARAMS: - getInitParams().clear(); - return; - case WebapplicationPackage.FILTER__FILTER_CLASS: - setFilterClass((JavaClass)null); - return; - case WebapplicationPackage.FILTER__INIT_PARAM_VALUES: - getInitParamValues().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: ");//$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -public JavaClass createClassRef(String targetName) { - return JavaRefFactory.eINSTANCE.createClassRef(targetName); -} - - -public String getFilterClassName() { - getFilterClass(); - return (filterClass == null) ? null : filterClass.getQualifiedName(); -} -public void setFilterClassName(String filterClassName) { - eSet(WebapplicationPackage.eINSTANCE.getFilter_FilterClass(), createClassRef(filterClassName)); -} -} //FilterImpl - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterMappingImpl.java deleted file mode 100644 index 670752845..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FilterMappingImpl.java +++ /dev/null @@ -1,341 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.jst.j2ee.webapplication.DispatcherType; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * Declaration of the filter mappings in this web application. The container uses the filter-mapping declarations to decide which filters to apply to a request, and in what order. The container matches the request URI to a Servlet in the normal way. To determine which filters to apply it matches filter-mapping declarations either on servlet-name, or on url-pattern for each filter-mapping element, depending on which style is used. The order in which filters are invoked is the order in which filter-mapping declarations that match a request URI for a servlet appear in the list of filter-mapping elements.The filter-name value must be the value of the sub-elements of one of the declarations in the deployment descriptor. - * - * @invariant The filter-name value must be the value of the Filter::name of one of the Filter declarations in the deployment descriptor. - - */ -public class FilterMappingImpl extends EObjectImpl implements FilterMapping, EObject{ - - /** - * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. - * - * - * @see #getUrlPattern() - * @generated - * @ordered - */ - protected static final String URL_PATTERN_EDEFAULT = null; - - protected transient String servletName; - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String urlPattern = URL_PATTERN_EDEFAULT; - /** - * The cached value of the '{@link #getDispatcherType() Dispatcher Type}' attribute list. - * - * - * @see #getDispatcherType() - * @generated - * @ordered - */ - protected EList dispatcherType = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected Filter filter = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected Servlet servlet = null; - public FilterMappingImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getFilterMapping(); - } - -/** - * Returns the name of the servlet that this mapping applies to. - */ - public Servlet getServlet(){ - Servlet lservlet = this.getServletGen(); - if (lservlet == null && servletName != null){ - WebApp webapp = (WebApp)eContainer(); - if (webapp != null){ - lservlet=webapp.getServletNamed(servletName); - if (lservlet != null) - setServlet(lservlet); - } - } - return lservlet; -} -/** - * Returns the name of the servlet that this mapping applies to. - */ -public String getServletName(){ - String ret = null; - if (servletName != null) - ret = servletName; - - Servlet lservlet = getServlet(); - if (lservlet != null) - ret = lservlet.getServletName(); - return ret; -} -/** - * Sets the name of the servlet that this mapping applies to. - */ -public void setServletName(String servletName){ - this.servletName = servletName; -} - /** - * @generated This field/method will be replaced during code generation - * The url-pattern element contains the url pattern of the mapping. Must follow - * the rules specified in Section 10 of the Servlet API Specification. - */ - public String getUrlPattern() { - return urlPattern; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUrlPattern(String newUrlPattern) { - String oldUrlPattern = urlPattern; - urlPattern = newUrlPattern; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__URL_PATTERN, oldUrlPattern, urlPattern)); - } - - /** - * - * - * @generated - */ - public EList getDispatcherType() { - if (dispatcherType == null) { - dispatcherType = new EDataTypeUniqueEList(DispatcherType.class, this, WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE); - } - return dispatcherType; - } - - /** - * @generated This field/method will be replaced during code generation - * The filter being mapped - */ - public Filter getFilter() { - if (filter != null && filter.eIsProxy()) { - Filter oldFilter = filter; - filter = (Filter)eResolveProxy((InternalEObject)filter); - if (filter != oldFilter) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER_MAPPING__FILTER, oldFilter, filter)); - } - } - return filter; - } - - /** - * - * - * @generated - */ - public Filter basicGetFilter() { - return filter; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFilter(Filter newFilter) { - Filter oldFilter = filter; - filter = newFilter; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__FILTER, oldFilter, filter)); - } - - public void setServlet(Servlet l) { - servletName = null; - setServletGen(l); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setServletGen(Servlet newServlet) { - Servlet oldServlet = servlet; - servlet = newServlet; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FILTER_MAPPING__SERVLET, oldServlet, servlet)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: - return getUrlPattern(); - case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: - return getDispatcherType(); - case WebapplicationPackage.FILTER_MAPPING__FILTER: - if (resolve) return getFilter(); - return basicGetFilter(); - case WebapplicationPackage.FILTER_MAPPING__SERVLET: - if (resolve) return getServlet(); - return basicGetServlet(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: - return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); - case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: - return dispatcherType != null && !dispatcherType.isEmpty(); - case WebapplicationPackage.FILTER_MAPPING__FILTER: - return filter != null; - case WebapplicationPackage.FILTER_MAPPING__SERVLET: - return servlet != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: - setUrlPattern((String)newValue); - return; - case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: - getDispatcherType().clear(); - getDispatcherType().addAll((Collection)newValue); - return; - case WebapplicationPackage.FILTER_MAPPING__FILTER: - setFilter((Filter)newValue); - return; - case WebapplicationPackage.FILTER_MAPPING__SERVLET: - if(newValue instanceof String) - setServletName((String)newValue); - else - setServlet((Servlet)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN: - setUrlPattern(URL_PATTERN_EDEFAULT); - return; - case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE: - getDispatcherType().clear(); - return; - case WebapplicationPackage.FILTER_MAPPING__FILTER: - setFilter((Filter)null); - return; - case WebapplicationPackage.FILTER_MAPPING__SERVLET: - setServlet((Servlet)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (urlPattern: ");//$NON-NLS-1$ - result.append(urlPattern); - result.append(", dispatcherType: ");//$NON-NLS-1$ - result.append(dispatcherType); - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - * An optional servlet that is mapped by a filter mapping. servletName is used to resolve the servlet reference. - */ - public Servlet getServletGen() { - if (servlet != null && servlet.eIsProxy()) { - Servlet oldServlet = servlet; - servlet = (Servlet)eResolveProxy((InternalEObject)servlet); - if (servlet != oldServlet) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.FILTER_MAPPING__SERVLET, oldServlet, servlet)); - } - } - return servlet; - } - - /** - * - * - * @generated - */ - public Servlet basicGetServlet() { - return servlet; - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FormLoginConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FormLoginConfigImpl.java deleted file mode 100644 index 1fd10b362..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/FormLoginConfigImpl.java +++ /dev/null @@ -1,291 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The form-login-config element specifies the login and error pages that should be used in form based login. If form based authentication is not used, these elements are ignored. - */ -public class FormLoginConfigImpl extends EObjectImpl implements FormLoginConfig, EObject { - - /** - * The default value of the '{@link #getFormLoginPage() Form Login Page}' attribute. - * - * - * @see #getFormLoginPage() - * @generated - * @ordered - */ - protected static final String FORM_LOGIN_PAGE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String formLoginPage = FORM_LOGIN_PAGE_EDEFAULT; - /** - * The default value of the '{@link #getFormErrorPage() Form Error Page}' attribute. - * - * - * @see #getFormErrorPage() - * @generated - * @ordered - */ - protected static final String FORM_ERROR_PAGE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String formErrorPage = FORM_ERROR_PAGE_EDEFAULT; - public FormLoginConfigImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getFormLoginConfig(); - } - - /** - * @generated This field/method will be replaced during code generation - * The form-login-page element defines the location in the web app where the page - * that can be used for login can be found - */ - public String getFormLoginPage() { - return formLoginPage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFormLoginPage(String newFormLoginPage) { - String oldFormLoginPage = formLoginPage; - formLoginPage = newFormLoginPage; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE, oldFormLoginPage, formLoginPage)); - } - - /** - * @generated This field/method will be replaced during code generation - * The form-error-page element defines the location in the web app where the error - * page that is displayed when login is not successful can be found - */ - public String getFormErrorPage() { - return formErrorPage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFormErrorPage(String newFormErrorPage) { - String oldFormErrorPage = formErrorPage; - formErrorPage = newFormErrorPage; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE, oldFormErrorPage, formErrorPage)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public LoginConfig getLoginConfig() { - if (eContainerFeatureID != WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG) return null; - return (LoginConfig)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLoginConfig(LoginConfig newLoginConfig) { - if (newLoginConfig != eContainer || (eContainerFeatureID != WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG && newLoginConfig != null)) { - if (EcoreUtil.isAncestor(this, newLoginConfig)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newLoginConfig != null) - msgs = ((InternalEObject)newLoginConfig).eInverseAdd(this, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, LoginConfig.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newLoginConfig, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, newLoginConfig, newLoginConfig)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - return eBasicSetContainer(null, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - return eContainer.eInverseRemove(this, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, LoginConfig.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: - return getFormLoginPage(); - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: - return getFormErrorPage(); - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - return getLoginConfig(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: - return FORM_LOGIN_PAGE_EDEFAULT == null ? formLoginPage != null : !FORM_LOGIN_PAGE_EDEFAULT.equals(formLoginPage); - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: - return FORM_ERROR_PAGE_EDEFAULT == null ? formErrorPage != null : !FORM_ERROR_PAGE_EDEFAULT.equals(formErrorPage); - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - return getLoginConfig() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: - setFormLoginPage((String)newValue); - return; - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: - setFormErrorPage((String)newValue); - return; - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - setLoginConfig((LoginConfig)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE: - setFormLoginPage(FORM_LOGIN_PAGE_EDEFAULT); - return; - case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE: - setFormErrorPage(FORM_ERROR_PAGE_EDEFAULT); - return; - case WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG: - setLoginConfig((LoginConfig)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (formLoginPage: ");//$NON-NLS-1$ - result.append(formLoginPage); - result.append(", formErrorPage: ");//$NON-NLS-1$ - result.append(formErrorPage); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/HTTPMethodTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/HTTPMethodTypeImpl.java deleted file mode 100644 index 18f31e8fc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/HTTPMethodTypeImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * - * An implementation of the model object 'HTTP Method Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.HTTPMethodTypeImpl#getHttpMethod Http Method}
  • - *
- *

- * - * @generated - */ -public class HTTPMethodTypeImpl extends EObjectImpl implements HTTPMethodType { - /** - * The default value of the '{@link #getHttpMethod() Http Method}' attribute. - * - * - * @see #getHttpMethod() - * @generated - * @ordered - */ - protected static final String HTTP_METHOD_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHttpMethod() Http Method}' attribute. - * - * - * @see #getHttpMethod() - * @generated - * @ordered - */ - protected String httpMethod = HTTP_METHOD_EDEFAULT; - - /** - * - * - * @generated - */ - protected HTTPMethodTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getHTTPMethodType(); - } - - /** - * - * - * @generated - */ - public String getHttpMethod() { - return httpMethod; - } - - /** - * - * - * @generated - */ - public void setHttpMethod(String newHttpMethod) { - String oldHttpMethod = httpMethod; - httpMethod = newHttpMethod; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD, oldHttpMethod, httpMethod)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: - return getHttpMethod(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: - setHttpMethod((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: - setHttpMethod(HTTP_METHOD_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD: - return HTTP_METHOD_EDEFAULT == null ? httpMethod != null : !HTTP_METHOD_EDEFAULT.equals(httpMethod); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (httpMethod: ");//$NON-NLS-1$ - result.append(httpMethod); - result.append(')'); - return result.toString(); - } - -} //HTTPMethodTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/InitParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/InitParamImpl.java deleted file mode 100644 index e29d9160a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/InitParamImpl.java +++ /dev/null @@ -1,237 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The init-param element contains a name//value pair as an initialization param of the servlet - */ -public class InitParamImpl extends EObjectImpl implements InitParam, EObject { - - /** - * The default value of the '{@link #getParamName() Param Name}' attribute. - * - * - * @see #getParamName() - * @generated - * @ordered - */ - protected static final String PARAM_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String paramName = PARAM_NAME_EDEFAULT; - /** - * The default value of the '{@link #getParamValue() Param Value}' attribute. - * - * - * @see #getParamValue() - * @generated - * @ordered - */ - protected static final String PARAM_VALUE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String paramValue = PARAM_VALUE_EDEFAULT; - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - public InitParamImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getInitParam(); - } - - /** - * @generated This field/method will be replaced during code generation - * - * - - */ - public String getParamName() { - return paramName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setParamName(String newParamName) { - String oldParamName = paramName; - paramName = newParamName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__PARAM_NAME, oldParamName, paramName)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getParamValue() { - return paramValue; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setParamValue(String newParamValue) { - String oldParamValue = paramValue; - paramValue = newParamValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.INIT_PARAM__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.INIT_PARAM__PARAM_NAME: - return getParamName(); - case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: - return getParamValue(); - case WebapplicationPackage.INIT_PARAM__DESCRIPTION: - return getDescription(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.INIT_PARAM__PARAM_NAME: - return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); - case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: - return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); - case WebapplicationPackage.INIT_PARAM__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.INIT_PARAM__PARAM_NAME: - setParamName((String)newValue); - return; - case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: - setParamValue((String)newValue); - return; - case WebapplicationPackage.INIT_PARAM__DESCRIPTION: - setDescription((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.INIT_PARAM__PARAM_NAME: - setParamName(PARAM_NAME_EDEFAULT); - return; - case WebapplicationPackage.INIT_PARAM__PARAM_VALUE: - setParamValue(PARAM_VALUE_EDEFAULT); - return; - case WebapplicationPackage.INIT_PARAM__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (paramName: ");//$NON-NLS-1$ - result.append(paramName); - result.append(", paramValue: ");//$NON-NLS-1$ - result.append(paramValue); - result.append(", description: ");//$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/JSPTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/JSPTypeImpl.java deleted file mode 100644 index f23c5ece9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/JSPTypeImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * @generated - */ -public class JSPTypeImpl extends WebTypeImpl implements JSPType { - - /** - * The default value of the '{@link #getJspFile() Jsp File}' attribute. - * - * - * @see #getJspFile() - * @generated - * @ordered - */ - protected static final String JSP_FILE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String jspFile = JSP_FILE_EDEFAULT; - public JSPTypeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getJSPType(); - } - -public boolean isJspType() { - return true; -} - /** - * @generated This field/method will be replaced during code generation - * The jsp-file element contains the full path to a JSP file within the web - * application. - - */ - public String getJspFile() { - return jspFile; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setJspFile(String newJspFile) { - String oldJspFile = jspFile; - jspFile = newJspFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.JSP_TYPE__JSP_FILE, oldJspFile, jspFile)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.JSP_TYPE__JSP_FILE: - return getJspFile(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.JSP_TYPE__JSP_FILE: - return JSP_FILE_EDEFAULT == null ? jspFile != null : !JSP_FILE_EDEFAULT.equals(jspFile); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.JSP_TYPE__JSP_FILE: - setJspFile((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.JSP_TYPE__JSP_FILE: - setJspFile(JSP_FILE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (jspFile: ");//$NON-NLS-1$ - result.append(jspFile); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingImpl.java deleted file mode 100644 index be53a1e8d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * - * An implementation of the model object 'Local Encoding Mapping'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingImpl#getLocale Locale}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingImpl#getEncoding Encoding}
  • - *
- *

- * - * @generated - */ -public class LocalEncodingMappingImpl extends EObjectImpl implements LocalEncodingMapping { - /** - * The default value of the '{@link #getLocale() Locale}' attribute. - * - * - * @see #getLocale() - * @generated - * @ordered - */ - protected static final String LOCALE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocale() Locale}' attribute. - * - * - * @see #getLocale() - * @generated - * @ordered - */ - protected String locale = LOCALE_EDEFAULT; - - /** - * The default value of the '{@link #getEncoding() Encoding}' attribute. - * - * - * @see #getEncoding() - * @generated - * @ordered - */ - protected static final String ENCODING_EDEFAULT = null; - - /** - * The cached value of the '{@link #getEncoding() Encoding}' attribute. - * - * - * @see #getEncoding() - * @generated - * @ordered - */ - protected String encoding = ENCODING_EDEFAULT; - - /** - * - * - * @generated - */ - protected LocalEncodingMappingImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getLocalEncodingMapping(); - } - - /** - * - * - * @generated - */ - public String getLocale() { - return locale; - } - - /** - * - * - * @generated - */ - public void setLocale(String newLocale) { - String oldLocale = locale; - locale = newLocale; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE, oldLocale, locale)); - } - - /** - * - * - * @generated - */ - public String getEncoding() { - return encoding; - } - - /** - * - * - * @generated - */ - public void setEncoding(String newEncoding) { - String oldEncoding = encoding; - encoding = newEncoding; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING, oldEncoding, encoding)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: - return getLocale(); - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: - return getEncoding(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: - setLocale((String)newValue); - return; - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: - setEncoding((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: - setLocale(LOCALE_EDEFAULT); - return; - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: - setEncoding(ENCODING_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE: - return LOCALE_EDEFAULT == null ? locale != null : !LOCALE_EDEFAULT.equals(locale); - case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING: - return ENCODING_EDEFAULT == null ? encoding != null : !ENCODING_EDEFAULT.equals(encoding); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (locale: ");//$NON-NLS-1$ - result.append(locale); - result.append(", encoding: ");//$NON-NLS-1$ - result.append(encoding); - result.append(')'); - return result.toString(); - } - -} //LocalEncodingMappingImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingListImpl.java deleted file mode 100644 index 21bfea22d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LocalEncodingMappingListImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * - * An implementation of the model object 'Local Encoding Mapping List'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webapplication.impl.LocalEncodingMappingListImpl#getLocalEncodingMappings Local Encoding Mappings}
  • - *
- *

- * - * @generated - */ -public class LocalEncodingMappingListImpl extends EObjectImpl implements LocalEncodingMappingList { - /** - * The cached value of the '{@link #getLocalEncodingMappings() Local Encoding Mappings}' containment reference list. - * - * - * @see #getLocalEncodingMappings() - * @generated - * @ordered - */ - protected EList localEncodingMappings = null; - - /** - * - * - * @generated - */ - protected LocalEncodingMappingListImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getLocalEncodingMappingList(); - } - - /** - * - * - * @generated - */ - public EList getLocalEncodingMappings() { - if (localEncodingMappings == null) { - localEncodingMappings = new EObjectContainmentEList(LocalEncodingMapping.class, this, WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS); - } - return localEncodingMappings; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: - return ((InternalEList)getLocalEncodingMappings()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: - return getLocalEncodingMappings(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: - getLocalEncodingMappings().clear(); - getLocalEncodingMappings().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: - getLocalEncodingMappings().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS: - return localEncodingMappings != null && !localEncodingMappings.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //LocalEncodingMappingListImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LoginConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LoginConfigImpl.java deleted file mode 100644 index fa646e16c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/LoginConfigImpl.java +++ /dev/null @@ -1,445 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The login-config element is used to configure the authentication method that should be used, the realm name that should be used for this application, and the attributes that are needed by the form login - * mechanism. - */ -public class LoginConfigImpl extends EObjectImpl implements LoginConfig, EObject { - - /** - * The default value of the '{@link #getAuthMethod() Auth Method}' attribute. - * - * - * @see #getAuthMethod() - * @generated - * @ordered - */ - protected static final AuthMethodKind AUTH_METHOD_EDEFAULT = AuthMethodKind.UNSPECIFIED_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected AuthMethodKind authMethod = AUTH_METHOD_EDEFAULT; - /** - * This is true if the Auth Method attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean authMethodESet = false; - - /** - * The default value of the '{@link #getRealmName() Realm Name}' attribute. - * - * - * @see #getRealmName() - * @generated - * @ordered - */ - protected static final String REALM_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String realmName = REALM_NAME_EDEFAULT; - /** - * The default value of the '{@link #getAuthorizationMethod() Authorization Method}' attribute. - * - * - * @see #getAuthorizationMethod() - * @generated - * @ordered - */ - protected static final String AUTHORIZATION_METHOD_EDEFAULT = null; - - /** - * The cached value of the '{@link #getAuthorizationMethod() Authorization Method}' attribute. - * - * - * @see #getAuthorizationMethod() - * @generated - * @ordered - */ - protected String authorizationMethod = AUTHORIZATION_METHOD_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected FormLoginConfig formLoginConfig = null; - public LoginConfigImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getLoginConfig(); - } - - /** - * @generated This field/method will be replaced during code generation - * The auth-method element is used to configure the authentication mechanism for - * the web application. As a prerequisite to gaining access to any web resources - * which are protected by an authorization constraint, a user must have - * authenticated using the configured mechanism. Legal values for this element are - * "BASIC", "DIGEST", "FORM", or "CLIENT-CERT". - */ - public AuthMethodKind getAuthMethod() { - return authMethod; - } - - /** - * - * - * @generated - */ - public void setAuthMethod(AuthMethodKind newAuthMethod) { - AuthMethodKind oldAuthMethod = authMethod; - authMethod = newAuthMethod == null ? AUTH_METHOD_EDEFAULT : newAuthMethod; - boolean oldAuthMethodESet = authMethodESet; - authMethodESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD, oldAuthMethod, authMethod, !oldAuthMethodESet)); - } - - /** - * - * - * @generated - */ - public void unsetAuthMethod() { - AuthMethodKind oldAuthMethod = authMethod; - boolean oldAuthMethodESet = authMethodESet; - authMethod = AUTH_METHOD_EDEFAULT; - authMethodESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD, oldAuthMethod, AUTH_METHOD_EDEFAULT, oldAuthMethodESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetAuthMethod() { - return authMethodESet; - } - - /** - * @generated This field/method will be replaced during code generation - * The realm name element specifies the realm name to use in HTTP Basic - * authorization - */ - public String getRealmName() { - return realmName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRealmName(String newRealmName) { - String oldRealmName = realmName; - realmName = newRealmName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__REALM_NAME, oldRealmName, realmName)); - } - - /** - * - * - * @generated - */ - public String getAuthorizationMethod() { - return authorizationMethod; - } - - /** - * - * - * @generated - */ - public void setAuthorizationMethod(String newAuthorizationMethod) { - String oldAuthorizationMethod = authorizationMethod; - authorizationMethod = newAuthorizationMethod; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD, oldAuthorizationMethod, authorizationMethod)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.LOGIN_CONFIG__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.LOGIN_CONFIG__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, newWebApp, newWebApp)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public FormLoginConfig getFormLoginConfig() { - return formLoginConfig; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetFormLoginConfig(FormLoginConfig newFormLoginConfig, NotificationChain msgs) { - FormLoginConfig oldFormLoginConfig = formLoginConfig; - formLoginConfig = newFormLoginConfig; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, oldFormLoginConfig, newFormLoginConfig); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFormLoginConfig(FormLoginConfig newFormLoginConfig) { - if (newFormLoginConfig != formLoginConfig) { - NotificationChain msgs = null; - if (formLoginConfig != null) - msgs = ((InternalEObject)formLoginConfig).eInverseRemove(this, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, FormLoginConfig.class, msgs); - if (newFormLoginConfig != null) - msgs = ((InternalEObject)newFormLoginConfig).eInverseAdd(this, WebapplicationPackage.FORM_LOGIN_CONFIG__LOGIN_CONFIG, FormLoginConfig.class, msgs); - msgs = basicSetFormLoginConfig(newFormLoginConfig, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, newFormLoginConfig, newFormLoginConfig)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - if (formLoginConfig != null) - msgs = ((InternalEObject)formLoginConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG, null, msgs); - return basicSetFormLoginConfig((FormLoginConfig)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, msgs); - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - return basicSetFormLoginConfig(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: - return getAuthMethod(); - case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: - return getRealmName(); - case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: - return getAuthorizationMethod(); - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - return getWebApp(); - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - return getFormLoginConfig(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: - return isSetAuthMethod(); - case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: - return REALM_NAME_EDEFAULT == null ? realmName != null : !REALM_NAME_EDEFAULT.equals(realmName); - case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: - return AUTHORIZATION_METHOD_EDEFAULT == null ? authorizationMethod != null : !AUTHORIZATION_METHOD_EDEFAULT.equals(authorizationMethod); - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - return formLoginConfig != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: - setAuthMethod((AuthMethodKind)newValue); - return; - case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: - setRealmName((String)newValue); - return; - case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: - setAuthorizationMethod((String)newValue); - return; - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - setFormLoginConfig((FormLoginConfig)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD: - unsetAuthMethod(); - return; - case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME: - setRealmName(REALM_NAME_EDEFAULT); - return; - case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD: - setAuthorizationMethod(AUTHORIZATION_METHOD_EDEFAULT); - return; - case WebapplicationPackage.LOGIN_CONFIG__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG: - setFormLoginConfig((FormLoginConfig)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (authMethod: ");//$NON-NLS-1$ - if (authMethodESet) result.append(authMethod); else result.append("");//$NON-NLS-1$ - result.append(", realmName: ");//$NON-NLS-1$ - result.append(realmName); - result.append(", authorizationMethod: ");//$NON-NLS-1$ - result.append(authorizationMethod); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/MimeMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/MimeMappingImpl.java deleted file mode 100644 index c73b865a6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/MimeMappingImpl.java +++ /dev/null @@ -1,290 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The mime-mapping element defines a mapping between an extension and a mime type. - - */ -public class MimeMappingImpl extends EObjectImpl implements MimeMapping, EObject { - - /** - * The default value of the '{@link #getExtension() Extension}' attribute. - * - * - * @see #getExtension() - * @generated - * @ordered - */ - protected static final String EXTENSION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String extension = EXTENSION_EDEFAULT; - /** - * The default value of the '{@link #getMimeType() Mime Type}' attribute. - * - * - * @see #getMimeType() - * @generated - * @ordered - */ - protected static final String MIME_TYPE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String mimeType = MIME_TYPE_EDEFAULT; - public MimeMappingImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getMimeMapping(); - } - - /** - * @generated This field/method will be replaced during code generation - * The extension element contains a string describing an extension. example: "txt" - */ - public String getExtension() { - return extension; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setExtension(String newExtension) { - String oldExtension = extension; - extension = newExtension; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__EXTENSION, oldExtension, extension)); - } - - /** - * @generated This field/method will be replaced during code generation - * The mime-type element contains a defined mime type. example: "text//plain" - */ - public String getMimeType() { - return mimeType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setMimeType(String newMimeType) { - String oldMimeType = mimeType; - mimeType = newMimeType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__MIME_TYPE, oldMimeType, mimeType)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.MIME_MAPPING__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.MIME_MAPPING__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.MIME_MAPPING__WEB_APP, newWebApp, newWebApp)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.MIME_MAPPING__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.MIME_MAPPING__EXTENSION: - return getExtension(); - case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: - return getMimeType(); - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - return getWebApp(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.MIME_MAPPING__EXTENSION: - return EXTENSION_EDEFAULT == null ? extension != null : !EXTENSION_EDEFAULT.equals(extension); - case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: - return MIME_TYPE_EDEFAULT == null ? mimeType != null : !MIME_TYPE_EDEFAULT.equals(mimeType); - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - return getWebApp() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.MIME_MAPPING__EXTENSION: - setExtension((String)newValue); - return; - case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: - setMimeType((String)newValue); - return; - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - setWebApp((WebApp)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.MIME_MAPPING__EXTENSION: - setExtension(EXTENSION_EDEFAULT); - return; - case WebapplicationPackage.MIME_MAPPING__MIME_TYPE: - setMimeType(MIME_TYPE_EDEFAULT); - return; - case WebapplicationPackage.MIME_MAPPING__WEB_APP: - setWebApp((WebApp)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (extension: ");//$NON-NLS-1$ - result.append(extension); - result.append(", mimeType: ");//$NON-NLS-1$ - result.append(mimeType); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/RoleNameTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/RoleNameTypeImpl.java deleted file mode 100644 index c343346c6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/RoleNameTypeImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webapplication.RoleNameType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * @generated - */ -public class RoleNameTypeImpl extends EObjectImpl implements RoleNameType { - - /** - * The default value of the '{@link #getRoleName() Role Name}' attribute. - * - * - * @see #getRoleName() - * @generated - * @ordered - */ - protected static final String ROLE_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String roleName = ROLE_NAME_EDEFAULT; - public RoleNameTypeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getRoleNameType(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getRoleName() { - return roleName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRoleName(String newRoleName) { - String oldRoleName = roleName; - roleName = newRoleName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME, oldRoleName, roleName)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: - return getRoleName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: - return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: - setRoleName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME: - setRoleName(ROLE_NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (roleName: ");//$NON-NLS-1$ - result.append(roleName); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SecurityConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SecurityConstraintImpl.java deleted file mode 100644 index 693177469..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SecurityConstraintImpl.java +++ /dev/null @@ -1,449 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * The security-constraint element is used to associate security constraints with one or more web resource collections - */ -public class SecurityConstraintImpl extends EObjectImpl implements SecurityConstraint, EObject { - - /** - * The default value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected static final String DISPLAY_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected String displayName = DISPLAY_NAME_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList webResourceCollections = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected AuthConstraint authConstraint = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected UserDataConstraint userDataConstraint = null; - /** - * The cached value of the '{@link #getDisplayNames() Display Names}' containment reference list. - * - * - * @see #getDisplayNames() - * @generated - * @ordered - */ - protected EList displayNames = null; - - public SecurityConstraintImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getSecurityConstraint(); - } - - /** - * - * - * @generated - */ - public String getDisplayName() { - return displayName; - } - - /** - * - * - * @generated - */ - public void setDisplayName(String newDisplayName) { - String oldDisplayName = displayName; - displayName = newDisplayName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME, oldDisplayName, displayName)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, newWebApp, newWebApp)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getWebResourceCollections() { - if (webResourceCollections == null) { - webResourceCollections = new EObjectContainmentWithInverseEList(WebResourceCollection.class, this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT); - } - return webResourceCollections; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public AuthConstraint getAuthConstraint() { - return authConstraint; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetAuthConstraint(AuthConstraint newAuthConstraint, NotificationChain msgs) { - AuthConstraint oldAuthConstraint = authConstraint; - authConstraint = newAuthConstraint; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, oldAuthConstraint, newAuthConstraint); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAuthConstraint(AuthConstraint newAuthConstraint) { - if (newAuthConstraint != authConstraint) { - NotificationChain msgs = null; - if (authConstraint != null) - msgs = ((InternalEObject)authConstraint).eInverseRemove(this, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, AuthConstraint.class, msgs); - if (newAuthConstraint != null) - msgs = ((InternalEObject)newAuthConstraint).eInverseAdd(this, WebapplicationPackage.AUTH_CONSTRAINT__SEC_CONSTRAINT, AuthConstraint.class, msgs); - msgs = basicSetAuthConstraint(newAuthConstraint, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, newAuthConstraint, newAuthConstraint)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public UserDataConstraint getUserDataConstraint() { - return userDataConstraint; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetUserDataConstraint(UserDataConstraint newUserDataConstraint, NotificationChain msgs) { - UserDataConstraint oldUserDataConstraint = userDataConstraint; - userDataConstraint = newUserDataConstraint; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, oldUserDataConstraint, newUserDataConstraint); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUserDataConstraint(UserDataConstraint newUserDataConstraint) { - if (newUserDataConstraint != userDataConstraint) { - NotificationChain msgs = null; - if (userDataConstraint != null) - msgs = ((InternalEObject)userDataConstraint).eInverseRemove(this, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, UserDataConstraint.class, msgs); - if (newUserDataConstraint != null) - msgs = ((InternalEObject)newUserDataConstraint).eInverseAdd(this, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, UserDataConstraint.class, msgs); - msgs = basicSetUserDataConstraint(newUserDataConstraint, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, newUserDataConstraint, newUserDataConstraint)); - } - - /** - * - * - * @generated - */ - public EList getDisplayNames() { - if (displayNames == null) { - displayNames = new EObjectContainmentEList(DisplayName.class, this, WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES); - } - return displayNames; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - return ((InternalEList)getWebResourceCollections()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - if (authConstraint != null) - msgs = ((InternalEObject)authConstraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT, null, msgs); - return basicSetAuthConstraint((AuthConstraint)otherEnd, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - if (userDataConstraint != null) - msgs = ((InternalEObject)userDataConstraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, null, msgs); - return basicSetUserDataConstraint((UserDataConstraint)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - return ((InternalEList)getWebResourceCollections()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - return basicSetAuthConstraint(null, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - return basicSetUserDataConstraint(null, msgs); - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: - return getDisplayName(); - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - return getWebApp(); - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - return getWebResourceCollections(); - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - return getAuthConstraint(); - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - return getUserDataConstraint(); - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: - return getDisplayNames(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - return webResourceCollections != null && !webResourceCollections.isEmpty(); - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - return authConstraint != null; - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - return userDataConstraint != null; - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (displayName: ");//$NON-NLS-1$ - result.append(displayName); - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - getWebResourceCollections().clear(); - getWebResourceCollections().addAll((Collection)newValue); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - setAuthConstraint((AuthConstraint)newValue); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - setUserDataConstraint((UserDataConstraint)newValue); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS: - getWebResourceCollections().clear(); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT: - setAuthConstraint((AuthConstraint)null); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT: - setUserDataConstraint((UserDataConstraint)null); - return; - case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - } - eDynamicUnset(eFeature); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletImpl.java deleted file mode 100644 index 50601e54b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletImpl.java +++ /dev/null @@ -1,699 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; -import java.util.Vector; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * The servlet element contains the declarative data of a servlet. If a jsp-file is specified and the load-on-startup element is present, then the JSP should be precompiled and loaded. - */ -public class ServletImpl extends CompatibilityDescriptionGroupImpl implements Servlet { - - /** - * The default value of the '{@link #getServletName() Servlet Name}' attribute. - * - * - * @see #getServletName() - * @generated - * @ordered - */ - protected static final String SERVLET_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String servletName = SERVLET_NAME_EDEFAULT; - /** - * The default value of the '{@link #getLoadOnStartup() Load On Startup}' attribute. - * - * - * @see #getLoadOnStartup() - * @generated - * @ordered - */ - protected static final Integer LOAD_ON_STARTUP_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected Integer loadOnStartup = LOAD_ON_STARTUP_EDEFAULT; - /** - * This is true if the Load On Startup attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean loadOnStartupESet = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected WebType webType = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList params = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityRoleRefs = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected RunAsSpecifiedIdentity runAs = null; - /** - * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. - * - * - * @see #getInitParams() - * @generated - * @ordered - */ - protected EList initParams = null; - - public ServletImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getServlet(); - } - -/** - * Returns an unmodifiable list of the mappings that this - * servlet participates in. Since servletMappings is not - * a bi-directional attribute, if you want to add or delete a - * mapping, this must be done in the web-app. - * @return java.util.List - */ -public List getMappings() { - WebApp webApp = (WebApp) eContainer(); - if (webApp == null) return new BasicEList(0); - - EList allMappings = webApp.getServletMappings(); - Iterator i = allMappings.iterator(); - List mappings = new Vector(); - while (i.hasNext()) { - ServletMapping mapping = (ServletMapping) i.next(); - if (mapping.getServlet() == this) - mappings.add(mapping); - } - return mappings; -} -/** - * getParamsAsProperties method comment. - */ -public Properties getParamsAsProperties() { - Properties props = new Properties(); - List lparams = getParams(); - InitParam param; - for (int i = 0; i < lparams.size(); i++) { - param = (InitParam) lparams.get(i); - props.setProperty(param.getParamName(), param.getParamValue()); - } - return props; -} -/** - * @see Servlet - */ -public void reSyncSecurityRoleRef(java.lang.String existingRoleName, java.lang.String newRoleName) { - List roleRefs = getSecurityRoleRefs(); - for (int i = 0; i < roleRefs.size(); i++) { - SecurityRoleRef roleRef = (SecurityRoleRef) roleRefs.get(i); - if (roleRef.getLink() != null && roleRef.getLink().equals(existingRoleName)) - roleRef.setLink(newRoleName); - } -} - /** - * @generated This field/method will be replaced during code generation - * The servlet-name element contains the canonical name of the servlet. - */ - public String getServletName() { - return servletName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setServletName(String newServletName) { - String oldServletName = servletName; - servletName = newServletName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__SERVLET_NAME, oldServletName, servletName)); - } - - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * @generated This field/method will be replaced during code generation - * The load-on-startup element indicates that this servlet should be loaded on the startup of the web application. The optional contents of these element must be a positive integer indicating the order in which the servlet should be loaded. Lower integers are loaded before higher integers. If no value is specified, or if the value specified is not a positive integer, the container is free to load it at any time in the startup sequence. - - */ - public Integer getLoadOnStartup() { - return loadOnStartup; - } - - /** - * - * - * @generated - */ - public void setLoadOnStartup(Integer newLoadOnStartup) { - Integer oldLoadOnStartup = loadOnStartup; - loadOnStartup = newLoadOnStartup; - boolean oldLoadOnStartupESet = loadOnStartupESet; - loadOnStartupESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__LOAD_ON_STARTUP, oldLoadOnStartup, loadOnStartup, !oldLoadOnStartupESet)); - } - - /** - * - * - * @generated - */ - public void unsetLoadOnStartup() { - Integer oldLoadOnStartup = loadOnStartup; - boolean oldLoadOnStartupESet = loadOnStartupESet; - loadOnStartup = LOAD_ON_STARTUP_EDEFAULT; - loadOnStartupESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.SERVLET__LOAD_ON_STARTUP, oldLoadOnStartup, LOAD_ON_STARTUP_EDEFAULT, oldLoadOnStartupESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetLoadOnStartup() { - return loadOnStartupESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.SERVLET__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SERVLET__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SERVLETS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SERVLET__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_APP, newWebApp, newWebApp)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebType getWebType() { - return webType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetWebType(WebType newWebType, NotificationChain msgs) { - WebType oldWebType = webType; - webType = newWebType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_TYPE, oldWebType, newWebType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebType(WebType newWebType) { - if (newWebType != webType) { - NotificationChain msgs = null; - if (webType != null) - msgs = ((InternalEObject)webType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__WEB_TYPE, null, msgs); - if (newWebType != null) - msgs = ((InternalEObject)newWebType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__WEB_TYPE, null, msgs); - msgs = basicSetWebType(newWebType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__WEB_TYPE, newWebType, newWebType)); - } - - /** - * - * getParams() is used for J2EE1.4 - * - * @generated This field/method will be replaced during code generation - */ - public EList getParams() { - if (params == null) { - params = new EObjectContainmentEList(InitParam.class, this, WebapplicationPackage.SERVLET__PARAMS); - } - return params; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getSecurityRoleRefs() { - if (securityRoleRefs == null) { - securityRoleRefs = new EObjectContainmentEList(SecurityRoleRef.class, this, WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS); - } - return securityRoleRefs; - } - - /** - * @generated This field/method will be replaced during code generation - * If defined for a servlet, overrides the security identity used to call an EJB by that servlet in this web application. The role-name is one of the security roles already defined for this web application. - */ - public RunAsSpecifiedIdentity getRunAs() { - return runAs; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetRunAs(RunAsSpecifiedIdentity newRunAs, NotificationChain msgs) { - RunAsSpecifiedIdentity oldRunAs = runAs; - runAs = newRunAs; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__RUN_AS, oldRunAs, newRunAs); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRunAs(RunAsSpecifiedIdentity newRunAs) { - if (newRunAs != runAs) { - NotificationChain msgs = null; - if (runAs != null) - msgs = ((InternalEObject)runAs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__RUN_AS, null, msgs); - if (newRunAs != null) - msgs = ((InternalEObject)newRunAs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.SERVLET__RUN_AS, null, msgs); - msgs = basicSetRunAs(newRunAs, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET__RUN_AS, newRunAs, newRunAs)); - } - - /** - * - * getInitParams() is used for J2EE1.3 - * - * @generated - */ - public EList getInitParams() { - if (initParams == null) { - initParams = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.SERVLET__INIT_PARAMS); - } - return initParams; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SERVLET__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.SERVLET__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SERVLET__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SERVLET__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SERVLET__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SERVLET__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.SERVLET__WEB_APP, msgs); - case WebapplicationPackage.SERVLET__WEB_TYPE: - return basicSetWebType(null, msgs); - case WebapplicationPackage.SERVLET__PARAMS: - return ((InternalEList)getParams()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: - return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.SERVLET__RUN_AS: - return basicSetRunAs(null, msgs); - case WebapplicationPackage.SERVLET__INIT_PARAMS: - return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.SERVLET__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SERVLETS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET__ICONS: - return getIcons(); - case WebapplicationPackage.SERVLET__DISPLAY_NAMES: - return getDisplayNames(); - case WebapplicationPackage.SERVLET__DESCRIPTIONS: - return getDescriptions(); - case WebapplicationPackage.SERVLET__SMALL_ICON: - return getSmallIcon(); - case WebapplicationPackage.SERVLET__LARGE_ICON: - return getLargeIcon(); - case WebapplicationPackage.SERVLET__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.SERVLET__DISPLAY_NAME: - return getDisplayName(); - case WebapplicationPackage.SERVLET__SERVLET_NAME: - return getServletName(); - case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: - return getLoadOnStartup(); - case WebapplicationPackage.SERVLET__WEB_APP: - return getWebApp(); - case WebapplicationPackage.SERVLET__WEB_TYPE: - return getWebType(); - case WebapplicationPackage.SERVLET__PARAMS: - return getParams(); - case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: - return getSecurityRoleRefs(); - case WebapplicationPackage.SERVLET__RUN_AS: - return getRunAs(); - case WebapplicationPackage.SERVLET__INIT_PARAMS: - return getInitParams(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET__ICONS: - return icons != null && !icons.isEmpty(); - case WebapplicationPackage.SERVLET__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case WebapplicationPackage.SERVLET__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WebapplicationPackage.SERVLET__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WebapplicationPackage.SERVLET__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WebapplicationPackage.SERVLET__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.SERVLET__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WebapplicationPackage.SERVLET__SERVLET_NAME: - return SERVLET_NAME_EDEFAULT == null ? servletName != null : !SERVLET_NAME_EDEFAULT.equals(servletName); - case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: - return isSetLoadOnStartup(); - case WebapplicationPackage.SERVLET__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.SERVLET__WEB_TYPE: - return webType != null; - case WebapplicationPackage.SERVLET__PARAMS: - return params != null && !params.isEmpty(); - case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: - return securityRoleRefs != null && !securityRoleRefs.isEmpty(); - case WebapplicationPackage.SERVLET__RUN_AS: - return runAs != null; - case WebapplicationPackage.SERVLET__INIT_PARAMS: - return initParams != null && !initParams.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case WebapplicationPackage.SERVLET__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case WebapplicationPackage.SERVLET__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WebapplicationPackage.SERVLET__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WebapplicationPackage.SERVLET__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WebapplicationPackage.SERVLET__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.SERVLET__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WebapplicationPackage.SERVLET__SERVLET_NAME: - setServletName((String)newValue); - return; - case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: - setLoadOnStartup((Integer)newValue); - return; - case WebapplicationPackage.SERVLET__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.SERVLET__WEB_TYPE: - setWebType((WebType)newValue); - return; - case WebapplicationPackage.SERVLET__PARAMS: - getParams().clear(); - getParams().addAll((Collection)newValue); - return; - case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - getSecurityRoleRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.SERVLET__RUN_AS: - setRunAs((RunAsSpecifiedIdentity)newValue); - return; - case WebapplicationPackage.SERVLET__INIT_PARAMS: - getInitParams().clear(); - getInitParams().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET__ICONS: - getIcons().clear(); - return; - case WebapplicationPackage.SERVLET__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case WebapplicationPackage.SERVLET__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WebapplicationPackage.SERVLET__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WebapplicationPackage.SERVLET__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WebapplicationPackage.SERVLET__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.SERVLET__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WebapplicationPackage.SERVLET__SERVLET_NAME: - setServletName(SERVLET_NAME_EDEFAULT); - return; - case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP: - unsetLoadOnStartup(); - return; - case WebapplicationPackage.SERVLET__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.SERVLET__WEB_TYPE: - setWebType((WebType)null); - return; - case WebapplicationPackage.SERVLET__PARAMS: - getParams().clear(); - return; - case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS: - getSecurityRoleRefs().clear(); - return; - case WebapplicationPackage.SERVLET__RUN_AS: - setRunAs((RunAsSpecifiedIdentity)null); - return; - case WebapplicationPackage.SERVLET__INIT_PARAMS: - getInitParams().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (servletName: ");//$NON-NLS-1$ - result.append(servletName); - result.append(", loadOnStartup: ");//$NON-NLS-1$ - if (loadOnStartupESet) result.append(loadOnStartup); else result.append("");//$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - - /** - * return the java servlet class for this servlet - */ - public JavaClass getServletClass() { - JavaClass javaClass = null; - String javaClassName = null; - // Handle servlet case - if (getWebType().isServletType()) - javaClassName = ((ServletType)getWebType()).getClassName(); - //Handle the JSP case - else { - String relPath = ((JSPType)getWebType()).getJspFile(); - URI webAppURI = getWebApp().eResource().getURI(); - javaClassName = webAppURI.segment(1)+"/"+webAppURI.segment(2)+relPath;//$NON-NLS-1$ - } - javaClass = (JavaClass) JavaRefFactory.eINSTANCE.reflectType(javaClassName,this); - return javaClass; - } - -} - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletMappingImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletMappingImpl.java deleted file mode 100644 index d92a2a580..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletMappingImpl.java +++ /dev/null @@ -1,349 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The servlet-mapping element defines a mapping between a servlet and a url pattern - */ -public class ServletMappingImpl extends EObjectImpl implements ServletMapping, EObject { - - /** - * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. - * - * - * @see #getUrlPattern() - * @generated - * @ordered - */ - protected static final String URL_PATTERN_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String urlPattern = URL_PATTERN_EDEFAULT; - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected Servlet servlet = null; - public ServletMappingImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getServletMapping(); - } - - /** - * @generated This field/method will be replaced during code generation - * The url-pattern element contains the url pattern of the mapping. Must follow - * the rules specified in Section 10 of the Servlet API Specification. - */ - public String getUrlPattern() { - return urlPattern; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUrlPattern(String newUrlPattern) { - String oldUrlPattern = urlPattern; - urlPattern = newUrlPattern; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN, oldUrlPattern, urlPattern)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.SERVLET_MAPPING__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SERVLET_MAPPING__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, newWebApp, newWebApp)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public Servlet getServlet() { - if (servlet != null && servlet.eIsProxy()) { - Servlet oldServlet = servlet; - servlet = (Servlet)eResolveProxy((InternalEObject)servlet); - if (servlet != oldServlet) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, WebapplicationPackage.SERVLET_MAPPING__SERVLET, oldServlet, servlet)); - } - } - return servlet; - } - - /** - * - * - * @generated - */ - public Servlet basicGetServlet() { - return servlet; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setServlet(Servlet newServlet) { - Servlet oldServlet = servlet; - servlet = newServlet; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_MAPPING__SERVLET, oldServlet, servlet)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.SERVLET_MAPPING__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: - return getUrlPattern(); - case WebapplicationPackage.SERVLET_MAPPING__NAME: - return getName(); - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - return getWebApp(); - case WebapplicationPackage.SERVLET_MAPPING__SERVLET: - if (resolve) return getServlet(); - return basicGetServlet(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: - return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); - case WebapplicationPackage.SERVLET_MAPPING__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.SERVLET_MAPPING__SERVLET: - return servlet != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: - setUrlPattern((String)newValue); - return; - case WebapplicationPackage.SERVLET_MAPPING__NAME: - setName((String)newValue); - return; - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.SERVLET_MAPPING__SERVLET: - setServlet((Servlet)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN: - setUrlPattern(URL_PATTERN_EDEFAULT); - return; - case WebapplicationPackage.SERVLET_MAPPING__NAME: - setName(NAME_EDEFAULT); - return; - case WebapplicationPackage.SERVLET_MAPPING__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.SERVLET_MAPPING__SERVLET: - setServlet((Servlet)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (urlPattern: ");//$NON-NLS-1$ - result.append(urlPattern); - result.append(", name: ");//$NON-NLS-1$ - result.append(name); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletTypeImpl.java deleted file mode 100644 index 7d1d9db35..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/ServletTypeImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * @generated - */ -public class ServletTypeImpl extends WebTypeImpl implements ServletType { - - /** - * The default value of the '{@link #getClassName() Class Name}' attribute. - * - * - * @see #getClassName() - * @generated - * @ordered - */ - protected static final String CLASS_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String className = CLASS_NAME_EDEFAULT; - public ServletTypeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getServletType(); - } - -public boolean isServletType() { - return true; -} - /** - * @generated This field/method will be replaced during code generation - */ - public String getClassName() { - return className; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setClassName(String newClassName) { - String oldClassName = className; - className = newClassName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SERVLET_TYPE__CLASS_NAME, oldClassName, className)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: - return getClassName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: - return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: - setClassName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME: - setClassName(CLASS_NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (className: ");//$NON-NLS-1$ - result.append(className); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SessionConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SessionConfigImpl.java deleted file mode 100644 index 44309c084..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/SessionConfigImpl.java +++ /dev/null @@ -1,281 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The session-config element defines the session parameters for this web application. - */ -public class SessionConfigImpl extends EObjectImpl implements SessionConfig, EObject { - - /** - * The default value of the '{@link #getSessionTimeout() Session Timeout}' attribute. - * - * - * @see #getSessionTimeout() - * @generated - * @ordered - */ - protected static final int SESSION_TIMEOUT_EDEFAULT = 0; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected int sessionTimeout = SESSION_TIMEOUT_EDEFAULT; - /** - * This is true if the Session Timeout attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean sessionTimeoutESet = false; - - public SessionConfigImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getSessionConfig(); - } - - /** - * @generated This field/method will be replaced during code generation - * The session-timeout element defines the default session timeout interval for - * all sessions created in this web application. The specified timeout must be - * expressed in a whole number of minutes. - */ - public int getSessionTimeout() { - return sessionTimeout; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSessionTimeout(int newSessionTimeout) { - int oldSessionTimeout = sessionTimeout; - sessionTimeout = newSessionTimeout; - boolean oldSessionTimeoutESet = sessionTimeoutESet; - sessionTimeoutESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT, oldSessionTimeout, sessionTimeout, !oldSessionTimeoutESet)); - } - - /** - * - * - * @generated - */ - public void unsetSessionTimeout() { - int oldSessionTimeout = sessionTimeout; - boolean oldSessionTimeoutESet = sessionTimeoutESet; - sessionTimeout = SESSION_TIMEOUT_EDEFAULT; - sessionTimeoutESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT, oldSessionTimeout, SESSION_TIMEOUT_EDEFAULT, oldSessionTimeoutESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetSessionTimeout() { - return sessionTimeoutESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.SESSION_CONFIG__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.SESSION_CONFIG__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__SESSION_CONFIG, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.SESSION_CONFIG__WEB_APP, newWebApp, newWebApp)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.SESSION_CONFIG__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__SESSION_CONFIG, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: - return new Integer(getSessionTimeout()); - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - return getWebApp(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: - return isSetSessionTimeout(); - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - return getWebApp() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: - setSessionTimeout(((Integer)newValue).intValue()); - return; - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - setWebApp((WebApp)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT: - unsetSessionTimeout(); - return; - case WebapplicationPackage.SESSION_CONFIG__WEB_APP: - setWebApp((WebApp)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (sessionTimeout: ");//$NON-NLS-1$ - if (sessionTimeoutESet) result.append(sessionTimeout); else result.append("");//$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/TagLibRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/TagLibRefImpl.java deleted file mode 100644 index b1386e0a3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/TagLibRefImpl.java +++ /dev/null @@ -1,296 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * The taglib element is used to describe a JSP tag library. - */ -public class TagLibRefImpl extends EObjectImpl implements TagLibRef, EObject{ - - /** - * The default value of the '{@link #getTaglibURI() Taglib URI}' attribute. - * - * - * @see #getTaglibURI() - * @generated - * @ordered - */ - protected static final String TAGLIB_URI_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String taglibURI = TAGLIB_URI_EDEFAULT; - /** - * The default value of the '{@link #getTaglibLocation() Taglib Location}' attribute. - * - * - * @see #getTaglibLocation() - * @generated - * @ordered - */ - protected static final String TAGLIB_LOCATION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String taglibLocation = TAGLIB_LOCATION_EDEFAULT; - public TagLibRefImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getTagLibRef(); - } - - /** - * @generated This field/method will be replaced during code generation - * The taglib-uri element describes a URI, relative to the location of the web.xml - * document, identifying a Tag Library used in the Web Application. - */ - public String getTaglibURI() { - return taglibURI; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setTaglibURI(String newTaglibURI) { - String oldTaglibURI = taglibURI; - taglibURI = newTaglibURI; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI, oldTaglibURI, taglibURI)); - } - - /** - * @generated This field/method will be replaced during code generation - * The taglib-location element contains the location (as a resource relative to - * the root of the web application) where to find the Tag Libary Description file - * for the tag library. - */ - public String getTaglibLocation() { - return taglibLocation; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setTaglibLocation(String newTaglibLocation) { - String oldTaglibLocation = taglibLocation; - taglibLocation = newTaglibLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION, oldTaglibLocation, taglibLocation)); - } - - /** - * - * - * @generated - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.TAG_LIB_REF__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * - * - * @generated - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.TAG_LIB_REF__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.TAG_LIB_REF__WEB_APP, newWebApp, newWebApp)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.TAG_LIB_REF__WEB_APP, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: - return getTaglibURI(); - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: - return getTaglibLocation(); - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - return getWebApp(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: - return TAGLIB_URI_EDEFAULT == null ? taglibURI != null : !TAGLIB_URI_EDEFAULT.equals(taglibURI); - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: - return TAGLIB_LOCATION_EDEFAULT == null ? taglibLocation != null : !TAGLIB_LOCATION_EDEFAULT.equals(taglibLocation); - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - return getWebApp() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: - setTaglibURI((String)newValue); - return; - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: - setTaglibLocation((String)newValue); - return; - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - setWebApp((WebApp)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI: - setTaglibURI(TAGLIB_URI_EDEFAULT); - return; - case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION: - setTaglibLocation(TAGLIB_LOCATION_EDEFAULT); - return; - case WebapplicationPackage.TAG_LIB_REF__WEB_APP: - setWebApp((WebApp)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (taglibURI: ");//$NON-NLS-1$ - result.append(taglibURI); - result.append(", taglibLocation: ");//$NON-NLS-1$ - result.append(taglibLocation); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/URLPatternTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/URLPatternTypeImpl.java deleted file mode 100644 index 3261ef1fe..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/URLPatternTypeImpl.java +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * @generated - */ -public class URLPatternTypeImpl extends EObjectImpl implements URLPatternType { - - /** - * The default value of the '{@link #getUrlPattern() Url Pattern}' attribute. - * - * - * @see #getUrlPattern() - * @generated - * @ordered - */ - protected static final String URL_PATTERN_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String urlPattern = URL_PATTERN_EDEFAULT; - public URLPatternTypeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getURLPatternType(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getUrlPattern() { - return urlPattern; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setUrlPattern(String newUrlPattern) { - String oldUrlPattern = urlPattern; - urlPattern = newUrlPattern; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN, oldUrlPattern, urlPattern)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WebResourceCollection getResCollection() { - if (eContainerFeatureID != WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION) return null; - return (WebResourceCollection)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setResCollection(WebResourceCollection newResCollection) { - if (newResCollection != eContainer || (eContainerFeatureID != WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION && newResCollection != null)) { - if (EcoreUtil.isAncestor(this, newResCollection)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newResCollection != null) - msgs = ((InternalEObject)newResCollection).eInverseAdd(this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebResourceCollection.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newResCollection, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, newResCollection, newResCollection)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - return eBasicSetContainer(null, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebResourceCollection.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: - return getUrlPattern(); - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - return getResCollection(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: - return URL_PATTERN_EDEFAULT == null ? urlPattern != null : !URL_PATTERN_EDEFAULT.equals(urlPattern); - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - return getResCollection() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: - setUrlPattern((String)newValue); - return; - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - setResCollection((WebResourceCollection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN: - setUrlPattern(URL_PATTERN_EDEFAULT); - return; - case WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION: - setResCollection((WebResourceCollection)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (urlPattern: ");//$NON-NLS-1$ - result.append(urlPattern); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/UserDataConstraintImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/UserDataConstraintImpl.java deleted file mode 100644 index 988939d44..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/UserDataConstraintImpl.java +++ /dev/null @@ -1,376 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * The user-data-constraint element is used to indicate how data communicated between the client and container should be protected - */ -public class UserDataConstraintImpl extends EObjectImpl implements UserDataConstraint, EObject { - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The default value of the '{@link #getTransportGuarantee() Transport Guarantee}' attribute. - * - * - * @see #getTransportGuarantee() - * @generated - * @ordered - */ - protected static final TransportGuaranteeType TRANSPORT_GUARANTEE_EDEFAULT = TransportGuaranteeType.NONE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected TransportGuaranteeType transportGuarantee = TRANSPORT_GUARANTEE_EDEFAULT; - /** - * This is true if the Transport Guarantee attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean transportGuaranteeESet = false; - - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - public UserDataConstraintImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getUserDataConstraint(); - } - - /** - * @generated This field/method will be replaced during code generation - * A description for the user data constraint. - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION, oldDescription, description)); - } - - /** - * @generated This field/method will be replaced during code generation - * The transport-guarantee element specifies that the communication between client - * and server should be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the - * application does not require any - * transport guarantees. A value of INTEGRAL means that the application requires - * that the data sent between the client and server be sent in such a way that it - * can't be changed in transit. CONFIDENTIAL means that the application requires - * that the data be transmitted in a fashion that prevents other entities from - * observing the contents of the transmission. In most cases, the presence of the - * INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is required. - */ - public TransportGuaranteeType getTransportGuarantee() { - return transportGuarantee; - } - - /** - * - * - * @generated - */ - public void setTransportGuarantee(TransportGuaranteeType newTransportGuarantee) { - TransportGuaranteeType oldTransportGuarantee = transportGuarantee; - transportGuarantee = newTransportGuarantee == null ? TRANSPORT_GUARANTEE_EDEFAULT : newTransportGuarantee; - boolean oldTransportGuaranteeESet = transportGuaranteeESet; - transportGuaranteeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE, oldTransportGuarantee, transportGuarantee, !oldTransportGuaranteeESet)); - } - - /** - * - * - * @generated - */ - public void unsetTransportGuarantee() { - TransportGuaranteeType oldTransportGuarantee = transportGuarantee; - boolean oldTransportGuaranteeESet = transportGuaranteeESet; - transportGuarantee = TRANSPORT_GUARANTEE_EDEFAULT; - transportGuaranteeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE, oldTransportGuarantee, TRANSPORT_GUARANTEE_EDEFAULT, oldTransportGuaranteeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetTransportGuarantee() { - return transportGuaranteeESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public SecurityConstraint getSecConstraint() { - if (eContainerFeatureID != WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT) return null; - return (SecurityConstraint)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSecConstraint(SecurityConstraint newSecConstraint) { - if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT && newSecConstraint != null)) { - if (EcoreUtil.isAncestor(this, newSecConstraint)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newSecConstraint != null) - msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, SecurityConstraint.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - return eBasicSetContainer(null, WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT, msgs); - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT, SecurityConstraint.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: - return getTransportGuarantee(); - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - return getSecConstraint(); - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: - return getDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: - return isSetTransportGuarantee(); - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - return getSecConstraint() != null; - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: - setTransportGuarantee((TransportGuaranteeType)newValue); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)newValue); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE: - unsetTransportGuarantee(); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)null); - return; - case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS: - getDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (description: ");//$NON-NLS-1$ - result.append(description); - result.append(", transportGuarantee: ");//$NON-NLS-1$ - if (transportGuaranteeESet) result.append(transportGuarantee); else result.append("");//$NON-NLS-1$ - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppImpl.java deleted file mode 100644 index 986ce4b5d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppImpl.java +++ /dev/null @@ -1,1399 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.common.MessageDestination; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.SecurityRole; -import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.JNDIEnvRefsGroupImpl; -import org.eclipse.jst.j2ee.common.util.CommonUtil; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.jsp.JSPConfig; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - - -/** - * The web-app element is the root of the deployment descriptor for - * a web application. - */ -public class WebAppImpl extends JNDIEnvRefsGroupImpl implements WebApp { - - /** - * The default value of the '{@link #isDistributable() Distributable}' attribute. - * - * - * @see #isDistributable() - * @generated - * @ordered - */ - protected static final boolean DISTRIBUTABLE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean distributable = DISTRIBUTABLE_EDEFAULT; - /** - * This is true if the Distributable attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean distributableESet = false; - - /** - * The default value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected static final String VERSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getVersion() Version}' attribute. - * - * - * @see #getVersion() - * @generated - * @ordered - */ - protected String version = VERSION_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList contexts = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList errorPages = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected WelcomeFileList fileList = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList tagLibs = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList constraints = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected LoginConfig loginConfig = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList mimeMappings = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected SessionConfig sessionConfig = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList servletMappings = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList servlets = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList securityRoles = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList filters = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList filterMappings = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList listeners = null; - /** - * The cached value of the '{@link #getContextParams() Context Params}' containment reference list. - * - * - * @see #getContextParams() - * @generated - * @ordered - */ - protected EList contextParams = null; - - /** - * The cached value of the '{@link #getJspConfig() Jsp Config}' containment reference. - * - * - * @see #getJspConfig() - * @generated - * @ordered - */ - protected JSPConfig jspConfig = null; - - /** - * The cached value of the '{@link #getMessageDestinations() Message Destinations}' containment reference list. - * - * - * @see #getMessageDestinations() - * @generated - * @ordered - */ - protected EList messageDestinations = null; - - /** - * The cached value of the '{@link #getLocalEncodingMappingList() Local Encoding Mapping List}' containment reference. - * - * - * @see #getLocalEncodingMappingList() - * @generated - * @ordered - */ - protected LocalEncodingMappingList localEncodingMappingList = null; - - public WebAppImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getWebApp(); - } - -/** - * @see org.eclipse.jst.j2ee.internal.webapplication.WebApp - */ -public boolean containsSecurityRole(java.lang.String name) { - return getSecurityRoleNamed(name) != null; -} -public ErrorPage getErrorPageByCode(Integer code) { - List lerrorPages = getErrorPages(); - String codeString = code.toString(); - Iterator ie = lerrorPages.iterator(); - while (ie.hasNext()) { - ErrorPage ep = (ErrorPage) ie.next(); - if (ep.isErrorCode()) { - ErrorCodeErrorPage ecep = (ErrorCodeErrorPage) ep; - if (codeString.equals(ecep.getErrorCode())) - return ecep; - } - } - return null; -} -public ErrorPage getErrorPageByExceptionType(String exceptionType) { - if (exceptionType != null) { - List lerrorPages = getErrorPages(); - Iterator ie = lerrorPages.iterator(); - while (ie.hasNext()) { - ErrorPage ep = (ErrorPage) ie.next(); - if (ep.isExceptionType()) { - ExceptionTypeErrorPage etep = (ExceptionTypeErrorPage) ep; - if (exceptionType.equals(etep.getExceptionTypeName())) - return etep; - } - } - } - return null; -} -/** - * Finds a filter mapping for a specified filter. - * @param filter The filter to find the mapping for. - * @return The first filter mapping found for the specified filter, or null if no - * mapping exists for the filter. - */ -public FilterMapping getFilterMapping( - Filter aFilter) { - if (aFilter != null) { - List mappings = getFilterMappings(); - FilterMapping mapping; - for (int i = 0; i < mappings.size(); i++) { - mapping = (FilterMapping) mappings.get(i); - if (aFilter.equals(mapping.getFilter())) - return mapping; - } - } - return null; -} -/** - * getFilterNamed method comment. - */ -public Filter getFilterNamed(java.lang.String name) { - List lfilters = getFilters(); - if (lfilters == null || lfilters.size() == 0) { - return null; - } - Filter next; - for (int i = 0; i < lfilters.size(); i++) { - next = (Filter) lfilters.get(i); - if (next.getName().equals(name)) { - return next; - } - } - return null; -} -public List getFilterNames() { - List names, lfilters = getFilters(); - names = new ArrayList(lfilters.size()); - Filter next; - for (int i = 0; i < lfilters.size(); i++) { - next = (Filter) lfilters.get(i); - names.add(next.getName()); - } - return names; -} -/** - * Returns the mime type for the specified extension - * @param An extension to find the mime type for. - */ -public java.lang.String getMimeType(java.lang.String extension) { - if (extension != null) { - List mappings = getMimeMappings(); - MimeMapping mapping; - for (int i = 0; i < mappings.size(); i++) { - mapping = (MimeMapping) mappings.get(i); - if (extension.equals(mapping.getExtension())) - return mapping.getMimeType(); - } - } - return null; -} -public SecurityRole getSecurityRoleNamed(String roleName) { - java.util.List tempRoles = getSecurityRoles(); - SecurityRole role; - for (int i = 0; i < tempRoles.size(); i++) { - role = (SecurityRole) tempRoles.get(i); - if (role.getRoleName().equals(roleName)) - return role; - } - return null; -} -/** - * Finds a servlet mapping for a specified servlet. - * @param servlet The servlet to find the mappings for. - * @return The servlet mapping for the specified servlet, or null if no - * mapping exists for the servlet. - */ -public ServletMapping getServletMapping( - Servlet aServlet) { - if (aServlet != null) { - List mappings = getServletMappings(); - ServletMapping mapping; - for (int i = 0; i < mappings.size(); i++) { - mapping = (ServletMapping) mappings.get(i); - if (aServlet.equals(mapping.getServlet())) - return mapping; - } - } - return null; -} -/** - * getServletNamed method comment. - */ -public Servlet getServletNamed(java.lang.String name) { - List lservlets = getServlets(); - if (lservlets == null || lservlets.size() == 0) { - return null; - } - Servlet next; - String nextName; - for (int i = 0; i < lservlets.size(); i++) { - next = (Servlet) lservlets.get(i); - nextName = next.getServletName(); - if (nextName != null && nextName.equals(name)) { - return next; - } - } - return null; -} -public List getServletNames() { - List names, lservlets = getServlets(); - names = new ArrayList(lservlets.size()); - Servlet next; - for (int i = 0; i < lservlets.size(); i++) { - next = (Servlet) lservlets.get(i); - names.add(next.getServletName()); - } - return names; -} -/** - * Return boolean indicating if this Web App was populated from an Servlet2.2 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion2_2Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.WEBAPP_SYSTEMID_2_2); -} -/** - * Return boolean indicating if this Web App was populated from an Servlet2.3 compliant descriptor - * @return boolean - * @deprecated Use getVersionID() to determine module level - */ -public boolean isVersion2_3Descriptor() { - CommonUtil.checkDDObjectForVersion(this); - String systemId = ((XMLResource)eResource()).getSystemId(); - return systemId == null ? false : systemId.equals(J2EEConstants.WEBAPP_SYSTEMID_2_3); -} -/** - * @see org.eclipse.jst.j2ee.internal.webapplication.WebApp - */ -public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) { - SecurityRole role = getSecurityRoleNamed(existingRoleName); - if (role != null) - role.setRoleName(newRoleName); - List theServlets = getServlets(); - for (int i = 0; i < theServlets.size(); i++){ - Servlet servlet = (Servlet)theServlets.get(i); - servlet.reSyncSecurityRoleRef(existingRoleName, newRoleName); - } -} - /** - * @generated This field/method will be replaced during code generation - * The distributable element, by its presence in a web application deployment - * descriptor, indicates that this web application is programmed appropriately to - * be deployed into a distributed servlet container - */ - public boolean isDistributable() { - return distributable; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDistributable(boolean newDistributable) { - boolean oldDistributable = distributable; - distributable = newDistributable; - boolean oldDistributableESet = distributableESet; - distributableESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__DISTRIBUTABLE, oldDistributable, distributable, !oldDistributableESet)); - } - - /** - * - * - * @generated - */ - public void unsetDistributable() { - boolean oldDistributable = distributable; - boolean oldDistributableESet = distributableESet; - distributable = DISTRIBUTABLE_EDEFAULT; - distributableESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, WebapplicationPackage.WEB_APP__DISTRIBUTABLE, oldDistributable, DISTRIBUTABLE_EDEFAULT, oldDistributableESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetDistributable() { - return distributableESet; - } - - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * - * - * @generated - */ - public String getVersion() { - return version; - } - - /** - * - * - * @generated - */ - public void setVersion(String newVersion) { - String oldVersion = version; - version = newVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__VERSION, oldVersion, version)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getContexts() { - if (contexts == null) { - contexts = new EObjectContainmentWithInverseEList(ContextParam.class, this, WebapplicationPackage.WEB_APP__CONTEXTS, WebapplicationPackage.CONTEXT_PARAM__WEB_APP); - } - return contexts; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getErrorPages() { - if (errorPages == null) { - errorPages = new EObjectContainmentWithInverseEList(ErrorPage.class, this, WebapplicationPackage.WEB_APP__ERROR_PAGES, WebapplicationPackage.ERROR_PAGE__WEB_APP); - } - return errorPages; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WelcomeFileList getFileList() { - return fileList; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetFileList(WelcomeFileList newFileList, NotificationChain msgs) { - WelcomeFileList oldFileList = fileList; - fileList = newFileList; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__FILE_LIST, oldFileList, newFileList); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFileList(WelcomeFileList newFileList) { - if (newFileList != fileList) { - NotificationChain msgs = null; - if (fileList != null) - msgs = ((InternalEObject)fileList).eInverseRemove(this, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, WelcomeFileList.class, msgs); - if (newFileList != null) - msgs = ((InternalEObject)newFileList).eInverseAdd(this, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, WelcomeFileList.class, msgs); - msgs = basicSetFileList(newFileList, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__FILE_LIST, newFileList, newFileList)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getTagLibs() { - if (tagLibs == null) { - tagLibs = new EObjectContainmentWithInverseEList(TagLibRef.class, this, WebapplicationPackage.WEB_APP__TAG_LIBS, WebapplicationPackage.TAG_LIB_REF__WEB_APP); - } - return tagLibs; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getConstraints() { - if (constraints == null) { - constraints = new EObjectContainmentWithInverseEList(SecurityConstraint.class, this, WebapplicationPackage.WEB_APP__CONSTRAINTS, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_APP); - } - return constraints; - } - - /** - * This returns the module version id. Compare with J2EEVersionConstants to determine module level - */ - - public int getVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) { - // fix defect 3276, when resource is unloaded - if (version == null) - throw new IllegalStateException(); - - if (version.equals("2.4"))//$NON-NLS-1$ - return J2EEVersionConstants.WEB_2_4_ID; - if (version.equals("2.3"))//$NON-NLS-1$ - return J2EEVersionConstants.WEB_2_3_ID; - if (version.equals("2.2"))//$NON-NLS-1$ - return J2EEVersionConstants.WEB_2_2_ID; - - } - return res.getModuleVersionID(); - } - - /** - *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level - */ - public int getJ2EEVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) throw new IllegalStateException(); - return res.getJ2EEVersionID(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public LoginConfig getLoginConfig() { - return loginConfig; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetLoginConfig(LoginConfig newLoginConfig, NotificationChain msgs) { - LoginConfig oldLoginConfig = loginConfig; - loginConfig = newLoginConfig; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, oldLoginConfig, newLoginConfig); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setLoginConfig(LoginConfig newLoginConfig) { - if (newLoginConfig != loginConfig) { - NotificationChain msgs = null; - if (loginConfig != null) - msgs = ((InternalEObject)loginConfig).eInverseRemove(this, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, LoginConfig.class, msgs); - if (newLoginConfig != null) - msgs = ((InternalEObject)newLoginConfig).eInverseAdd(this, WebapplicationPackage.LOGIN_CONFIG__WEB_APP, LoginConfig.class, msgs); - msgs = basicSetLoginConfig(newLoginConfig, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOGIN_CONFIG, newLoginConfig, newLoginConfig)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getMimeMappings() { - if (mimeMappings == null) { - mimeMappings = new EObjectContainmentWithInverseEList(MimeMapping.class, this, WebapplicationPackage.WEB_APP__MIME_MAPPINGS, WebapplicationPackage.MIME_MAPPING__WEB_APP); - } - return mimeMappings; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public SessionConfig getSessionConfig() { - return sessionConfig; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSessionConfig(SessionConfig newSessionConfig, NotificationChain msgs) { - SessionConfig oldSessionConfig = sessionConfig; - sessionConfig = newSessionConfig; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__SESSION_CONFIG, oldSessionConfig, newSessionConfig); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSessionConfig(SessionConfig newSessionConfig) { - if (newSessionConfig != sessionConfig) { - NotificationChain msgs = null; - if (sessionConfig != null) - msgs = ((InternalEObject)sessionConfig).eInverseRemove(this, WebapplicationPackage.SESSION_CONFIG__WEB_APP, SessionConfig.class, msgs); - if (newSessionConfig != null) - msgs = ((InternalEObject)newSessionConfig).eInverseAdd(this, WebapplicationPackage.SESSION_CONFIG__WEB_APP, SessionConfig.class, msgs); - msgs = basicSetSessionConfig(newSessionConfig, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__SESSION_CONFIG, newSessionConfig, newSessionConfig)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getServletMappings() { - if (servletMappings == null) { - servletMappings = new EObjectContainmentWithInverseEList(ServletMapping.class, this, WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS, WebapplicationPackage.SERVLET_MAPPING__WEB_APP); - } - return servletMappings; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getServlets() { - if (servlets == null) { - servlets = new EObjectContainmentWithInverseEList(Servlet.class, this, WebapplicationPackage.WEB_APP__SERVLETS, WebapplicationPackage.SERVLET__WEB_APP); - } - return servlets; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getSecurityRoles() { - if (securityRoles == null) { - securityRoles = new EObjectContainmentEList(SecurityRole.class, this, WebapplicationPackage.WEB_APP__SECURITY_ROLES); - } - return securityRoles; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getFilters() { - if (filters == null) { - filters = new EObjectContainmentEList(Filter.class, this, WebapplicationPackage.WEB_APP__FILTERS); - } - return filters; - } - - /** - * @generated This field/method will be replaced during code generation - * Filter mappings defined for the web app - */ - public EList getFilterMappings() { - if (filterMappings == null) { - filterMappings = new EObjectContainmentEList(FilterMapping.class, this, WebapplicationPackage.WEB_APP__FILTER_MAPPINGS); - } - return filterMappings; - } - - /** - * @generated This field/method will be replaced during code generation - * The listeners collection contains deployment properties for a web application - * listener beans in the web app. - */ - public EList getListeners() { - if (listeners == null) { - listeners = new EObjectContainmentEList(Listener.class, this, WebapplicationPackage.WEB_APP__LISTENERS); - } - return listeners; - } - - /** - * - * - * @generated - */ - public EList getContextParams() { - if (contextParams == null) { - contextParams = new EObjectContainmentEList(ParamValue.class, this, WebapplicationPackage.WEB_APP__CONTEXT_PARAMS); - } - return contextParams; - } - - /** - * @deprecated: Use getEnvironmentProperties() - */ - public EList getEnvEntries() { - - return getEnvironmentProperties(); - } - - /** - * - * - * @generated - */ - public JSPConfig getJspConfig() { - return jspConfig; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetJspConfig(JSPConfig newJspConfig, NotificationChain msgs) { - JSPConfig oldJspConfig = jspConfig; - jspConfig = newJspConfig; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__JSP_CONFIG, oldJspConfig, newJspConfig); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setJspConfig(JSPConfig newJspConfig) { - if (newJspConfig != jspConfig) { - NotificationChain msgs = null; - if (jspConfig != null) - msgs = ((InternalEObject)jspConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__JSP_CONFIG, null, msgs); - if (newJspConfig != null) - msgs = ((InternalEObject)newJspConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__JSP_CONFIG, null, msgs); - msgs = basicSetJspConfig(newJspConfig, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__JSP_CONFIG, newJspConfig, newJspConfig)); - } - - /** - * - * - * @generated - */ - public EList getMessageDestinations() { - if (messageDestinations == null) { - messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS); - } - return messageDestinations; - } - - /** - * - * - * @generated - */ - public LocalEncodingMappingList getLocalEncodingMappingList() { - return localEncodingMappingList; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetLocalEncodingMappingList(LocalEncodingMappingList newLocalEncodingMappingList, NotificationChain msgs) { - LocalEncodingMappingList oldLocalEncodingMappingList = localEncodingMappingList; - localEncodingMappingList = newLocalEncodingMappingList; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, oldLocalEncodingMappingList, newLocalEncodingMappingList); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setLocalEncodingMappingList(LocalEncodingMappingList newLocalEncodingMappingList) { - if (newLocalEncodingMappingList != localEncodingMappingList) { - NotificationChain msgs = null; - if (localEncodingMappingList != null) - msgs = ((InternalEObject)localEncodingMappingList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, null, msgs); - if (newLocalEncodingMappingList != null) - msgs = ((InternalEObject)newLocalEncodingMappingList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, null, msgs); - msgs = basicSetLocalEncodingMappingList(newLocalEncodingMappingList, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST, newLocalEncodingMappingList, newLocalEncodingMappingList)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WEB_APP__CONTEXTS: - return ((InternalEList)getContexts()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - return ((InternalEList)getErrorPages()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__FILE_LIST: - if (fileList != null) - msgs = ((InternalEObject)fileList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__FILE_LIST, null, msgs); - return basicSetFileList((WelcomeFileList)otherEnd, msgs); - case WebapplicationPackage.WEB_APP__TAG_LIBS: - return ((InternalEList)getTagLibs()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - return ((InternalEList)getConstraints()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - if (loginConfig != null) - msgs = ((InternalEObject)loginConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__LOGIN_CONFIG, null, msgs); - return basicSetLoginConfig((LoginConfig)otherEnd, msgs); - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - return ((InternalEList)getMimeMappings()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - if (sessionConfig != null) - msgs = ((InternalEObject)sessionConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WebapplicationPackage.WEB_APP__SESSION_CONFIG, null, msgs); - return basicSetSessionConfig((SessionConfig)otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - return ((InternalEList)getServletMappings()).basicAdd(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SERVLETS: - return ((InternalEList)getServlets()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WEB_APP__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: - return ((InternalEList)getEnvironmentProperties()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__RESOURCE_REFS: - return ((InternalEList)getResourceRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__EJB_REFS: - return ((InternalEList)getEjbRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: - return ((InternalEList)getResourceEnvRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: - return ((InternalEList)getEjbLocalRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: - return ((InternalEList)getMessageDestinationRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__CONTEXTS: - return ((InternalEList)getContexts()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - return ((InternalEList)getErrorPages()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__FILE_LIST: - return basicSetFileList(null, msgs); - case WebapplicationPackage.WEB_APP__TAG_LIBS: - return ((InternalEList)getTagLibs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - return ((InternalEList)getConstraints()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - return basicSetLoginConfig(null, msgs); - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - return ((InternalEList)getMimeMappings()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - return basicSetSessionConfig(null, msgs); - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - return ((InternalEList)getServletMappings()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SERVLETS: - return ((InternalEList)getServlets()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__SECURITY_ROLES: - return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__FILTERS: - return ((InternalEList)getFilters()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: - return ((InternalEList)getFilterMappings()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__LISTENERS: - return ((InternalEList)getListeners()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: - return ((InternalEList)getContextParams()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__JSP_CONFIG: - return basicSetJspConfig(null, msgs); - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: - return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: - return basicSetLocalEncodingMappingList(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_APP__ICONS: - return getIcons(); - case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: - return getDisplayNames(); - case WebapplicationPackage.WEB_APP__DESCRIPTIONS: - return getDescriptions(); - case WebapplicationPackage.WEB_APP__SMALL_ICON: - return getSmallIcon(); - case WebapplicationPackage.WEB_APP__LARGE_ICON: - return getLargeIcon(); - case WebapplicationPackage.WEB_APP__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.WEB_APP__DISPLAY_NAME: - return getDisplayName(); - case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: - return getEnvironmentProperties(); - case WebapplicationPackage.WEB_APP__RESOURCE_REFS: - return getResourceRefs(); - case WebapplicationPackage.WEB_APP__EJB_REFS: - return getEjbRefs(); - case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: - return getResourceEnvRefs(); - case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: - return getEjbLocalRefs(); - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: - return getMessageDestinationRefs(); - case WebapplicationPackage.WEB_APP__SERVICE_REFS: - return getServiceRefs(); - case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: - return isDistributable() ? Boolean.TRUE : Boolean.FALSE; - case WebapplicationPackage.WEB_APP__VERSION: - return getVersion(); - case WebapplicationPackage.WEB_APP__CONTEXTS: - return getContexts(); - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - return getErrorPages(); - case WebapplicationPackage.WEB_APP__FILE_LIST: - return getFileList(); - case WebapplicationPackage.WEB_APP__TAG_LIBS: - return getTagLibs(); - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - return getConstraints(); - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - return getLoginConfig(); - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - return getMimeMappings(); - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - return getSessionConfig(); - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - return getServletMappings(); - case WebapplicationPackage.WEB_APP__SERVLETS: - return getServlets(); - case WebapplicationPackage.WEB_APP__SECURITY_ROLES: - return getSecurityRoles(); - case WebapplicationPackage.WEB_APP__FILTERS: - return getFilters(); - case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: - return getFilterMappings(); - case WebapplicationPackage.WEB_APP__LISTENERS: - return getListeners(); - case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: - return getContextParams(); - case WebapplicationPackage.WEB_APP__JSP_CONFIG: - return getJspConfig(); - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: - return getMessageDestinations(); - case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: - return getLocalEncodingMappingList(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_APP__ICONS: - return icons != null && !icons.isEmpty(); - case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case WebapplicationPackage.WEB_APP__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WebapplicationPackage.WEB_APP__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WebapplicationPackage.WEB_APP__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WebapplicationPackage.WEB_APP__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.WEB_APP__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: - return environmentProperties != null && !environmentProperties.isEmpty(); - case WebapplicationPackage.WEB_APP__RESOURCE_REFS: - return resourceRefs != null && !resourceRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__EJB_REFS: - return ejbRefs != null && !ejbRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: - return resourceEnvRefs != null && !resourceEnvRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: - return ejbLocalRefs != null && !ejbLocalRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: - return messageDestinationRefs != null && !messageDestinationRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: - return isSetDistributable(); - case WebapplicationPackage.WEB_APP__VERSION: - return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); - case WebapplicationPackage.WEB_APP__CONTEXTS: - return contexts != null && !contexts.isEmpty(); - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - return errorPages != null && !errorPages.isEmpty(); - case WebapplicationPackage.WEB_APP__FILE_LIST: - return fileList != null; - case WebapplicationPackage.WEB_APP__TAG_LIBS: - return tagLibs != null && !tagLibs.isEmpty(); - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - return constraints != null && !constraints.isEmpty(); - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - return loginConfig != null; - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - return mimeMappings != null && !mimeMappings.isEmpty(); - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - return sessionConfig != null; - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - return servletMappings != null && !servletMappings.isEmpty(); - case WebapplicationPackage.WEB_APP__SERVLETS: - return servlets != null && !servlets.isEmpty(); - case WebapplicationPackage.WEB_APP__SECURITY_ROLES: - return securityRoles != null && !securityRoles.isEmpty(); - case WebapplicationPackage.WEB_APP__FILTERS: - return filters != null && !filters.isEmpty(); - case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: - return filterMappings != null && !filterMappings.isEmpty(); - case WebapplicationPackage.WEB_APP__LISTENERS: - return listeners != null && !listeners.isEmpty(); - case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: - return contextParams != null && !contextParams.isEmpty(); - case WebapplicationPackage.WEB_APP__JSP_CONFIG: - return jspConfig != null; - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: - return messageDestinations != null && !messageDestinations.isEmpty(); - case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: - return localEncodingMappingList != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_APP__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WebapplicationPackage.WEB_APP__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WebapplicationPackage.WEB_APP__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.WEB_APP__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - getEnvironmentProperties().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__RESOURCE_REFS: - getResourceRefs().clear(); - getResourceRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__EJB_REFS: - getEjbRefs().clear(); - getEjbRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - getResourceEnvRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - getEjbLocalRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - getMessageDestinationRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: - setDistributable(((Boolean)newValue).booleanValue()); - return; - case WebapplicationPackage.WEB_APP__VERSION: - setVersion((String)newValue); - return; - case WebapplicationPackage.WEB_APP__CONTEXTS: - getContexts().clear(); - getContexts().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - getErrorPages().clear(); - getErrorPages().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__FILE_LIST: - setFileList((WelcomeFileList)newValue); - return; - case WebapplicationPackage.WEB_APP__TAG_LIBS: - getTagLibs().clear(); - getTagLibs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - getConstraints().clear(); - getConstraints().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - setLoginConfig((LoginConfig)newValue); - return; - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - getMimeMappings().clear(); - getMimeMappings().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - setSessionConfig((SessionConfig)newValue); - return; - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - getServletMappings().clear(); - getServletMappings().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__SERVLETS: - getServlets().clear(); - getServlets().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__SECURITY_ROLES: - getSecurityRoles().clear(); - getSecurityRoles().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__FILTERS: - getFilters().clear(); - getFilters().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: - getFilterMappings().clear(); - getFilterMappings().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__LISTENERS: - getListeners().clear(); - getListeners().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: - getContextParams().clear(); - getContextParams().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__JSP_CONFIG: - setJspConfig((JSPConfig)newValue); - return; - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - getMessageDestinations().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: - setLocalEncodingMappingList((LocalEncodingMappingList)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_APP__ICONS: - getIcons().clear(); - return; - case WebapplicationPackage.WEB_APP__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case WebapplicationPackage.WEB_APP__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WebapplicationPackage.WEB_APP__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WebapplicationPackage.WEB_APP__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WebapplicationPackage.WEB_APP__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.WEB_APP__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WebapplicationPackage.WEB_APP__ENVIRONMENT_PROPERTIES: - getEnvironmentProperties().clear(); - return; - case WebapplicationPackage.WEB_APP__RESOURCE_REFS: - getResourceRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__EJB_REFS: - getEjbRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS: - getResourceEnvRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS: - getEjbLocalRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS: - getMessageDestinationRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__SERVICE_REFS: - getServiceRefs().clear(); - return; - case WebapplicationPackage.WEB_APP__DISTRIBUTABLE: - unsetDistributable(); - return; - case WebapplicationPackage.WEB_APP__VERSION: - setVersion(VERSION_EDEFAULT); - return; - case WebapplicationPackage.WEB_APP__CONTEXTS: - getContexts().clear(); - return; - case WebapplicationPackage.WEB_APP__ERROR_PAGES: - getErrorPages().clear(); - return; - case WebapplicationPackage.WEB_APP__FILE_LIST: - setFileList((WelcomeFileList)null); - return; - case WebapplicationPackage.WEB_APP__TAG_LIBS: - getTagLibs().clear(); - return; - case WebapplicationPackage.WEB_APP__CONSTRAINTS: - getConstraints().clear(); - return; - case WebapplicationPackage.WEB_APP__LOGIN_CONFIG: - setLoginConfig((LoginConfig)null); - return; - case WebapplicationPackage.WEB_APP__MIME_MAPPINGS: - getMimeMappings().clear(); - return; - case WebapplicationPackage.WEB_APP__SESSION_CONFIG: - setSessionConfig((SessionConfig)null); - return; - case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS: - getServletMappings().clear(); - return; - case WebapplicationPackage.WEB_APP__SERVLETS: - getServlets().clear(); - return; - case WebapplicationPackage.WEB_APP__SECURITY_ROLES: - getSecurityRoles().clear(); - return; - case WebapplicationPackage.WEB_APP__FILTERS: - getFilters().clear(); - return; - case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS: - getFilterMappings().clear(); - return; - case WebapplicationPackage.WEB_APP__LISTENERS: - getListeners().clear(); - return; - case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS: - getContextParams().clear(); - return; - case WebapplicationPackage.WEB_APP__JSP_CONFIG: - setJspConfig((JSPConfig)null); - return; - case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS: - getMessageDestinations().clear(); - return; - case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST: - setLocalEncodingMappingList((LocalEncodingMappingList)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (distributable: ");//$NON-NLS-1$ - if (distributableESet) result.append(distributable); else result.append("");//$NON-NLS-1$ - result.append(", version: ");//$NON-NLS-1$ - result.append(version); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceFactory.java deleted file mode 100644 index 7c36932e8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceFactory.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 18, 2003 - * - * To change this generated comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -/** - * @author schacher - * - * To change this generated comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class WebAppResourceFactory extends TranslatorResourceFactory { - - /** - * Method registerDtds. - */ - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_SYSTEMID_2_2, "web-app_2_2.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_ALT_SYSTEMID_2_2, "web-app_2.2.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEBAPP_SYSTEMID_2_3, "web-app_2_3.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_APP_SCHEMA_LOC_2_4, "web-app_2_4.xsd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.JSP_SCHEMA_LOC_2_0, "jsp_2_0.xsd"); //$NON-NLS-1$ - } - - /** - * @param aRendererFactory - */ - public WebAppResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer) - */ - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new WebAppResourceImpl(uri, aRenderer); - } - - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(aRendererFactory)); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register(FileNameResourceFactoryRegistry aRegistry) { - aRegistry.registerLastFileSegment(J2EEConstants.WEBAPP_DD_SHORT_NAME, new WebAppResourceFactory(RendererFactory.getDefaultRendererFactory())); - } - - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.WEBAPP_DD_URI_OBJ); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceImpl.java deleted file mode 100644 index 8da37f96d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebAppResourceImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Mar 18, 2003 - * - * To change this generated comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.model.translator.webapplication.WebAppTranslator; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebAppResource; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - -/** - * @author schacher - * - * To change this generated comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class WebAppResourceImpl extends XMLResourceImpl implements WebAppResource { - - - public WebAppResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - public WebAppResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - - public WebApp getWebApp() { - return (WebApp) getRootObject(); - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.WEBAPP_PUBLICID_2_2; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.WEBAPP_SYSTEMID_2_2; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.WEBAPP_PUBLICID_2_3; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.WEBAPP_SYSTEMID_2_3; - } - - /* - * @see WebAppResource#isWeb2_2() - * @deprecated - use getModuleVersionID() and J2EEVersionConstants - */ - public boolean isWeb2_2() { - return getModuleVersionID() == WEB_2_2_ID; - } - /* - * @see WebAppResource#isWeb2_3() - * @deprecated - use getModuleVersionID() and J2EEVersionConstants - */ - public boolean isWeb2_3() { - return getModuleVersionID() == WEB_2_3_ID; - } - /* - * @see WebAppResource#isWeb2_4() - * @deprecated - use getModuleVersionID() and J2EEVersionConstants - */ - public boolean isWeb2_4() { - return getModuleVersionID() == WEB_2_4_ID; - } - - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() - */ - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.WEBAPP_DOCTYPE; - default : - return null; - } - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResource#getType() - */ - public int getType() { - return WEB_APP_TYPE; - } - - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return WebAppTranslator.INSTANCE; - } - /* Return J2EE version based on module version - */ - public int getJ2EEVersionID() { - switch (getModuleVersionID()) { - case J2EEVersionConstants.WEB_2_2_ID : - return J2EEVersionConstants.J2EE_1_2_ID; - case J2EEVersionConstants.WEB_2_3_ID : - return J2EEVersionConstants.J2EE_1_3_ID; - case J2EEVersionConstants.WEB_2_4_ID : - return J2EEVersionConstants.J2EE_1_4_ID; - default : - return J2EEVersionConstants.J2EE_1_4_ID; - } - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (WEB_2_4_ID) : - super.setDoctypeValues(null, null); - break; - case (WEB_2_3_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - case (WEB_2_2_ID) : - super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version - */ - public void setJ2EEVersionID(int id) { - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - primSetVersionID(WEB_2_4_ID); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - primSetVersionID(WEB_2_3_ID); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - primSetVersionID(WEB_2_2_ID); - } - syncVersionOfRootObject(); - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return WEB_2_4_ID; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - WebApp app = getWebApp(); - if (app == null) - return; - - String version = app.getVersion(); - String newVersion = getModuleVersionString(); - if (!newVersion.equals(version)) - app.setVersion(newVersion); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebResourceCollectionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebResourceCollectionImpl.java deleted file mode 100644 index d3f971531..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebResourceCollectionImpl.java +++ /dev/null @@ -1,499 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EDataTypeEList; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - - -/** - * The web-resource-collection element is used to identify a subset of the resources and HTTP methods on those resources within a web application to which a security constraint applies. If no HTTP methods are specified, then the security constraint applies to all HTTP methods. - - */ -public class WebResourceCollectionImpl extends EObjectImpl implements WebResourceCollection, EObject { - - /** - * The default value of the '{@link #getWebResourceName() Web Resource Name}' attribute. - * - * - * @see #getWebResourceName() - * @generated - * @ordered - */ - protected static final String WEB_RESOURCE_NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String webResourceName = WEB_RESOURCE_NAME_EDEFAULT; - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String description = DESCRIPTION_EDEFAULT; - /** - * The cached value of the '{@link #getUrlPattern() Url Pattern}' attribute list. - * - * - * @see #getUrlPattern() - * @generated - * @ordered - */ - protected EList urlPattern = null; - - /** - * The cached value of the '{@link #getHttpMethod() Http Method}' attribute list. - * - * - * @see #getHttpMethod() - * @generated - * @ordered - */ - protected EList httpMethod = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList urLs = null; - /** - * The cached value of the '{@link #getDescriptions() Descriptions}' containment reference list. - * - * - * @see #getDescriptions() - * @generated - * @ordered - */ - protected EList descriptions = null; - - /** - * The cached value of the '{@link #getHTTPs() HTT Ps}' containment reference list. - * - * - * @see #getHTTPs() - * @generated - * @ordered - */ - protected EList httPs = null; - - public WebResourceCollectionImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getWebResourceCollection(); - } - -/** - * addHTTP method comment. - */ -public void addHTTP(java.lang.String ahttpMethod) { - HTTPMethodType http = getFactory().createHTTPMethodType(); - http.setHttpMethod(ahttpMethod); - getHTTPs().add(http); -} -/** - * addURL method comment. - */ -public void addURL(java.lang.String aurlPattern) { - URLPatternType url = getFactory().createURLPatternType(); - url.setUrlPattern(aurlPattern); - getURLs().add(url); -} -public WebapplicationFactory getFactory() { - return ((WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI)).getWebapplicationFactory(); -} - /** - * @generated This field/method will be replaced during code generation - * The web-resource-name contains the name of this web resource collection - */ - public String getWebResourceName() { - return webResourceName; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebResourceName(String newWebResourceName) { - String oldWebResourceName = webResourceName; - webResourceName = newWebResourceName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME, oldWebResourceName, webResourceName)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getDescription() { - return description; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * Added for 1.4 - * @generated - */ - public EList getUrlPattern() { - if (urlPattern == null) { - urlPattern = new EDataTypeEList(String.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN); - } - return urlPattern; - } - - /** - * - * - * Added for 1.4 - * @generated - */ - public EList getHttpMethod() { - if (httpMethod == null) { - httpMethod = new EDataTypeUniqueEList(HTTPMethodTypeEnum.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD); - } - return httpMethod; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public SecurityConstraint getSecConstraint() { - if (eContainerFeatureID != WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT) return null; - return (SecurityConstraint)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSecConstraint(SecurityConstraint newSecConstraint) { - if (newSecConstraint != eContainer || (eContainerFeatureID != WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT && newSecConstraint != null)) { - if (EcoreUtil.isAncestor(this, newSecConstraint)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newSecConstraint != null) - msgs = ((InternalEObject)newSecConstraint).eInverseAdd(this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, SecurityConstraint.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newSecConstraint, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, newSecConstraint, newSecConstraint)); - } - - /** - * @generated This field/method will be replaced during code generation - * - * @since J2EE1.4 deprecated, use getUrlPattern() - * - * - */ - public EList getURLs() { - if (urLs == null) { - urLs = new EObjectContainmentWithInverseEList(URLPatternType.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS, WebapplicationPackage.URL_PATTERN_TYPE__RES_COLLECTION); - } - return urLs; - } - - /** - * - * - * @generated - */ - public EList getDescriptions() { - if (descriptions == null) { - descriptions = new EObjectContainmentEList(Description.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS); - } - return descriptions; - } - - /** - * - * @since J2EE1.4 deprecated, use getHttpMethods() - * - * @generated - */ - public EList getHTTPs() { - if (httPs == null) { - httPs = new EObjectContainmentEList(HTTPMethodType.class, this, WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS); - } - return httPs; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - return ((InternalEList)getURLs()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - return eBasicSetContainer(null, WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT, msgs); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - return ((InternalEList)getURLs()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: - return ((InternalEList)getHTTPs()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - return eContainer.eInverseRemove(this, WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS, SecurityConstraint.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: - return getWebResourceName(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: - return getDescription(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: - return getUrlPattern(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: - return getHttpMethod(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - return getSecConstraint(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - return getURLs(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: - return getDescriptions(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: - return getHTTPs(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: - return WEB_RESOURCE_NAME_EDEFAULT == null ? webResourceName != null : !WEB_RESOURCE_NAME_EDEFAULT.equals(webResourceName); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: - return urlPattern != null && !urlPattern.isEmpty(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: - return httpMethod != null && !httpMethod.isEmpty(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - return getSecConstraint() != null; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - return urLs != null && !urLs.isEmpty(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: - return httPs != null && !httPs.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: - setWebResourceName((String)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: - setDescription((String)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: - getUrlPattern().clear(); - getUrlPattern().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: - getHttpMethod().clear(); - getHttpMethod().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - getURLs().clear(); - getURLs().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: - getHTTPs().clear(); - getHTTPs().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME: - setWebResourceName(WEB_RESOURCE_NAME_EDEFAULT); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN: - getUrlPattern().clear(); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD: - getHttpMethod().clear(); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT: - setSecConstraint((SecurityConstraint)null); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS: - getURLs().clear(); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS: - getHTTPs().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (webResourceName: ");//$NON-NLS-1$ - result.append(webResourceName); - result.append(", description: ");//$NON-NLS-1$ - result.append(description); - result.append(", urlPattern: ");//$NON-NLS-1$ - result.append(urlPattern); - result.append(", httpMethod: ");//$NON-NLS-1$ - result.append(httpMethod); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebTypeImpl.java deleted file mode 100644 index 79bd11fe6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebTypeImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webapplication.WebType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; - -/** - * @generated - */ -public abstract class WebTypeImpl extends EObjectImpl implements WebType { - - public WebTypeImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getWebType(); - } - -/** - * isJspType method comment. - */ -public boolean isJspType() { - return false; -} -/** - * isServletType method comment. - */ -public boolean isServletType() { - return false; -} -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationFactoryImpl.java deleted file mode 100644 index d6c7ba51b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationFactoryImpl.java +++ /dev/null @@ -1,402 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.DispatcherType; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.ResAuthServletType; -import org.eclipse.jst.j2ee.webapplication.RoleNameType; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - -/** - * @generated - */ -public class WebapplicationFactoryImpl extends EFactoryImpl implements WebapplicationFactory{ - - public static final String MM_VERSION = "1.1";//$NON-NLS-1$ - - public WebapplicationFactoryImpl() { - super(); - } - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case WebapplicationPackage.WEB_APP: return createWebApp(); - case WebapplicationPackage.CONTEXT_PARAM: return createContextParam(); - case WebapplicationPackage.SERVLET: return createServlet(); - case WebapplicationPackage.SERVLET_MAPPING: return createServletMapping(); - case WebapplicationPackage.SESSION_CONFIG: return createSessionConfig(); - case WebapplicationPackage.MIME_MAPPING: return createMimeMapping(); - case WebapplicationPackage.WELCOME_FILE_LIST: return createWelcomeFileList(); - case WebapplicationPackage.ERROR_PAGE: return createErrorPage(); - case WebapplicationPackage.TAG_LIB_REF: return createTagLibRef(); - case WebapplicationPackage.SECURITY_CONSTRAINT: return createSecurityConstraint(); - case WebapplicationPackage.WEB_RESOURCE_COLLECTION: return createWebResourceCollection(); - case WebapplicationPackage.AUTH_CONSTRAINT: return createAuthConstraint(); - case WebapplicationPackage.USER_DATA_CONSTRAINT: return createUserDataConstraint(); - case WebapplicationPackage.LOGIN_CONFIG: return createLoginConfig(); - case WebapplicationPackage.FORM_LOGIN_CONFIG: return createFormLoginConfig(); - case WebapplicationPackage.INIT_PARAM: return createInitParam(); - case WebapplicationPackage.SERVLET_TYPE: return createServletType(); - case WebapplicationPackage.JSP_TYPE: return createJSPType(); - case WebapplicationPackage.URL_PATTERN_TYPE: return createURLPatternType(); - case WebapplicationPackage.ROLE_NAME_TYPE: return createRoleNameType(); - case WebapplicationPackage.WELCOME_FILE: return createWelcomeFile(); - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE: return createExceptionTypeErrorPage(); - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE: return createErrorCodeErrorPage(); - case WebapplicationPackage.FILTER_MAPPING: return createFilterMapping(); - case WebapplicationPackage.FILTER: return createFilter(); - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST: return createLocalEncodingMappingList(); - case WebapplicationPackage.LOCAL_ENCODING_MAPPING: return createLocalEncodingMapping(); - case WebapplicationPackage.HTTP_METHOD_TYPE: return createHTTPMethodType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case WebapplicationPackage.RES_AUTH_SERVLET_TYPE: - return ResAuthServletType.get(initialValue); - case WebapplicationPackage.HTTP_METHOD_TYPE_ENUM: - return HTTPMethodTypeEnum.get(initialValue); - case WebapplicationPackage.TRANSPORT_GUARANTEE_TYPE: - return TransportGuaranteeType.get(initialValue); - case WebapplicationPackage.DISPATCHER_TYPE: - return DispatcherType.get(initialValue); - case WebapplicationPackage.AUTH_METHOD_KIND: - return AuthMethodKind.get(initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case WebapplicationPackage.RES_AUTH_SERVLET_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case WebapplicationPackage.HTTP_METHOD_TYPE_ENUM: - return instanceValue == null ? null : instanceValue.toString(); - case WebapplicationPackage.TRANSPORT_GUARANTEE_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case WebapplicationPackage.DISPATCHER_TYPE: - return instanceValue == null ? null : instanceValue.toString(); - case WebapplicationPackage.AUTH_METHOD_KIND: - return instanceValue == null ? null : instanceValue.toString(); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - -public static WebapplicationFactory getActiveFactory() { - return (WebapplicationFactory) getPackage().getEFactoryInstance(); -} - /** - * @generated This field/method will be replaced during code generation. - */ - public WebApp createWebApp() { - WebAppImpl webApp = new WebAppImpl(); - return webApp; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ContextParam createContextParam() { - ContextParamImpl contextParam = new ContextParamImpl(); - return contextParam; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ErrorPage createErrorPage() { - ErrorPageImpl errorPage = new ErrorPageImpl(); - return errorPage; - } - - /** - * - * - * @generated - */ - public TagLibRef createTagLibRef() { - TagLibRefImpl tagLibRef = new TagLibRefImpl(); - return tagLibRef; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ExceptionTypeErrorPage createExceptionTypeErrorPage() { - ExceptionTypeErrorPageImpl exceptionTypeErrorPage = new ExceptionTypeErrorPageImpl(); - return exceptionTypeErrorPage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ErrorCodeErrorPage createErrorCodeErrorPage() { - ErrorCodeErrorPageImpl errorCodeErrorPage = new ErrorCodeErrorPageImpl(); - return errorCodeErrorPage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WelcomeFileList createWelcomeFileList() { - WelcomeFileListImpl welcomeFileList = new WelcomeFileListImpl(); - return welcomeFileList; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WelcomeFile createWelcomeFile() { - WelcomeFileImpl welcomeFile = new WelcomeFileImpl(); - return welcomeFile; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public SecurityConstraint createSecurityConstraint() { - SecurityConstraintImpl securityConstraint = new SecurityConstraintImpl(); - return securityConstraint; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WebResourceCollection createWebResourceCollection() { - WebResourceCollectionImpl webResourceCollection = new WebResourceCollectionImpl(); - return webResourceCollection; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public URLPatternType createURLPatternType() { - URLPatternTypeImpl urlPatternType = new URLPatternTypeImpl(); - return urlPatternType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public AuthConstraint createAuthConstraint() { - AuthConstraintImpl authConstraint = new AuthConstraintImpl(); - return authConstraint; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public UserDataConstraint createUserDataConstraint() { - UserDataConstraintImpl userDataConstraint = new UserDataConstraintImpl(); - return userDataConstraint; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public LoginConfig createLoginConfig() { - LoginConfigImpl loginConfig = new LoginConfigImpl(); - return loginConfig; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public FormLoginConfig createFormLoginConfig() { - FormLoginConfigImpl formLoginConfig = new FormLoginConfigImpl(); - return formLoginConfig; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public MimeMapping createMimeMapping() { - MimeMappingImpl mimeMapping = new MimeMappingImpl(); - return mimeMapping; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public SessionConfig createSessionConfig() { - SessionConfigImpl sessionConfig = new SessionConfigImpl(); - return sessionConfig; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ServletMapping createServletMapping() { - ServletMappingImpl servletMapping = new ServletMappingImpl(); - return servletMapping; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Servlet createServlet() { - ServletImpl servlet = new ServletImpl(); - return servlet; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public ServletType createServletType() { - ServletTypeImpl servletType = new ServletTypeImpl(); - return servletType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public JSPType createJSPType() { - JSPTypeImpl jspType = new JSPTypeImpl(); - return jspType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public InitParam createInitParam() { - InitParamImpl initParam = new InitParamImpl(); - return initParam; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Filter createFilter() { - FilterImpl filter = new FilterImpl(); - return filter; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public FilterMapping createFilterMapping() { - FilterMappingImpl filterMapping = new FilterMappingImpl(); - return filterMapping; - } - - /** - * - * - * @generated - */ - public LocalEncodingMappingList createLocalEncodingMappingList() { - LocalEncodingMappingListImpl localEncodingMappingList = new LocalEncodingMappingListImpl(); - return localEncodingMappingList; - } - - /** - * - * - * @generated - */ - public LocalEncodingMapping createLocalEncodingMapping() { - LocalEncodingMappingImpl localEncodingMapping = new LocalEncodingMappingImpl(); - return localEncodingMapping; - } - - /** - * - * - * @generated - */ - public HTTPMethodType createHTTPMethodType() { - HTTPMethodTypeImpl httpMethodType = new HTTPMethodTypeImpl(); - return httpMethodType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public RoleNameType createRoleNameType() { - RoleNameTypeImpl roleNameType = new RoleNameTypeImpl(); - return roleNameType; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WebapplicationPackage getWebapplicationPackage() { - return (WebapplicationPackage)getEPackage(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public static WebapplicationPackage getPackage() { - return WebapplicationPackage.eINSTANCE; - } -} - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationPackageImpl.java deleted file mode 100644 index 80ac41ce0..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WebapplicationPackageImpl.java +++ /dev/null @@ -1,1833 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.AuthMethodKind; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.DispatcherType; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodTypeEnum; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.ResAuthServletType; -import org.eclipse.jst.j2ee.webapplication.RoleNameType; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.TransportGuaranteeType; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -public class WebapplicationPackageImpl extends EPackageImpl implements WebapplicationPackage, EPackage { - /** - * - * - * @generated - */ - private EClass webAppEClass = null; - - /** - * - * - * @generated - */ - private EClass contextParamEClass = null; - - /** - * - * - * @generated - */ - private EClass servletEClass = null; - - /** - * - * - * @generated - */ - private EClass servletMappingEClass = null; - - /** - * - * - * @generated - */ - private EClass sessionConfigEClass = null; - - /** - * - * - * @generated - */ - private EClass mimeMappingEClass = null; - - /** - * - * - * @generated - */ - private EClass welcomeFileListEClass = null; - - /** - * - * - * @generated - */ - private EClass errorPageEClass = null; - - /** - * - * - * @generated - */ - private EClass tagLibRefEClass = null; - - /** - * - * - * @generated - */ - private EClass securityConstraintEClass = null; - - /** - * - * - * @generated - */ - private EClass webResourceCollectionEClass = null; - - /** - * - * - * @generated - */ - private EClass authConstraintEClass = null; - - /** - * - * - * @generated - */ - private EClass userDataConstraintEClass = null; - - /** - * - * - * @generated - */ - private EClass loginConfigEClass = null; - - /** - * - * - * @generated - */ - private EClass formLoginConfigEClass = null; - - /** - * - * - * @generated - */ - private EClass initParamEClass = null; - - /** - * - * - * @generated - */ - private EClass webTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass servletTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass jspTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass urlPatternTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass roleNameTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass welcomeFileEClass = null; - - /** - * - * - * @generated - */ - private EClass exceptionTypeErrorPageEClass = null; - - /** - * - * - * @generated - */ - private EClass errorCodeErrorPageEClass = null; - - /** - * - * - * @generated - */ - private EClass filterMappingEClass = null; - - /** - * - * - * @generated - */ - private EClass filterEClass = null; - - /** - * - * - * @generated - */ - private EClass localEncodingMappingListEClass = null; - - /** - * - * - * @generated - */ - private EClass localEncodingMappingEClass = null; - - /** - * - * - * @generated - */ - private EClass httpMethodTypeEClass = null; - - /** - * - * - * @generated - */ - private EEnum resAuthServletTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum httpMethodTypeEnumEEnum = null; - - /** - * - * - * @generated - */ - private EEnum transportGuaranteeTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum dispatcherTypeEEnum = null; - - /** - * - * - * @generated - */ - private EEnum authMethodKindEEnum = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - private WebapplicationPackageImpl() { - super(eNS_URI, WebapplicationFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - public static WebapplicationPackage init() { - if (isInited) return (WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); - - // Obtain or create and register package. - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WebapplicationPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - - // Step 1: create meta-model objects - theWebapplicationPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theWebapplicationPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theWebapplicationPackage; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWebApp() { - return webAppEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getWebApp_Distributable() { - return (EAttribute)webAppEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getWebApp_Version() { - return (EAttribute)webAppEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_Contexts() { - return (EReference)webAppEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_ErrorPages() { - return (EReference)webAppEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_FileList() { - return (EReference)webAppEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_TagLibs() { - return (EReference)webAppEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_Constraints() { - return (EReference)webAppEClass.getEStructuralFeatures().get(6); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_LoginConfig() { - return (EReference)webAppEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_MimeMappings() { - return (EReference)webAppEClass.getEStructuralFeatures().get(8); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_SessionConfig() { - return (EReference)webAppEClass.getEStructuralFeatures().get(9); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_ServletMappings() { - return (EReference)webAppEClass.getEStructuralFeatures().get(10); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_Servlets() { - return (EReference)webAppEClass.getEStructuralFeatures().get(11); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_SecurityRoles() { - return (EReference)webAppEClass.getEStructuralFeatures().get(12); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_Filters() { - return (EReference)webAppEClass.getEStructuralFeatures().get(13); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_FilterMappings() { - return (EReference)webAppEClass.getEStructuralFeatures().get(14); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebApp_Listeners() { - return (EReference)webAppEClass.getEStructuralFeatures().get(15); - } - - /** - * - * - * @generated - */ - public EReference getWebApp_ContextParams() { - return (EReference)webAppEClass.getEStructuralFeatures().get(16); - } - - /** - * - * - * @generated - */ - public EReference getWebApp_JspConfig() { - return (EReference)webAppEClass.getEStructuralFeatures().get(17); - } - - /** - * - * - * @generated - */ - public EReference getWebApp_MessageDestinations() { - return (EReference)webAppEClass.getEStructuralFeatures().get(18); - } - - /** - * - * - * @generated - */ - public EReference getWebApp_LocalEncodingMappingList() { - return (EReference)webAppEClass.getEStructuralFeatures().get(19); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getContextParam() { - return contextParamEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getContextParam_ParamName() { - return (EAttribute)contextParamEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getContextParam_ParamValue() { - return (EAttribute)contextParamEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getContextParam_Description() { - return (EAttribute)contextParamEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getContextParam_WebApp() { - return (EReference)contextParamEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getErrorPage() { - return errorPageEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getErrorPage_Location() { - return (EAttribute)errorPageEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getErrorPage_WebApp() { - return (EReference)errorPageEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getExceptionTypeErrorPage() { - return exceptionTypeErrorPageEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getExceptionTypeErrorPage_ExceptionType() { - return (EReference)exceptionTypeErrorPageEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getErrorCodeErrorPage() { - return errorCodeErrorPageEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getErrorCodeErrorPage_ErrorCode() { - return (EAttribute)errorCodeErrorPageEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWelcomeFileList() { - return welcomeFileListEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWelcomeFileList_WebApp() { - return (EReference)welcomeFileListEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWelcomeFileList_File() { - return (EReference)welcomeFileListEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWelcomeFile() { - return welcomeFileEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getWelcomeFile_WelcomeFile() { - return (EAttribute)welcomeFileEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWelcomeFile_FileList() { - return (EReference)welcomeFileEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getTagLibRef() { - return tagLibRefEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLibRef_TaglibURI() { - return (EAttribute)tagLibRefEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getTagLibRef_TaglibLocation() { - return (EAttribute)tagLibRefEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getTagLibRef_WebApp() { - return (EReference)tagLibRefEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSecurityConstraint() { - return securityConstraintEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSecurityConstraint_DisplayName() { - return (EAttribute)securityConstraintEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getSecurityConstraint_WebApp() { - return (EReference)securityConstraintEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getSecurityConstraint_WebResourceCollections() { - return (EReference)securityConstraintEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getSecurityConstraint_AuthConstraint() { - return (EReference)securityConstraintEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getSecurityConstraint_UserDataConstraint() { - return (EReference)securityConstraintEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getSecurityConstraint_DisplayNames() { - return (EReference)securityConstraintEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWebResourceCollection() { - return webResourceCollectionEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getWebResourceCollection_WebResourceName() { - return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getWebResourceCollection_Description() { - return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getWebResourceCollection_UrlPattern() { - return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getWebResourceCollection_HttpMethod() { - return (EAttribute)webResourceCollectionEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebResourceCollection_SecConstraint() { - return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getWebResourceCollection_URLs() { - return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getWebResourceCollection_Descriptions() { - return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getWebResourceCollection_HTTPs() { - return (EReference)webResourceCollectionEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getURLPatternType() { - return urlPatternTypeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getURLPatternType_UrlPattern() { - return (EAttribute)urlPatternTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getURLPatternType_ResCollection() { - return (EReference)urlPatternTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getHTTPMethodType() { - return httpMethodTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getHTTPMethodType_HttpMethod() { - return (EAttribute)httpMethodTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getAuthConstraint() { - return authConstraintEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthConstraint_Description() { - return (EAttribute)authConstraintEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getAuthConstraint_Roles() { - return (EAttribute)authConstraintEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getAuthConstraint_SecConstraint() { - return (EReference)authConstraintEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getAuthConstraint_Descriptions() { - return (EReference)authConstraintEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getUserDataConstraint() { - return userDataConstraintEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getUserDataConstraint_Description() { - return (EAttribute)userDataConstraintEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getUserDataConstraint_TransportGuarantee() { - return (EAttribute)userDataConstraintEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getUserDataConstraint_SecConstraint() { - return (EReference)userDataConstraintEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getUserDataConstraint_Descriptions() { - return (EReference)userDataConstraintEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getLoginConfig() { - return loginConfigEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getLoginConfig_AuthMethod() { - return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getLoginConfig_RealmName() { - return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getLoginConfig_AuthorizationMethod() { - return (EAttribute)loginConfigEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getLoginConfig_WebApp() { - return (EReference)loginConfigEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getLoginConfig_FormLoginConfig() { - return (EReference)loginConfigEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getFormLoginConfig() { - return formLoginConfigEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getFormLoginConfig_FormLoginPage() { - return (EAttribute)formLoginConfigEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getFormLoginConfig_FormErrorPage() { - return (EAttribute)formLoginConfigEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getFormLoginConfig_LoginConfig() { - return (EReference)formLoginConfigEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getMimeMapping() { - return mimeMappingEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMimeMapping_Extension() { - return (EAttribute)mimeMappingEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getMimeMapping_MimeType() { - return (EAttribute)mimeMappingEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getMimeMapping_WebApp() { - return (EReference)mimeMappingEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getSessionConfig() { - return sessionConfigEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getSessionConfig_SessionTimeout() { - return (EAttribute)sessionConfigEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getSessionConfig_WebApp() { - return (EReference)sessionConfigEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getServletMapping() { - return servletMappingEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getServletMapping_UrlPattern() { - return (EAttribute)servletMappingEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getServletMapping_Name() { - return (EAttribute)servletMappingEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServletMapping_WebApp() { - return (EReference)servletMappingEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServletMapping_Servlet() { - return (EReference)servletMappingEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getServlet() { - return servletEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getServlet_ServletName() { - return (EAttribute)servletEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getServlet_LoadOnStartup() { - return (EAttribute)servletEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServlet_WebApp() { - return (EReference)servletEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServlet_WebType() { - return (EReference)servletEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServlet_Params() { - return (EReference)servletEClass.getEStructuralFeatures().get(4); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServlet_SecurityRoleRefs() { - return (EReference)servletEClass.getEStructuralFeatures().get(5); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getServlet_RunAs() { - return (EReference)servletEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getServlet_InitParams() { - return (EReference)servletEClass.getEStructuralFeatures().get(7); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getWebType() { - return webTypeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getServletType() { - return servletTypeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getServletType_ClassName() { - return (EAttribute)servletTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getJSPType() { - return jspTypeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getJSPType_JspFile() { - return (EAttribute)jspTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getInitParam() { - return initParamEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getInitParam_ParamName() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getInitParam_ParamValue() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getInitParam_Description() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getFilter() { - return filterEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getFilter_Name() { - return (EAttribute)filterEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getFilter_InitParams() { - return (EReference)filterEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getFilter_FilterClass() { - return (EReference)filterEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getFilter_InitParamValues() { - return (EReference)filterEClass.getEStructuralFeatures().get(3); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getFilterMapping() { - return filterMappingEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getFilterMapping_UrlPattern() { - return (EAttribute)filterMappingEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getFilterMapping_DispatcherType() { - return (EAttribute)filterMappingEClass.getEStructuralFeatures().get(1); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getFilterMapping_Filter() { - return (EReference)filterMappingEClass.getEStructuralFeatures().get(2); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EReference getFilterMapping_Servlet() { - return (EReference)filterMappingEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getLocalEncodingMappingList() { - return localEncodingMappingListEClass; - } - - /** - * - * - * @generated - */ - public EReference getLocalEncodingMappingList_LocalEncodingMappings() { - return (EReference)localEncodingMappingListEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getLocalEncodingMapping() { - return localEncodingMappingEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getLocalEncodingMapping_Locale() { - return (EAttribute)localEncodingMappingEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getLocalEncodingMapping_Encoding() { - return (EAttribute)localEncodingMappingEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getResAuthServletType() { - return resAuthServletTypeEEnum; - } - - /** - * - * - * @generated - */ - public EEnum getHTTPMethodTypeEnum() { - return httpMethodTypeEnumEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EClass getRoleNameType() { - return roleNameTypeEClass; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EAttribute getRoleNameType_RoleName() { - return (EAttribute)roleNameTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public EEnum getTransportGuaranteeType() { - return transportGuaranteeTypeEEnum; - } - - /** - * - * - * @generated - */ - public EEnum getDispatcherType() { - return dispatcherTypeEEnum; - } - - /** - * - * - * @generated - */ - public EEnum getAuthMethodKind() { - return authMethodKindEEnum; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public WebapplicationFactory getWebapplicationFactory() { - return (WebapplicationFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - webAppEClass = createEClass(WEB_APP); - createEAttribute(webAppEClass, WEB_APP__DISTRIBUTABLE); - createEAttribute(webAppEClass, WEB_APP__VERSION); - createEReference(webAppEClass, WEB_APP__CONTEXTS); - createEReference(webAppEClass, WEB_APP__ERROR_PAGES); - createEReference(webAppEClass, WEB_APP__FILE_LIST); - createEReference(webAppEClass, WEB_APP__TAG_LIBS); - createEReference(webAppEClass, WEB_APP__CONSTRAINTS); - createEReference(webAppEClass, WEB_APP__LOGIN_CONFIG); - createEReference(webAppEClass, WEB_APP__MIME_MAPPINGS); - createEReference(webAppEClass, WEB_APP__SESSION_CONFIG); - createEReference(webAppEClass, WEB_APP__SERVLET_MAPPINGS); - createEReference(webAppEClass, WEB_APP__SERVLETS); - createEReference(webAppEClass, WEB_APP__SECURITY_ROLES); - createEReference(webAppEClass, WEB_APP__FILTERS); - createEReference(webAppEClass, WEB_APP__FILTER_MAPPINGS); - createEReference(webAppEClass, WEB_APP__LISTENERS); - createEReference(webAppEClass, WEB_APP__CONTEXT_PARAMS); - createEReference(webAppEClass, WEB_APP__JSP_CONFIG); - createEReference(webAppEClass, WEB_APP__MESSAGE_DESTINATIONS); - createEReference(webAppEClass, WEB_APP__LOCAL_ENCODING_MAPPING_LIST); - - contextParamEClass = createEClass(CONTEXT_PARAM); - createEAttribute(contextParamEClass, CONTEXT_PARAM__PARAM_NAME); - createEAttribute(contextParamEClass, CONTEXT_PARAM__PARAM_VALUE); - createEAttribute(contextParamEClass, CONTEXT_PARAM__DESCRIPTION); - createEReference(contextParamEClass, CONTEXT_PARAM__WEB_APP); - - servletEClass = createEClass(SERVLET); - createEAttribute(servletEClass, SERVLET__SERVLET_NAME); - createEAttribute(servletEClass, SERVLET__LOAD_ON_STARTUP); - createEReference(servletEClass, SERVLET__WEB_APP); - createEReference(servletEClass, SERVLET__WEB_TYPE); - createEReference(servletEClass, SERVLET__PARAMS); - createEReference(servletEClass, SERVLET__SECURITY_ROLE_REFS); - createEReference(servletEClass, SERVLET__RUN_AS); - createEReference(servletEClass, SERVLET__INIT_PARAMS); - - servletMappingEClass = createEClass(SERVLET_MAPPING); - createEAttribute(servletMappingEClass, SERVLET_MAPPING__URL_PATTERN); - createEAttribute(servletMappingEClass, SERVLET_MAPPING__NAME); - createEReference(servletMappingEClass, SERVLET_MAPPING__WEB_APP); - createEReference(servletMappingEClass, SERVLET_MAPPING__SERVLET); - - sessionConfigEClass = createEClass(SESSION_CONFIG); - createEAttribute(sessionConfigEClass, SESSION_CONFIG__SESSION_TIMEOUT); - createEReference(sessionConfigEClass, SESSION_CONFIG__WEB_APP); - - mimeMappingEClass = createEClass(MIME_MAPPING); - createEAttribute(mimeMappingEClass, MIME_MAPPING__EXTENSION); - createEAttribute(mimeMappingEClass, MIME_MAPPING__MIME_TYPE); - createEReference(mimeMappingEClass, MIME_MAPPING__WEB_APP); - - welcomeFileListEClass = createEClass(WELCOME_FILE_LIST); - createEReference(welcomeFileListEClass, WELCOME_FILE_LIST__WEB_APP); - createEReference(welcomeFileListEClass, WELCOME_FILE_LIST__FILE); - - errorPageEClass = createEClass(ERROR_PAGE); - createEAttribute(errorPageEClass, ERROR_PAGE__LOCATION); - createEReference(errorPageEClass, ERROR_PAGE__WEB_APP); - - tagLibRefEClass = createEClass(TAG_LIB_REF); - createEAttribute(tagLibRefEClass, TAG_LIB_REF__TAGLIB_URI); - createEAttribute(tagLibRefEClass, TAG_LIB_REF__TAGLIB_LOCATION); - createEReference(tagLibRefEClass, TAG_LIB_REF__WEB_APP); - - securityConstraintEClass = createEClass(SECURITY_CONSTRAINT); - createEAttribute(securityConstraintEClass, SECURITY_CONSTRAINT__DISPLAY_NAME); - createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__WEB_APP); - createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS); - createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__AUTH_CONSTRAINT); - createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT); - createEReference(securityConstraintEClass, SECURITY_CONSTRAINT__DISPLAY_NAMES); - - webResourceCollectionEClass = createEClass(WEB_RESOURCE_COLLECTION); - createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME); - createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__DESCRIPTION); - createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__URL_PATTERN); - createEAttribute(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__HTTP_METHOD); - createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__SEC_CONSTRAINT); - createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__UR_LS); - createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__DESCRIPTIONS); - createEReference(webResourceCollectionEClass, WEB_RESOURCE_COLLECTION__HTT_PS); - - authConstraintEClass = createEClass(AUTH_CONSTRAINT); - createEAttribute(authConstraintEClass, AUTH_CONSTRAINT__DESCRIPTION); - createEAttribute(authConstraintEClass, AUTH_CONSTRAINT__ROLES); - createEReference(authConstraintEClass, AUTH_CONSTRAINT__SEC_CONSTRAINT); - createEReference(authConstraintEClass, AUTH_CONSTRAINT__DESCRIPTIONS); - - userDataConstraintEClass = createEClass(USER_DATA_CONSTRAINT); - createEAttribute(userDataConstraintEClass, USER_DATA_CONSTRAINT__DESCRIPTION); - createEAttribute(userDataConstraintEClass, USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE); - createEReference(userDataConstraintEClass, USER_DATA_CONSTRAINT__SEC_CONSTRAINT); - createEReference(userDataConstraintEClass, USER_DATA_CONSTRAINT__DESCRIPTIONS); - - loginConfigEClass = createEClass(LOGIN_CONFIG); - createEAttribute(loginConfigEClass, LOGIN_CONFIG__AUTH_METHOD); - createEAttribute(loginConfigEClass, LOGIN_CONFIG__REALM_NAME); - createEAttribute(loginConfigEClass, LOGIN_CONFIG__AUTHORIZATION_METHOD); - createEReference(loginConfigEClass, LOGIN_CONFIG__WEB_APP); - createEReference(loginConfigEClass, LOGIN_CONFIG__FORM_LOGIN_CONFIG); - - formLoginConfigEClass = createEClass(FORM_LOGIN_CONFIG); - createEAttribute(formLoginConfigEClass, FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE); - createEAttribute(formLoginConfigEClass, FORM_LOGIN_CONFIG__FORM_ERROR_PAGE); - createEReference(formLoginConfigEClass, FORM_LOGIN_CONFIG__LOGIN_CONFIG); - - initParamEClass = createEClass(INIT_PARAM); - createEAttribute(initParamEClass, INIT_PARAM__PARAM_NAME); - createEAttribute(initParamEClass, INIT_PARAM__PARAM_VALUE); - createEAttribute(initParamEClass, INIT_PARAM__DESCRIPTION); - - webTypeEClass = createEClass(WEB_TYPE); - - servletTypeEClass = createEClass(SERVLET_TYPE); - createEAttribute(servletTypeEClass, SERVLET_TYPE__CLASS_NAME); - - jspTypeEClass = createEClass(JSP_TYPE); - createEAttribute(jspTypeEClass, JSP_TYPE__JSP_FILE); - - urlPatternTypeEClass = createEClass(URL_PATTERN_TYPE); - createEAttribute(urlPatternTypeEClass, URL_PATTERN_TYPE__URL_PATTERN); - createEReference(urlPatternTypeEClass, URL_PATTERN_TYPE__RES_COLLECTION); - - roleNameTypeEClass = createEClass(ROLE_NAME_TYPE); - createEAttribute(roleNameTypeEClass, ROLE_NAME_TYPE__ROLE_NAME); - - welcomeFileEClass = createEClass(WELCOME_FILE); - createEAttribute(welcomeFileEClass, WELCOME_FILE__WELCOME_FILE); - createEReference(welcomeFileEClass, WELCOME_FILE__FILE_LIST); - - exceptionTypeErrorPageEClass = createEClass(EXCEPTION_TYPE_ERROR_PAGE); - createEReference(exceptionTypeErrorPageEClass, EXCEPTION_TYPE_ERROR_PAGE__EXCEPTION_TYPE); - - errorCodeErrorPageEClass = createEClass(ERROR_CODE_ERROR_PAGE); - createEAttribute(errorCodeErrorPageEClass, ERROR_CODE_ERROR_PAGE__ERROR_CODE); - - filterMappingEClass = createEClass(FILTER_MAPPING); - createEAttribute(filterMappingEClass, FILTER_MAPPING__URL_PATTERN); - createEAttribute(filterMappingEClass, FILTER_MAPPING__DISPATCHER_TYPE); - createEReference(filterMappingEClass, FILTER_MAPPING__FILTER); - createEReference(filterMappingEClass, FILTER_MAPPING__SERVLET); - - filterEClass = createEClass(FILTER); - createEAttribute(filterEClass, FILTER__NAME); - createEReference(filterEClass, FILTER__INIT_PARAMS); - createEReference(filterEClass, FILTER__FILTER_CLASS); - createEReference(filterEClass, FILTER__INIT_PARAM_VALUES); - - localEncodingMappingListEClass = createEClass(LOCAL_ENCODING_MAPPING_LIST); - createEReference(localEncodingMappingListEClass, LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS); - - localEncodingMappingEClass = createEClass(LOCAL_ENCODING_MAPPING); - createEAttribute(localEncodingMappingEClass, LOCAL_ENCODING_MAPPING__LOCALE); - createEAttribute(localEncodingMappingEClass, LOCAL_ENCODING_MAPPING__ENCODING); - - httpMethodTypeEClass = createEClass(HTTP_METHOD_TYPE); - createEAttribute(httpMethodTypeEClass, HTTP_METHOD_TYPE__HTTP_METHOD); - - // Create enums - resAuthServletTypeEEnum = createEEnum(RES_AUTH_SERVLET_TYPE); - httpMethodTypeEnumEEnum = createEEnum(HTTP_METHOD_TYPE_ENUM); - transportGuaranteeTypeEEnum = createEEnum(TRANSPORT_GUARANTEE_TYPE); - dispatcherTypeEEnum = createEEnum(DISPATCHER_TYPE); - authMethodKindEEnum = createEEnum(AUTH_METHOD_KIND); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - JspPackageImpl theJspPackage = (JspPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - - // Add supertypes to classes - webAppEClass.getESuperTypes().add(theCommonPackage.getJNDIEnvRefsGroup()); - servletEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - servletTypeEClass.getESuperTypes().add(this.getWebType()); - jspTypeEClass.getESuperTypes().add(this.getWebType()); - exceptionTypeErrorPageEClass.getESuperTypes().add(this.getErrorPage()); - errorCodeErrorPageEClass.getESuperTypes().add(this.getErrorPage()); - filterEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(webAppEClass, WebApp.class, "WebApp", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getWebApp_Distributable(), ecorePackage.getEBoolean(), "distributable", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebApp_Version(), ecorePackage.getEString(), "version", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_Contexts(), this.getContextParam(), this.getContextParam_WebApp(), "contexts", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_ErrorPages(), this.getErrorPage(), this.getErrorPage_WebApp(), "errorPages", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_FileList(), this.getWelcomeFileList(), this.getWelcomeFileList_WebApp(), "fileList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_TagLibs(), this.getTagLibRef(), this.getTagLibRef_WebApp(), "tagLibs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_Constraints(), this.getSecurityConstraint(), this.getSecurityConstraint_WebApp(), "constraints", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_LoginConfig(), this.getLoginConfig(), this.getLoginConfig_WebApp(), "loginConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_MimeMappings(), this.getMimeMapping(), this.getMimeMapping_WebApp(), "mimeMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_SessionConfig(), this.getSessionConfig(), this.getSessionConfig_WebApp(), "sessionConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_ServletMappings(), this.getServletMapping(), this.getServletMapping_WebApp(), "servletMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_Servlets(), this.getServlet(), this.getServlet_WebApp(), "servlets", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_Filters(), this.getFilter(), null, "filters", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_FilterMappings(), this.getFilterMapping(), null, "filterMappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_Listeners(), theCommonPackage.getListener(), null, "listeners", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_ContextParams(), theCommonPackage.getParamValue(), null, "contextParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_JspConfig(), theJspPackage.getJSPConfig(), null, "jspConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebApp_LocalEncodingMappingList(), this.getLocalEncodingMappingList(), null, "localEncodingMappingList", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(contextParamEClass, ContextParam.class, "ContextParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getContextParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getContextParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getContextParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getContextParam_WebApp(), this.getWebApp(), this.getWebApp_Contexts(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(servletEClass, Servlet.class, "Servlet", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getServlet_ServletName(), ecorePackage.getEString(), "servletName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getServlet_LoadOnStartup(), ecorePackage.getEIntegerObject(), "loadOnStartup", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_WebApp(), this.getWebApp(), this.getWebApp_Servlets(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_WebType(), this.getWebType(), null, "webType", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_Params(), this.getInitParam(), null, "params", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_SecurityRoleRefs(), theCommonPackage.getSecurityRoleRef(), null, "securityRoleRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_RunAs(), theCommonPackage.getRunAsSpecifiedIdentity(), null, "runAs", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServlet_InitParams(), theCommonPackage.getParamValue(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(servletMappingEClass, ServletMapping.class, "ServletMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getServletMapping_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getServletMapping_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServletMapping_WebApp(), this.getWebApp(), this.getWebApp_ServletMappings(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServletMapping_Servlet(), this.getServlet(), null, "servlet", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(sessionConfigEClass, SessionConfig.class, "SessionConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getSessionConfig_SessionTimeout(), ecorePackage.getEInt(), "sessionTimeout", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSessionConfig_WebApp(), this.getWebApp(), this.getWebApp_SessionConfig(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(mimeMappingEClass, MimeMapping.class, "MimeMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getMimeMapping_Extension(), ecorePackage.getEString(), "extension", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getMimeMapping_MimeType(), ecorePackage.getEString(), "mimeType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getMimeMapping_WebApp(), this.getWebApp(), this.getWebApp_MimeMappings(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(welcomeFileListEClass, WelcomeFileList.class, "WelcomeFileList", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getWelcomeFileList_WebApp(), this.getWebApp(), this.getWebApp_FileList(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWelcomeFileList_File(), this.getWelcomeFile(), this.getWelcomeFile_FileList(), "file", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(errorPageEClass, ErrorPage.class, "ErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getErrorPage_Location(), ecorePackage.getEString(), "location", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getErrorPage_WebApp(), this.getWebApp(), this.getWebApp_ErrorPages(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(tagLibRefEClass, TagLibRef.class, "TagLibRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getTagLibRef_TaglibURI(), ecorePackage.getEString(), "taglibURI", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getTagLibRef_TaglibLocation(), ecorePackage.getEString(), "taglibLocation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getTagLibRef_WebApp(), this.getWebApp(), this.getWebApp_TagLibs(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(securityConstraintEClass, SecurityConstraint.class, "SecurityConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getSecurityConstraint_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityConstraint_WebApp(), this.getWebApp(), this.getWebApp_Constraints(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityConstraint_WebResourceCollections(), this.getWebResourceCollection(), this.getWebResourceCollection_SecConstraint(), "webResourceCollections", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityConstraint_AuthConstraint(), this.getAuthConstraint(), this.getAuthConstraint_SecConstraint(), "authConstraint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityConstraint_UserDataConstraint(), this.getUserDataConstraint(), this.getUserDataConstraint_SecConstraint(), "userDataConstraint", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getSecurityConstraint_DisplayNames(), theCommonPackage.getDisplayName(), null, "displayNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(webResourceCollectionEClass, WebResourceCollection.class, "WebResourceCollection", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getWebResourceCollection_WebResourceName(), ecorePackage.getEString(), "webResourceName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebResourceCollection_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebResourceCollection_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebResourceCollection_HttpMethod(), this.getHTTPMethodTypeEnum(), "httpMethod", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebResourceCollection_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_WebResourceCollections(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebResourceCollection_URLs(), this.getURLPatternType(), this.getURLPatternType_ResCollection(), "URLs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebResourceCollection_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebResourceCollection_HTTPs(), this.getHTTPMethodType(), null, "HTTPs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(authConstraintEClass, AuthConstraint.class, "AuthConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getAuthConstraint_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getAuthConstraint_Roles(), ecorePackage.getEString(), "roles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getAuthConstraint_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_AuthConstraint(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getAuthConstraint_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(userDataConstraintEClass, UserDataConstraint.class, "UserDataConstraint", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getUserDataConstraint_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getUserDataConstraint_TransportGuarantee(), this.getTransportGuaranteeType(), "transportGuarantee", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getUserDataConstraint_SecConstraint(), this.getSecurityConstraint(), this.getSecurityConstraint_UserDataConstraint(), "secConstraint", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getUserDataConstraint_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(loginConfigEClass, LoginConfig.class, "LoginConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getLoginConfig_AuthMethod(), this.getAuthMethodKind(), "authMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getLoginConfig_RealmName(), ecorePackage.getEString(), "realmName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getLoginConfig_AuthorizationMethod(), ecorePackage.getEString(), "authorizationMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getLoginConfig_WebApp(), this.getWebApp(), this.getWebApp_LoginConfig(), "webApp", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getLoginConfig_FormLoginConfig(), this.getFormLoginConfig(), this.getFormLoginConfig_LoginConfig(), "formLoginConfig", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(formLoginConfigEClass, FormLoginConfig.class, "FormLoginConfig", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getFormLoginConfig_FormLoginPage(), ecorePackage.getEString(), "formLoginPage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getFormLoginConfig_FormErrorPage(), ecorePackage.getEString(), "formErrorPage", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFormLoginConfig_LoginConfig(), this.getLoginConfig(), this.getLoginConfig_FormLoginConfig(), "loginConfig", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(initParamEClass, InitParam.class, "InitParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getInitParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getInitParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getInitParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(webTypeEClass, WebType.class, "WebType", IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - initEClass(servletTypeEClass, ServletType.class, "ServletType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getServletType_ClassName(), ecorePackage.getEString(), "className", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(jspTypeEClass, JSPType.class, "JSPType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getJSPType_JspFile(), ecorePackage.getEString(), "jspFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(urlPatternTypeEClass, URLPatternType.class, "URLPatternType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getURLPatternType_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getURLPatternType_ResCollection(), this.getWebResourceCollection(), this.getWebResourceCollection_URLs(), "resCollection", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(roleNameTypeEClass, RoleNameType.class, "RoleNameType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getRoleNameType_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(welcomeFileEClass, WelcomeFile.class, "WelcomeFile", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getWelcomeFile_WelcomeFile(), ecorePackage.getEString(), "welcomeFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWelcomeFile_FileList(), this.getWelcomeFileList(), this.getWelcomeFileList_File(), "fileList", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(exceptionTypeErrorPageEClass, ExceptionTypeErrorPage.class, "ExceptionTypeErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getExceptionTypeErrorPage_ExceptionType(), theJavaRefPackage.getJavaClass(), null, "exceptionType", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(errorCodeErrorPageEClass, ErrorCodeErrorPage.class, "ErrorCodeErrorPage", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getErrorCodeErrorPage_ErrorCode(), ecorePackage.getEString(), "errorCode", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(filterMappingEClass, FilterMapping.class, "FilterMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getFilterMapping_UrlPattern(), ecorePackage.getEString(), "urlPattern", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getFilterMapping_DispatcherType(), this.getDispatcherType(), "dispatcherType", null, 0, 4, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFilterMapping_Filter(), this.getFilter(), null, "filter", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFilterMapping_Servlet(), this.getServlet(), null, "servlet", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(filterEClass, Filter.class, "Filter", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getFilter_Name(), ecorePackage.getEString(), "name", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFilter_InitParams(), this.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFilter_FilterClass(), theJavaRefPackage.getJavaClass(), null, "filterClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getFilter_InitParamValues(), theCommonPackage.getParamValue(), null, "initParamValues", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(localEncodingMappingListEClass, LocalEncodingMappingList.class, "LocalEncodingMappingList", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getLocalEncodingMappingList_LocalEncodingMappings(), this.getLocalEncodingMapping(), null, "localEncodingMappings", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(localEncodingMappingEClass, LocalEncodingMapping.class, "LocalEncodingMapping", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getLocalEncodingMapping_Locale(), ecorePackage.getEString(), "locale", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getLocalEncodingMapping_Encoding(), ecorePackage.getEString(), "encoding", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(httpMethodTypeEClass, HTTPMethodType.class, "HTTPMethodType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getHTTPMethodType_HttpMethod(), ecorePackage.getEString(), "httpMethod", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(resAuthServletTypeEEnum, ResAuthServletType.class, "ResAuthServletType");//$NON-NLS-1$ - addEEnumLiteral(resAuthServletTypeEEnum, ResAuthServletType.CONTAINER_LITERAL); - addEEnumLiteral(resAuthServletTypeEEnum, ResAuthServletType.SERVLET_LITERAL); - - initEEnum(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.class, "HTTPMethodTypeEnum");//$NON-NLS-1$ - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.GET_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.POST_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.PUT_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.DELETE_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.HEAD_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.OPTIONS_LITERAL); - addEEnumLiteral(httpMethodTypeEnumEEnum, HTTPMethodTypeEnum.TRACE_LITERAL); - - initEEnum(transportGuaranteeTypeEEnum, TransportGuaranteeType.class, "TransportGuaranteeType");//$NON-NLS-1$ - addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.NONE_LITERAL); - addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.INTEGRAL_LITERAL); - addEEnumLiteral(transportGuaranteeTypeEEnum, TransportGuaranteeType.CONFIDENTIAL_LITERAL); - - initEEnum(dispatcherTypeEEnum, DispatcherType.class, "DispatcherType");//$NON-NLS-1$ - addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.FORWARD_LITERAL); - addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.INCLUDE_LITERAL); - addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.REQUEST_LITERAL); - addEEnumLiteral(dispatcherTypeEEnum, DispatcherType.ERROR_LITERAL); - - initEEnum(authMethodKindEEnum, AuthMethodKind.class, "AuthMethodKind");//$NON-NLS-1$ - addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.UNSPECIFIED_LITERAL); - addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.BASIC_LITERAL); - addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.DIGEST_LITERAL); - addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.FORM_LITERAL); - addEEnumLiteral(authMethodKindEEnum, AuthMethodKind.CLIENT_CERT_LITERAL); - - // Create resource - createResource(eNS_URI); - } -} //WebapplicationPackageImpl - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileImpl.java deleted file mode 100644 index 6b913efc6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileImpl.java +++ /dev/null @@ -1,245 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - -/** - * The welcome-file element contains file name to use as a default welcome file, such as index.html - - */ -public class WelcomeFileImpl extends EObjectImpl implements WelcomeFile, EObject { - - /** - * The default value of the '{@link #getWelcomeFile() Welcome File}' attribute. - * - * - * @see #getWelcomeFile() - * @generated - * @ordered - */ - protected static final String WELCOME_FILE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String welcomeFile = WELCOME_FILE_EDEFAULT; - public WelcomeFileImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getWelcomeFile(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getWelcomeFile() { - return welcomeFile; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWelcomeFile(String newWelcomeFile) { - String oldWelcomeFile = welcomeFile; - welcomeFile = newWelcomeFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE__WELCOME_FILE, oldWelcomeFile, welcomeFile)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public WelcomeFileList getFileList() { - if (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE__FILE_LIST) return null; - return (WelcomeFileList)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setFileList(WelcomeFileList newFileList) { - if (newFileList != eContainer || (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE__FILE_LIST && newFileList != null)) { - if (EcoreUtil.isAncestor(this, newFileList)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newFileList != null) - msgs = ((InternalEObject)newFileList).eInverseAdd(this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WelcomeFileList.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newFileList, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE__FILE_LIST, newFileList, newFileList)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - return eBasicSetContainer(null, WebapplicationPackage.WELCOME_FILE__FILE_LIST, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - return eContainer.eInverseRemove(this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WelcomeFileList.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: - return getWelcomeFile(); - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - return getFileList(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: - return WELCOME_FILE_EDEFAULT == null ? welcomeFile != null : !WELCOME_FILE_EDEFAULT.equals(welcomeFile); - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - return getFileList() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: - setWelcomeFile((String)newValue); - return; - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - setFileList((WelcomeFileList)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE: - setWelcomeFile(WELCOME_FILE_EDEFAULT); - return; - case WebapplicationPackage.WELCOME_FILE__FILE_LIST: - setFileList((WelcomeFileList)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (welcomeFile: ");//$NON-NLS-1$ - result.append(welcomeFile); - result.append(')'); - return result.toString(); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileListImpl.java deleted file mode 100644 index 82c1c3690..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/impl/WelcomeFileListImpl.java +++ /dev/null @@ -1,234 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - -/** - * The welcome-file-list contains an ordered list of welcome files elements. - */ -public class WelcomeFileListImpl extends EObjectImpl implements WelcomeFileList, EObject { - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList file = null; - public WelcomeFileListImpl() { - super(); - } - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WebapplicationPackage.eINSTANCE.getWelcomeFileList(); - } - -/** - * addFileNamed method comment. - */ -public void addFileNamed(java.lang.String name) { - WelcomeFile lfile = ((WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI)).getWebapplicationFactory().createWelcomeFile(); - lfile.setWelcomeFile(name); - getFile().add(lfile); -} - /** - * @generated This field/method will be replaced during code generation - */ - public WebApp getWebApp() { - if (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP) return null; - return (WebApp)eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setWebApp(WebApp newWebApp) { - if (newWebApp != eContainer || (eContainerFeatureID != WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP && newWebApp != null)) { - if (EcoreUtil.isAncestor(this, newWebApp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString());//$NON-NLS-1$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newWebApp != null) - msgs = ((InternalEObject)newWebApp).eInverseAdd(this, WebapplicationPackage.WEB_APP__FILE_LIST, WebApp.class, msgs); - msgs = eBasicSetContainer((InternalEObject)newWebApp, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, newWebApp, newWebApp)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getFile() { - if (file == null) { - file = new EObjectContainmentWithInverseEList(WelcomeFile.class, this, WebapplicationPackage.WELCOME_FILE_LIST__FILE, WebapplicationPackage.WELCOME_FILE__FILE_LIST); - } - return file; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - return ((InternalEList)getFile()).basicAdd(otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - return eBasicSetContainer(null, WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP, msgs); - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - return ((InternalEList)getFile()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - return eContainer.eInverseRemove(this, WebapplicationPackage.WEB_APP__FILE_LIST, WebApp.class, msgs); - default: - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - return getWebApp(); - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - return getFile(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - return getWebApp() != null; - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - return file != null && !file.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - setWebApp((WebApp)newValue); - return; - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - getFile().clear(); - getFile().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WebapplicationPackage.WELCOME_FILE_LIST__WEB_APP: - setWebApp((WebApp)null); - return; - case WebapplicationPackage.WELCOME_FILE_LIST__FILE: - getFile().clear(); - return; - } - eDynamicUnset(eFeature); - } - -} - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationAdapterFactory.java deleted file mode 100644 index eef760728..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationAdapterFactory.java +++ /dev/null @@ -1,700 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.common.Listener; -import org.eclipse.jst.j2ee.jsp.TagLibRefType; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.RoleNameType; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - - - -public class WebapplicationAdapterFactory extends AdapterFactoryImpl { - protected static WebapplicationPackage modelPackage; - - public WebapplicationAdapterFactory() { - if (modelPackage == null) { - modelPackage = (WebapplicationPackage)EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI); - } - } - public boolean isFactoryForType(Object type) { - if (type == modelPackage) { - return true; - } - if (type instanceof EObject) { - return ((EObject)type).eClass().eContainer() == modelPackage; - } - return false; - } - - protected WebapplicationSwitch sw = new WebapplicationSwitch() { - public Object caseWebApp(WebApp object) { - return createWebAppAdapter(); - } - public Object caseContextParam(ContextParam object) { - return createContextParamAdapter(); - } - public Object caseErrorPage(ErrorPage object) { - return createErrorPageAdapter(); - } - public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { - return createExceptionTypeErrorPageAdapter(); - } - public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { - return createErrorCodeErrorPageAdapter(); - } - public Object caseWelcomeFileList(WelcomeFileList object) { - return createWelcomeFileListAdapter(); - } - public Object caseWelcomeFile(WelcomeFile object) { - return createWelcomeFileAdapter(); - } - public Object caseTagLibRef(TagLibRef object) { - return createTagLibRefAdapter(); - } - public Object caseSecurityConstraint(SecurityConstraint object) { - return createSecurityConstraintAdapter(); - } - public Object caseWebResourceCollection(WebResourceCollection object) { - return createWebResourceCollectionAdapter(); - } - public Object caseURLPatternType(URLPatternType object) { - return createURLPatternTypeAdapter(); - } - public Object caseHTTPMethodType(HTTPMethodType object) { - return createHTTPMethodTypeAdapter(); - } - public Object caseAuthConstraint(AuthConstraint object) { - return createAuthConstraintAdapter(); - } - public Object caseUserDataConstraint(UserDataConstraint object) { - return createUserDataConstraintAdapter(); - } - public Object caseLoginConfig(LoginConfig object) { - return createLoginConfigAdapter(); - } - public Object caseFormLoginConfig(FormLoginConfig object) { - return createFormLoginConfigAdapter(); - } - public Object caseMimeMapping(MimeMapping object) { - return createMimeMappingAdapter(); - } - public Object caseSessionConfig(SessionConfig object) { - return createSessionConfigAdapter(); - } - public Object caseServletMapping(ServletMapping object) { - return createServletMappingAdapter(); - } - public Object caseServlet(Servlet object) { - return createServletAdapter(); - } - public Object caseWebType(WebType object) { - return createWebTypeAdapter(); - } - public Object caseServletType(ServletType object) { - return createServletTypeAdapter(); - } - public Object caseJSPType(JSPType object) { - return createJSPTypeAdapter(); - } - public Object caseInitParam(InitParam object) { - return createInitParamAdapter(); - } - public Object caseFilter(Filter object) { - return createFilterAdapter(); - } - public Object caseFilterMapping(FilterMapping object) { - return createFilterMappingAdapter(); - } - public Object caseListener(Listener object) { - return createListenerAdapter(); - } - public Object caseRoleNameType(RoleNameType object) { - return createRoleNameTypeAdapter(); - } - public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { - return createLocalEncodingMappingListAdapter(); - } - public Object caseLocalEncodingMapping(LocalEncodingMapping object) { - return createLocalEncodingMappingAdapter(); - } - }; - - public Adapter createAdapter(Notifier target) { - return (Adapter)sw.doSwitch((EObject)target); - } - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - public Adapter createWebAppAdapter() { - return null; - } - - public Adapter createContextParamAdapter() { - return null; - } - - public Adapter createErrorPageAdapter() { - return null; - } - - public Adapter createExceptionTypeErrorPageAdapter() { - return null; - } - - public Adapter createErrorCodeErrorPageAdapter() { - return null; - } - - public Adapter createWelcomeFileListAdapter() { - return null; - } - - public Adapter createWelcomeFileAdapter() { - return null; - } - - public Adapter createTagLibRefAdapter() { - return null; - } - - public Adapter createTagLibRefTypeAdapter() { - return null; - } - - public Adapter createSecurityConstraintAdapter() { - return null; - } - - public Adapter createWebResourceCollectionAdapter() { - return null; - } - - public Adapter createURLPatternTypeAdapter() { - return null; - } - - public Adapter createHTTPMethodTypeAdapter() { - return null; - } - - public Adapter createAuthConstraintAdapter() { - return null; - } - - public Adapter createUserDataConstraintAdapter() { - return null; - } - - public Adapter createLoginConfigAdapter() { - return null; - } - - public Adapter createFormLoginConfigAdapter() { - return null; - } - - public Adapter createMimeMappingAdapter() { - return null; - } - - public Adapter createSessionConfigAdapter() { - return null; - } - - public Adapter createServletMappingAdapter() { - return null; - } - - public Adapter createServletAdapter() { - return null; - } - - public Adapter createWebTypeAdapter() { - return null; - } - - public Adapter createServletTypeAdapter() { - return null; - } - - public Adapter createJSPTypeAdapter() { - return null; - } - - public Adapter createInitParamAdapter() { - return null; - } - - public Adapter createFilterAdapter() { - return null; - } - - public Adapter createFilterMappingAdapter() { - return null; - } - - public Adapter createListenerAdapter() { - return null; - } - - public Adapter createRoleNameTypeAdapter() { - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForTypeGen(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected WebapplicationSwitch modelSwitch = - new WebapplicationSwitch() { - public Object caseWebApp(WebApp object) { - return createWebAppAdapter(); - } - public Object caseContextParam(ContextParam object) { - return createContextParamAdapter(); - } - public Object caseServlet(Servlet object) { - return createServletAdapter(); - } - public Object caseServletMapping(ServletMapping object) { - return createServletMappingAdapter(); - } - public Object caseSessionConfig(SessionConfig object) { - return createSessionConfigAdapter(); - } - public Object caseMimeMapping(MimeMapping object) { - return createMimeMappingAdapter(); - } - public Object caseWelcomeFileList(WelcomeFileList object) { - return createWelcomeFileListAdapter(); - } - public Object caseErrorPage(ErrorPage object) { - return createErrorPageAdapter(); - } - public Object caseTagLibRef(TagLibRef object) { - return createTagLibRefAdapter(); - } - public Object caseTagLibRefType(TagLibRefType object) { - return createTagLibRefTypeAdapter(); - } - public Object caseSecurityConstraint(SecurityConstraint object) { - return createSecurityConstraintAdapter(); - } - public Object caseWebResourceCollection(WebResourceCollection object) { - return createWebResourceCollectionAdapter(); - } - public Object caseAuthConstraint(AuthConstraint object) { - return createAuthConstraintAdapter(); - } - public Object caseUserDataConstraint(UserDataConstraint object) { - return createUserDataConstraintAdapter(); - } - public Object caseLoginConfig(LoginConfig object) { - return createLoginConfigAdapter(); - } - public Object caseFormLoginConfig(FormLoginConfig object) { - return createFormLoginConfigAdapter(); - } - public Object caseInitParam(InitParam object) { - return createInitParamAdapter(); - } - public Object caseWebType(WebType object) { - return createWebTypeAdapter(); - } - public Object caseServletType(ServletType object) { - return createServletTypeAdapter(); - } - public Object caseJSPType(JSPType object) { - return createJSPTypeAdapter(); - } - public Object caseURLPatternType(URLPatternType object) { - return createURLPatternTypeAdapter(); - } - public Object caseRoleNameType(RoleNameType object) { - return createRoleNameTypeAdapter(); - } - public Object caseWelcomeFile(WelcomeFile object) { - return createWelcomeFileAdapter(); - } - public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { - return createExceptionTypeErrorPageAdapter(); - } - public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { - return createErrorCodeErrorPageAdapter(); - } - public Object caseFilterMapping(FilterMapping object) { - return createFilterMappingAdapter(); - } - public Object caseFilter(Filter object) { - return createFilterAdapter(); - } - public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { - return createLocalEncodingMappingListAdapter(); - } - public Object caseLocalEncodingMapping(LocalEncodingMapping object) { - return createLocalEncodingMappingAdapter(); - } - public Object caseHTTPMethodType(HTTPMethodType object) { - return createHTTPMethodTypeAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return createJNDIEnvRefsGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapterGen(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * By default create methods return null so that we can easily ignore cases. - * It's useful to ignore a case when inheritance will catch all the cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWebAppAdapterGen() { - - return null; - } - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createContextParamAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createErrorPageAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createExceptionTypeErrorPageAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createErrorCodeErrorPageAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWelcomeFileListAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWelcomeFileAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createTagLibRefAdapterGen() { - return null; - } - - public Adapter createTagLibRefTypeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSecurityConstraintAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWebResourceCollectionAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createURLPatternTypeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAuthConstraintAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createUserDataConstraintAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createLoginConfigAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createFormLoginConfigAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createMimeMappingAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createSessionConfigAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createServletMappingAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createServletAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createWebTypeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createServletTypeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createJSPTypeAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createInitParamAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createFilterAdapterGen() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createFilterMappingAdapterGen() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMappingList Local Encoding Mapping List}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMappingList - * @generated - */ - public Adapter createLocalEncodingMappingListAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMapping Local Encoding Mapping}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webapplication.LocalEncodingMapping - * @generated - */ - public Adapter createLocalEncodingMappingAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup JNDI Env Refs Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.JNDIEnvRefsGroup - * @generated - */ - public Adapter createJNDIEnvRefsGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createRoleNameTypeAdapterGen() { - return null; - } - -} //WebapplicationAdapterFactory - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationSwitch.java deleted file mode 100644 index c95cbfc13..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webapplication/util/WebapplicationSwitch.java +++ /dev/null @@ -1,776 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webapplication.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup; -import org.eclipse.jst.j2ee.webapplication.AuthConstraint; -import org.eclipse.jst.j2ee.webapplication.ContextParam; -import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage; -import org.eclipse.jst.j2ee.webapplication.ErrorPage; -import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage; -import org.eclipse.jst.j2ee.webapplication.Filter; -import org.eclipse.jst.j2ee.webapplication.FilterMapping; -import org.eclipse.jst.j2ee.webapplication.FormLoginConfig; -import org.eclipse.jst.j2ee.webapplication.HTTPMethodType; -import org.eclipse.jst.j2ee.webapplication.InitParam; -import org.eclipse.jst.j2ee.webapplication.JSPType; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping; -import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList; -import org.eclipse.jst.j2ee.webapplication.LoginConfig; -import org.eclipse.jst.j2ee.webapplication.MimeMapping; -import org.eclipse.jst.j2ee.webapplication.RoleNameType; -import org.eclipse.jst.j2ee.webapplication.SecurityConstraint; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.SessionConfig; -import org.eclipse.jst.j2ee.webapplication.TagLibRef; -import org.eclipse.jst.j2ee.webapplication.URLPatternType; -import org.eclipse.jst.j2ee.webapplication.UserDataConstraint; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebResourceCollection; -import org.eclipse.jst.j2ee.webapplication.WebType; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.WelcomeFile; -import org.eclipse.jst.j2ee.webapplication.WelcomeFileList; - - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.webapplication.WebapplicationPackage - * @generated - */ -public class WebapplicationSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static WebapplicationPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public WebapplicationSwitch() { - if (modelPackage == null) { - modelPackage = WebapplicationPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case WebapplicationPackage.WEB_APP: { - WebApp webApp = (WebApp)theEObject; - Object result = caseWebApp(webApp); - if (result == null) result = caseJNDIEnvRefsGroup(webApp); - if (result == null) result = caseCompatibilityDescriptionGroup(webApp); - if (result == null) result = caseDescriptionGroup(webApp); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.CONTEXT_PARAM: { - ContextParam contextParam = (ContextParam)theEObject; - Object result = caseContextParam(contextParam); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.SERVLET: { - Servlet servlet = (Servlet)theEObject; - Object result = caseServlet(servlet); - if (result == null) result = caseCompatibilityDescriptionGroup(servlet); - if (result == null) result = caseDescriptionGroup(servlet); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.SERVLET_MAPPING: { - ServletMapping servletMapping = (ServletMapping)theEObject; - Object result = caseServletMapping(servletMapping); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.SESSION_CONFIG: { - SessionConfig sessionConfig = (SessionConfig)theEObject; - Object result = caseSessionConfig(sessionConfig); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.MIME_MAPPING: { - MimeMapping mimeMapping = (MimeMapping)theEObject; - Object result = caseMimeMapping(mimeMapping); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.WELCOME_FILE_LIST: { - WelcomeFileList welcomeFileList = (WelcomeFileList)theEObject; - Object result = caseWelcomeFileList(welcomeFileList); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.ERROR_PAGE: { - ErrorPage errorPage = (ErrorPage)theEObject; - Object result = caseErrorPage(errorPage); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.TAG_LIB_REF: { - TagLibRef tagLibRef = (TagLibRef)theEObject; - Object result = caseTagLibRef(tagLibRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.SECURITY_CONSTRAINT: { - SecurityConstraint securityConstraint = (SecurityConstraint)theEObject; - Object result = caseSecurityConstraint(securityConstraint); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.WEB_RESOURCE_COLLECTION: { - WebResourceCollection webResourceCollection = (WebResourceCollection)theEObject; - Object result = caseWebResourceCollection(webResourceCollection); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.AUTH_CONSTRAINT: { - AuthConstraint authConstraint = (AuthConstraint)theEObject; - Object result = caseAuthConstraint(authConstraint); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.USER_DATA_CONSTRAINT: { - UserDataConstraint userDataConstraint = (UserDataConstraint)theEObject; - Object result = caseUserDataConstraint(userDataConstraint); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.LOGIN_CONFIG: { - LoginConfig loginConfig = (LoginConfig)theEObject; - Object result = caseLoginConfig(loginConfig); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.FORM_LOGIN_CONFIG: { - FormLoginConfig formLoginConfig = (FormLoginConfig)theEObject; - Object result = caseFormLoginConfig(formLoginConfig); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.INIT_PARAM: { - InitParam initParam = (InitParam)theEObject; - Object result = caseInitParam(initParam); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.SERVLET_TYPE: { - ServletType servletType = (ServletType)theEObject; - Object result = caseServletType(servletType); - if (result == null) result = caseWebType(servletType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.JSP_TYPE: { - JSPType jspType = (JSPType)theEObject; - Object result = caseJSPType(jspType); - if (result == null) result = caseWebType(jspType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.URL_PATTERN_TYPE: { - URLPatternType urlPatternType = (URLPatternType)theEObject; - Object result = caseURLPatternType(urlPatternType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.ROLE_NAME_TYPE: { - RoleNameType roleNameType = (RoleNameType)theEObject; - Object result = caseRoleNameType(roleNameType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.WELCOME_FILE: { - WelcomeFile welcomeFile = (WelcomeFile)theEObject; - Object result = caseWelcomeFile(welcomeFile); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.EXCEPTION_TYPE_ERROR_PAGE: { - ExceptionTypeErrorPage exceptionTypeErrorPage = (ExceptionTypeErrorPage)theEObject; - Object result = caseExceptionTypeErrorPage(exceptionTypeErrorPage); - if (result == null) result = caseErrorPage(exceptionTypeErrorPage); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.ERROR_CODE_ERROR_PAGE: { - ErrorCodeErrorPage errorCodeErrorPage = (ErrorCodeErrorPage)theEObject; - Object result = caseErrorCodeErrorPage(errorCodeErrorPage); - if (result == null) result = caseErrorPage(errorCodeErrorPage); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.FILTER_MAPPING: { - FilterMapping filterMapping = (FilterMapping)theEObject; - Object result = caseFilterMapping(filterMapping); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.FILTER: { - Filter filter = (Filter)theEObject; - Object result = caseFilter(filter); - if (result == null) result = caseCompatibilityDescriptionGroup(filter); - if (result == null) result = caseDescriptionGroup(filter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST: { - LocalEncodingMappingList localEncodingMappingList = (LocalEncodingMappingList)theEObject; - Object result = caseLocalEncodingMappingList(localEncodingMappingList); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.LOCAL_ENCODING_MAPPING: { - LocalEncodingMapping localEncodingMapping = (LocalEncodingMapping)theEObject; - Object result = caseLocalEncodingMapping(localEncodingMapping); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WebapplicationPackage.HTTP_METHOD_TYPE: { - HTTPMethodType httpMethodType = (HTTPMethodType)theEObject; - Object result = caseHTTPMethodType(httpMethodType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Web App'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web App'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebApp(WebApp object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Context Param'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Context Param'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseContextParam(ContextParam object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Servlet'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Servlet'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServlet(Servlet object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Servlet Mapping'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Servlet Mapping'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServletMapping(ServletMapping object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Session Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Session Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSessionConfig(SessionConfig object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Mime Mapping'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Mime Mapping'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMimeMapping(MimeMapping object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Welcome File List'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Welcome File List'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWelcomeFileList(WelcomeFileList object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Error Page'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Error Page'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseErrorPage(ErrorPage object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Tag Lib Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Tag Lib Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseTagLibRef(TagLibRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Security Constraint'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Security Constraint'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSecurityConstraint(SecurityConstraint object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Resource Collection'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Resource Collection'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebResourceCollection(WebResourceCollection object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Auth Constraint'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Auth Constraint'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseAuthConstraint(AuthConstraint object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'User Data Constraint'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'User Data Constraint'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseUserDataConstraint(UserDataConstraint object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Login Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Login Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseLoginConfig(LoginConfig object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Form Login Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Form Login Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseFormLoginConfig(FormLoginConfig object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Init Param'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Init Param'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseInitParam(InitParam object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebType(WebType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Servlet Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Servlet Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServletType(ServletType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'JSP Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JSP Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJSPType(JSPType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'URL Pattern Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'URL Pattern Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseURLPatternType(URLPatternType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Role Name Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Role Name Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRoleNameType(RoleNameType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Welcome File'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Welcome File'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWelcomeFile(WelcomeFile object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Exception Type Error Page'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Exception Type Error Page'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseExceptionTypeErrorPage(ExceptionTypeErrorPage object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Error Code Error Page'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Error Code Error Page'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseErrorCodeErrorPage(ErrorCodeErrorPage object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Filter Mapping'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Filter Mapping'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseFilterMapping(FilterMapping object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Filter'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Filter'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseFilter(Filter object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Local Encoding Mapping List'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Local Encoding Mapping List'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseLocalEncodingMappingList(LocalEncodingMappingList object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Local Encoding Mapping'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Local Encoding Mapping'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseLocalEncodingMapping(LocalEncodingMapping object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'HTTP Method Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'HTTP Method Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseHTTPMethodType(HTTPMethodType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'JNDI Env Refs Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //WebapplicationSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ComponentScopedRefsImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ComponentScopedRefsImpl.java new file mode 100644 index 000000000..513b44170 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ComponentScopedRefsImpl.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model object 'Component Scoped Refs'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ComponentScopedRefsImpl#getComponentName Component Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ComponentScopedRefsImpl#getServiceRefs Service Refs}
  • + *
+ *

+ * + * @generated + */ +public class ComponentScopedRefsImpl extends EObjectImpl implements ComponentScopedRefs { + /** + * The default value of the '{@link #getComponentName() Component Name}' attribute. + * + * + * @see #getComponentName() + * @generated + * @ordered + */ + protected static final String COMPONENT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getComponentName() Component Name}' attribute. + * + * + * @see #getComponentName() + * @generated + * @ordered + */ + protected String componentName = COMPONENT_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. + * + * + * @see #getServiceRefs() + * @generated + * @ordered + */ + protected EList serviceRefs = null; + + /** + * + * + * @generated + */ + protected ComponentScopedRefsImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return Webservice_clientPackage.eINSTANCE.getComponentScopedRefs(); + } + + /** + * + * + * @generated + */ + public String getComponentName() { + return componentName; + } + + /** + * + * + * @generated + */ + public void setComponentName(String newComponentName) { + String oldComponentName = componentName; + componentName = newComponentName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME, oldComponentName, componentName)); + } + + /** + * + * + * @generated + */ + public EList getServiceRefs() { + if (serviceRefs == null) { + serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS); + } + return serviceRefs; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: + return getComponentName(); + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: + return getServiceRefs(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: + setComponentName((String)newValue); + return; + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: + setComponentName(COMPONENT_NAME_EDEFAULT); + return; + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: + getServiceRefs().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: + return COMPONENT_NAME_EDEFAULT == null ? componentName != null : !COMPONENT_NAME_EDEFAULT.equals(componentName); + case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (componentName: ");//$NON-NLS-1$ + result.append(componentName); + result.append(')'); + return result.toString(); + } + +} //ComponentScopedRefsImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/HandlerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/HandlerImpl.java new file mode 100644 index 000000000..5be602f3b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/HandlerImpl.java @@ -0,0 +1,473 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.ParamValue; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model object 'Handler'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getHandlerName Handler Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getSoapRoles Soap Roles}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getPortNames Port Names}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getHandlerClass Handler Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getInitParams Init Params}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getSoapHeaders Soap Headers}
  • + *
+ *

+ * + * @generated + */ +public class HandlerImpl extends CompatibilityDescriptionGroupImpl implements Handler { + /** + * The default value of the '{@link #getHandlerName() Handler Name}' attribute. + * + * + * @see #getHandlerName() + * @generated + * @ordered + */ + protected static final String HANDLER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHandlerName() Handler Name}' attribute. + * + * + * @see #getHandlerName() + * @generated + * @ordered + */ + protected String handlerName = HANDLER_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getSoapRoles() Soap Roles}' attribute list. + * + * + * @see #getSoapRoles() + * @generated + * @ordered + */ + protected EList soapRoles = null; + + /** + * The cached value of the '{@link #getPortNames() Port Names}' attribute list. + * + * + * @see #getPortNames() + * @generated + * @ordered + */ + protected EList portNames = null; + + /** + * The cached value of the '{@link #getHandlerClass() Handler Class}' reference. + * + * + * @see #getHandlerClass() + * @generated + * @ordered + */ + protected JavaClass handlerClass = null; + + /** + * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. + * + * + * @see #getInitParams() + * @generated + * @ordered + */ + protected EList initParams = null; + + /** + * The cached value of the '{@link #getSoapHeaders() Soap Headers}' containment reference list. + * + * + * @see #getSoapHeaders() + * @generated + * @ordered + */ + protected EList soapHeaders = null; + + /** + * + * + * @generated + */ + protected HandlerImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return Webservice_clientPackage.eINSTANCE.getHandler(); + } + + /** + * + * + * @generated + */ + public String getHandlerName() { + return handlerName; + } + + /** + * + * + * @generated + */ + public void setHandlerName(String newHandlerName) { + String oldHandlerName = handlerName; + handlerName = newHandlerName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.HANDLER__HANDLER_NAME, oldHandlerName, handlerName)); + } + + /** + * + * + * @generated + */ + public EList getSoapHeaders() { + if (soapHeaders == null) { + soapHeaders = new EObjectContainmentEList(QName.class, this, Webservice_clientPackage.HANDLER__SOAP_HEADERS); + } + return soapHeaders; + } + + /** + * + * + * @generated + */ + public EList getSoapRoles() { + if (soapRoles == null) { + soapRoles = new EDataTypeUniqueEList(String.class, this, Webservice_clientPackage.HANDLER__SOAP_ROLES); + } + return soapRoles; + } + + /** + * + * + * @generated + */ + public EList getPortNames() { + if (portNames == null) { + portNames = new EDataTypeUniqueEList(String.class, this, Webservice_clientPackage.HANDLER__PORT_NAMES); + } + return portNames; + } + + /** + * + * + * @generated + */ + public JavaClass getHandlerClass() { + if (handlerClass != null && handlerClass.eIsProxy()) { + JavaClass oldHandlerClass = handlerClass; + handlerClass = (JavaClass)eResolveProxy((InternalEObject)handlerClass); + if (handlerClass != oldHandlerClass) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); + } + } + return handlerClass; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetHandlerClass() { + return handlerClass; + } + + /** + * + * + * @generated + */ + public void setHandlerClass(JavaClass newHandlerClass) { + JavaClass oldHandlerClass = handlerClass; + handlerClass = newHandlerClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); + } + + /** + * + * + * @generated + */ + public EList getInitParams() { + if (initParams == null) { + initParams = new EObjectContainmentEList(ParamValue.class, this, Webservice_clientPackage.HANDLER__INIT_PARAMS); + } + return initParams; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case Webservice_clientPackage.HANDLER__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.HANDLER__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.HANDLER__INIT_PARAMS: + return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.HANDLER__SOAP_HEADERS: + return ((InternalEList)getSoapHeaders()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.HANDLER__ICONS: + return getIcons(); + case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: + return getDisplayNames(); + case Webservice_clientPackage.HANDLER__DESCRIPTIONS: + return getDescriptions(); + case Webservice_clientPackage.HANDLER__SMALL_ICON: + return getSmallIcon(); + case Webservice_clientPackage.HANDLER__LARGE_ICON: + return getLargeIcon(); + case Webservice_clientPackage.HANDLER__DESCRIPTION: + return getDescription(); + case Webservice_clientPackage.HANDLER__DISPLAY_NAME: + return getDisplayName(); + case Webservice_clientPackage.HANDLER__HANDLER_NAME: + return getHandlerName(); + case Webservice_clientPackage.HANDLER__SOAP_ROLES: + return getSoapRoles(); + case Webservice_clientPackage.HANDLER__PORT_NAMES: + return getPortNames(); + case Webservice_clientPackage.HANDLER__HANDLER_CLASS: + if (resolve) return getHandlerClass(); + return basicGetHandlerClass(); + case Webservice_clientPackage.HANDLER__INIT_PARAMS: + return getInitParams(); + case Webservice_clientPackage.HANDLER__SOAP_HEADERS: + return getSoapHeaders(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.HANDLER__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case Webservice_clientPackage.HANDLER__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case Webservice_clientPackage.HANDLER__DESCRIPTION: + setDescription((String)newValue); + return; + case Webservice_clientPackage.HANDLER__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case Webservice_clientPackage.HANDLER__HANDLER_NAME: + setHandlerName((String)newValue); + return; + case Webservice_clientPackage.HANDLER__SOAP_ROLES: + getSoapRoles().clear(); + getSoapRoles().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__PORT_NAMES: + getPortNames().clear(); + getPortNames().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__HANDLER_CLASS: + setHandlerClass((JavaClass)newValue); + return; + case Webservice_clientPackage.HANDLER__INIT_PARAMS: + getInitParams().clear(); + getInitParams().addAll((Collection)newValue); + return; + case Webservice_clientPackage.HANDLER__SOAP_HEADERS: + getSoapHeaders().clear(); + getSoapHeaders().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.HANDLER__ICONS: + getIcons().clear(); + return; + case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case Webservice_clientPackage.HANDLER__DESCRIPTIONS: + getDescriptions().clear(); + return; + case Webservice_clientPackage.HANDLER__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case Webservice_clientPackage.HANDLER__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case Webservice_clientPackage.HANDLER__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case Webservice_clientPackage.HANDLER__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case Webservice_clientPackage.HANDLER__HANDLER_NAME: + setHandlerName(HANDLER_NAME_EDEFAULT); + return; + case Webservice_clientPackage.HANDLER__SOAP_ROLES: + getSoapRoles().clear(); + return; + case Webservice_clientPackage.HANDLER__PORT_NAMES: + getPortNames().clear(); + return; + case Webservice_clientPackage.HANDLER__HANDLER_CLASS: + setHandlerClass((JavaClass)null); + return; + case Webservice_clientPackage.HANDLER__INIT_PARAMS: + getInitParams().clear(); + return; + case Webservice_clientPackage.HANDLER__SOAP_HEADERS: + getSoapHeaders().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.HANDLER__ICONS: + return icons != null && !icons.isEmpty(); + case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case Webservice_clientPackage.HANDLER__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case Webservice_clientPackage.HANDLER__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case Webservice_clientPackage.HANDLER__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case Webservice_clientPackage.HANDLER__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case Webservice_clientPackage.HANDLER__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case Webservice_clientPackage.HANDLER__HANDLER_NAME: + return HANDLER_NAME_EDEFAULT == null ? handlerName != null : !HANDLER_NAME_EDEFAULT.equals(handlerName); + case Webservice_clientPackage.HANDLER__SOAP_ROLES: + return soapRoles != null && !soapRoles.isEmpty(); + case Webservice_clientPackage.HANDLER__PORT_NAMES: + return portNames != null && !portNames.isEmpty(); + case Webservice_clientPackage.HANDLER__HANDLER_CLASS: + return handlerClass != null; + case Webservice_clientPackage.HANDLER__INIT_PARAMS: + return initParams != null && !initParams.isEmpty(); + case Webservice_clientPackage.HANDLER__SOAP_HEADERS: + return soapHeaders != null && !soapHeaders.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (handlerName: ");//$NON-NLS-1$ + result.append(handlerName); + result.append(", soapRoles: ");//$NON-NLS-1$ + result.append(soapRoles); + result.append(", portNames: ");//$NON-NLS-1$ + result.append(portNames); + result.append(')'); + return result.toString(); + } + +} //HandlerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/PortComponentRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/PortComponentRefImpl.java new file mode 100644 index 000000000..23fae9804 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/PortComponentRefImpl.java @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model object 'Port Component Ref'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.PortComponentRefImpl#getPortComponentLink Port Component Link}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.PortComponentRefImpl#getServiceEndpointInterface Service Endpoint Interface}
  • + *
+ *

+ * + * @generated + */ +public class PortComponentRefImpl extends EObjectImpl implements PortComponentRef { + /** + * The default value of the '{@link #getPortComponentLink() Port Component Link}' attribute. + * + * + * @see #getPortComponentLink() + * @generated + * @ordered + */ + protected static final String PORT_COMPONENT_LINK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortComponentLink() Port Component Link}' attribute. + * + * + * @see #getPortComponentLink() + * @generated + * @ordered + */ + protected String portComponentLink = PORT_COMPONENT_LINK_EDEFAULT; + + /** + * The cached value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' reference. + * + * + * @see #getServiceEndpointInterface() + * @generated + * @ordered + */ + protected JavaClass serviceEndpointInterface = null; + + /** + * + * + * @generated + */ + protected PortComponentRefImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return Webservice_clientPackage.eINSTANCE.getPortComponentRef(); + } + + /** + * + * + * @generated + */ + public String getPortComponentLink() { + return portComponentLink; + } + + /** + * + * + * @generated + */ + public void setPortComponentLink(String newPortComponentLink) { + String oldPortComponentLink = portComponentLink; + portComponentLink = newPortComponentLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK, oldPortComponentLink, portComponentLink)); + } + + /** + * + * + * @generated + */ + public JavaClass getServiceEndpointInterface() { + if (serviceEndpointInterface != null && serviceEndpointInterface.eIsProxy()) { + JavaClass oldServiceEndpointInterface = serviceEndpointInterface; + serviceEndpointInterface = (JavaClass)eResolveProxy((InternalEObject)serviceEndpointInterface); + if (serviceEndpointInterface != oldServiceEndpointInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); + } + } + return serviceEndpointInterface; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetServiceEndpointInterface() { + return serviceEndpointInterface; + } + + /** + * + * + * @generated + */ + public void setServiceEndpointInterface(JavaClass newServiceEndpointInterface) { + JavaClass oldServiceEndpointInterface = serviceEndpointInterface; + serviceEndpointInterface = newServiceEndpointInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: + return getPortComponentLink(); + case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: + if (resolve) return getServiceEndpointInterface(); + return basicGetServiceEndpointInterface(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: + setPortComponentLink((String)newValue); + return; + case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: + setServiceEndpointInterface((JavaClass)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: + setPortComponentLink(PORT_COMPONENT_LINK_EDEFAULT); + return; + case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: + setServiceEndpointInterface((JavaClass)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: + return PORT_COMPONENT_LINK_EDEFAULT == null ? portComponentLink != null : !PORT_COMPONENT_LINK_EDEFAULT.equals(portComponentLink); + case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: + return serviceEndpointInterface != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (portComponentLink: ");//$NON-NLS-1$ + result.append(portComponentLink); + result.append(')'); + return result.toString(); + } + +} //PortComponentRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ServiceRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ServiceRefImpl.java new file mode 100644 index 000000000..bdd59da5d --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/ServiceRefImpl.java @@ -0,0 +1,575 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model object 'Service Ref'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceInterface Service Interface}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceRefName Service Ref Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getWsdlFile Wsdl File}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getJaxrpcMappingFile Jaxrpc Mapping File}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getPortComponentRefs Port Component Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getHandlers Handlers}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceQname Service Qname}
  • + *
+ *

+ * + * @generated + */ +public class ServiceRefImpl extends CompatibilityDescriptionGroupImpl implements ServiceRef { + /** + * The cached value of the '{@link #getServiceInterface() Service Interface}' reference. + * + * + * @see #getServiceInterface() + * @generated + * @ordered + */ + protected JavaClass serviceInterface = null; + + /** + * The default value of the '{@link #getServiceRefName() Service Ref Name}' attribute. + * + * + * @see #getServiceRefName() + * @generated + * @ordered + */ + protected static final String SERVICE_REF_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceRefName() Service Ref Name}' attribute. + * + * + * @see #getServiceRefName() + * @generated + * @ordered + */ + protected String serviceRefName = SERVICE_REF_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getWsdlFile() Wsdl File}' attribute. + * + * + * @see #getWsdlFile() + * @generated + * @ordered + */ + protected static final String WSDL_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWsdlFile() Wsdl File}' attribute. + * + * + * @see #getWsdlFile() + * @generated + * @ordered + */ + protected String wsdlFile = WSDL_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. + * + * + * @see #getJaxrpcMappingFile() + * @generated + * @ordered + */ + protected static final String JAXRPC_MAPPING_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. + * + * + * @see #getJaxrpcMappingFile() + * @generated + * @ordered + */ + protected String jaxrpcMappingFile = JAXRPC_MAPPING_FILE_EDEFAULT; + + /** + * The cached value of the '{@link #getPortComponentRefs() Port Component Refs}' containment reference list. + * + * + * @see #getPortComponentRefs() + * @generated + * @ordered + */ + protected EList portComponentRefs = null; + + /** + * The cached value of the '{@link #getHandlers() Handlers}' containment reference list. + * + * + * @see #getHandlers() + * @generated + * @ordered + */ + protected EList handlers = null; + + /** + * The cached value of the '{@link #getServiceQname() Service Qname}' containment reference. + * + * + * @see #getServiceQname() + * @generated + * @ordered + */ + protected QName serviceQname = null; + + /** + * + * + * @generated + */ + protected ServiceRefImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return Webservice_clientPackage.eINSTANCE.getServiceRef(); + } + + /** + * + * + * @generated + */ + public String getServiceRefName() { + return serviceRefName; + } + + /** + * + * + * @generated + */ + public void setServiceRefName(String newServiceRefName) { + String oldServiceRefName = serviceRefName; + serviceRefName = newServiceRefName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME, oldServiceRefName, serviceRefName)); + } + + /** + * + * + * @generated + */ + public String getWsdlFile() { + return wsdlFile; + } + + /** + * + * + * @generated + */ + public void setWsdlFile(String newWsdlFile) { + String oldWsdlFile = wsdlFile; + wsdlFile = newWsdlFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__WSDL_FILE, oldWsdlFile, wsdlFile)); + } + + /** + * + * + * @generated + */ + public String getJaxrpcMappingFile() { + return jaxrpcMappingFile; + } + + /** + * + * + * @generated + */ + public void setJaxrpcMappingFile(String newJaxrpcMappingFile) { + String oldJaxrpcMappingFile = jaxrpcMappingFile; + jaxrpcMappingFile = newJaxrpcMappingFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE, oldJaxrpcMappingFile, jaxrpcMappingFile)); + } + + /** + * + * + * @generated + */ + public JavaClass getServiceInterface() { + if (serviceInterface != null && serviceInterface.eIsProxy()) { + JavaClass oldServiceInterface = serviceInterface; + serviceInterface = (JavaClass)eResolveProxy((InternalEObject)serviceInterface); + if (serviceInterface != oldServiceInterface) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE, oldServiceInterface, serviceInterface)); + } + } + return serviceInterface; + } + + /** + * + * + * @generated + */ + public JavaClass basicGetServiceInterface() { + return serviceInterface; + } + + /** + * + * + * @generated + */ + public void setServiceInterface(JavaClass newServiceInterface) { + JavaClass oldServiceInterface = serviceInterface; + serviceInterface = newServiceInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE, oldServiceInterface, serviceInterface)); + } + + /** + * + * + * @generated + */ + public EList getPortComponentRefs() { + if (portComponentRefs == null) { + portComponentRefs = new EObjectContainmentEList(PortComponentRef.class, this, Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS); + } + return portComponentRefs; + } + + /** + * + * + * @generated + */ + public EList getHandlers() { + if (handlers == null) { + handlers = new EObjectContainmentEList(Handler.class, this, Webservice_clientPackage.SERVICE_REF__HANDLERS); + } + return handlers; + } + + /** + * + * + * @generated + */ + public QName getServiceQname() { + return serviceQname; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetServiceQname(QName newServiceQname, NotificationChain msgs) { + QName oldServiceQname = serviceQname; + serviceQname = newServiceQname; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, oldServiceQname, newServiceQname); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setServiceQname(QName newServiceQname) { + if (newServiceQname != serviceQname) { + NotificationChain msgs = null; + if (serviceQname != null) + msgs = ((InternalEObject)serviceQname).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, null, msgs); + if (newServiceQname != null) + msgs = ((InternalEObject)newServiceQname).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, null, msgs); + msgs = basicSetServiceQname(newServiceQname, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, newServiceQname, newServiceQname)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case Webservice_clientPackage.SERVICE_REF__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: + return ((InternalEList)getPortComponentRefs()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.SERVICE_REF__HANDLERS: + return ((InternalEList)getHandlers()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: + return basicSetServiceQname(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.SERVICE_REF__ICONS: + return getIcons(); + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: + return getDisplayNames(); + case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: + return getDescriptions(); + case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: + return getSmallIcon(); + case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: + return getLargeIcon(); + case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: + return getDescription(); + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: + return getDisplayName(); + case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: + if (resolve) return getServiceInterface(); + return basicGetServiceInterface(); + case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: + return getServiceRefName(); + case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: + return getWsdlFile(); + case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: + return getJaxrpcMappingFile(); + case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: + return getPortComponentRefs(); + case Webservice_clientPackage.SERVICE_REF__HANDLERS: + return getHandlers(); + case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: + return getServiceQname(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.SERVICE_REF__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: + setDescription((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: + setServiceInterface((JavaClass)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: + setServiceRefName((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: + setWsdlFile((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: + setJaxrpcMappingFile((String)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: + getPortComponentRefs().clear(); + getPortComponentRefs().addAll((Collection)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__HANDLERS: + getHandlers().clear(); + getHandlers().addAll((Collection)newValue); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: + setServiceQname((QName)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.SERVICE_REF__ICONS: + getIcons().clear(); + return; + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: + getDescriptions().clear(); + return; + case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: + setServiceInterface((JavaClass)null); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: + setServiceRefName(SERVICE_REF_NAME_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: + setWsdlFile(WSDL_FILE_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: + setJaxrpcMappingFile(JAXRPC_MAPPING_FILE_EDEFAULT); + return; + case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: + getPortComponentRefs().clear(); + return; + case Webservice_clientPackage.SERVICE_REF__HANDLERS: + getHandlers().clear(); + return; + case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: + setServiceQname((QName)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.SERVICE_REF__ICONS: + return icons != null && !icons.isEmpty(); + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: + return serviceInterface != null; + case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: + return SERVICE_REF_NAME_EDEFAULT == null ? serviceRefName != null : !SERVICE_REF_NAME_EDEFAULT.equals(serviceRefName); + case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: + return WSDL_FILE_EDEFAULT == null ? wsdlFile != null : !WSDL_FILE_EDEFAULT.equals(wsdlFile); + case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: + return JAXRPC_MAPPING_FILE_EDEFAULT == null ? jaxrpcMappingFile != null : !JAXRPC_MAPPING_FILE_EDEFAULT.equals(jaxrpcMappingFile); + case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: + return portComponentRefs != null && !portComponentRefs.isEmpty(); + case Webservice_clientPackage.SERVICE_REF__HANDLERS: + return handlers != null && !handlers.isEmpty(); + case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: + return serviceQname != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (serviceRefName: ");//$NON-NLS-1$ + result.append(serviceRefName); + result.append(", wsdlFile: ");//$NON-NLS-1$ + result.append(wsdlFile); + result.append(", jaxrpcMappingFile: ");//$NON-NLS-1$ + result.append(jaxrpcMappingFile); + result.append(')'); + return result.toString(); + } + +} //ServiceRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientImpl.java new file mode 100644 index 000000000..429e3fb58 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientImpl.java @@ -0,0 +1,191 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model object 'Web Services Client'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.WebServicesClientImpl#getComponentScopedRefs Component Scoped Refs}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.WebServicesClientImpl#getServiceRefs Service Refs}
  • + *
+ *

+ * + * @generated + */ +public class WebServicesClientImpl extends EObjectImpl implements WebServicesClient { + /** + * The cached value of the '{@link #getComponentScopedRefs() Component Scoped Refs}' containment reference list. + * + * + * @see #getComponentScopedRefs() + * @generated + * @ordered + */ + protected EList componentScopedRefs = null; + + /** + * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. + * + * + * @see #getServiceRefs() + * @generated + * @ordered + */ + protected EList serviceRefs = null; + + /** + * + * + * @generated + */ + protected WebServicesClientImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return Webservice_clientPackage.eINSTANCE.getWebServicesClient(); + } + + /** + * + * + * @generated + */ + public EList getComponentScopedRefs() { + if (componentScopedRefs == null) { + componentScopedRefs = new EObjectContainmentEList(ComponentScopedRefs.class, this, Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS); + } + return componentScopedRefs; + } + + /** + * + * + * @generated + */ + public EList getServiceRefs() { + if (serviceRefs == null) { + serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS); + } + return serviceRefs; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: + return ((InternalEList)getComponentScopedRefs()).basicRemove(otherEnd, msgs); + case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: + return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: + return getComponentScopedRefs(); + case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: + return getServiceRefs(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: + getComponentScopedRefs().clear(); + getComponentScopedRefs().addAll((Collection)newValue); + return; + case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: + getServiceRefs().clear(); + getServiceRefs().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: + getComponentScopedRefs().clear(); + return; + case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: + getServiceRefs().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: + return componentScopedRefs != null && !componentScopedRefs.isEmpty(); + case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: + return serviceRefs != null && !serviceRefs.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //WebServicesClientImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientResourceFactory.java new file mode 100644 index 000000000..4076e5c0b --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesClientResourceFactory.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Aug 6, 2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; +import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; + + +public class WebServicesClientResourceFactory + extends TranslatorResourceFactory { + /** + * Method registerDtds. + */ + public static void registerDtds() { + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0, "j2ee_web_services_client_1_0.dtd"); //$NON-NLS-1$ + J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SCHEMA_LOC_1_1, "j2ee_web_services_client_1_1.xsd"); //$NON-NLS-1$ + } + /** + * @param aRendererFactory + */ + public WebServicesClientResourceFactory(RendererFactory aRendererFactory) { + super(aRendererFactory); + } + + protected TranslatorResource createResource(URI uri, Renderer aRenderer) { + return new WebServicesResourceImpl(uri, aRenderer); + } + + /** + * Register myself with the Resource.Factory.Registry + */ + public static void registerWith(RendererFactory aRendererFactory) { + J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(aRendererFactory)); + } + + /** + * register using the default renderer factory. + * @see #registerWith(RendererFactory) + */ + public static void register() { + registerWith(RendererFactory.getDefaultRendererFactory()); + } + + + public static Resource.Factory getRegisteredFactory() { + return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.WEB_SERVICES_CLIENT_DD_URI_OBJ); + } + + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesResourceImpl.java new file mode 100644 index 000000000..6edcb8319 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/WebServicesResourceImpl.java @@ -0,0 +1,145 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Aug 6, 2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.internal.J2EEConstants; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.webservices.WebServicesTranslator; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesResource; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + +public class WebServicesResourceImpl extends XMLResourceImpl implements WebServicesResource { + + /** + * @param uri + * @param aRenderer + */ + public WebServicesResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + /** + * @param aRenderer + */ + public WebServicesResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /** + * Return the first element in the EList. + */ + public WebServicesClient getWebServicesClient() { + return (WebServicesClient) getRootObject(); + } + + public int getType() { + return WEB_SERVICES_CLIENT_TYPE; + } + + public String getJ2EE_1_2_SystemID() { + return J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0; + } + public String getJ2EE_1_3_SystemID() { + return J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0; + } + + public String getJ2EE_1_2_PublicID() { + return J2EEConstants.WEB_SERVICES_CLIENT_PUBLICID_1_0; + } + public String getJ2EE_1_3_PublicID() { + return J2EEConstants.WEB_SERVICES_CLIENT_PUBLICID_1_0; + } + + public String getDoctype() { + switch (getJ2EEVersionID()) { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return J2EEConstants.WEB_SERVICES_CLIENT_DOCTYPE; + default : + return null; + } + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) + * This is setting the module version on the resource. + */ + public void setDoctypeValues(String publicId, String systemId) { + int version = WEBSERVICES_1_0_ID; + super.setDoctypeValues(publicId, systemId); + super.setVersionID(version); + } + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (WEBSERVICES_1_0_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + } + syncVersionOfRootObject(); + } + /* + * Based on the J2EE version, this will set the module version + */ + public void setJ2EEVersionID(int id) { + switch (id) { + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + primSetVersionID(WEBSERVICES_1_0_ID); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + primSetVersionID(WEBSERVICES_1_0_ID); + } + syncVersionOfRootObject(); + } + /* Return J2EE version based on module version + */ + public int getJ2EEVersionID() { + switch (getModuleVersionID()) { + case J2EEVersionConstants.WEBSERVICES_1_0_ID : + return J2EEVersionConstants.J2EE_1_3_ID; + default : + return J2EEVersionConstants.J2EE_1_3_ID; + } + } + /** + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return WebServicesTranslator.INSTANCE; + } + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return WEBSERVICES_1_0_ID; + } + /* (non-Javadoc) + * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() + */ + protected void syncVersionOfRootObject() { + //not model for J2EE 1.4 so no operation required. + } + +} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientFactoryImpl.java new file mode 100644 index 000000000..b4c89c2fa --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientFactoryImpl.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class Webservice_clientFactoryImpl extends EFactoryImpl implements Webservice_clientFactory { + /** + * Creates and instance of the factory. + * + * + * @generated + */ + public Webservice_clientFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case Webservice_clientPackage.SERVICE_REF: return createServiceRef(); + case Webservice_clientPackage.PORT_COMPONENT_REF: return createPortComponentRef(); + case Webservice_clientPackage.HANDLER: return createHandler(); + case Webservice_clientPackage.WEB_SERVICES_CLIENT: return createWebServicesClient(); + case Webservice_clientPackage.COMPONENT_SCOPED_REFS: return createComponentScopedRefs(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public ServiceRef createServiceRef() { + ServiceRefImpl serviceRef = new ServiceRefImpl(); + return serviceRef; + } + + /** + * + * + * @generated + */ + public PortComponentRef createPortComponentRef() { + PortComponentRefImpl portComponentRef = new PortComponentRefImpl(); + return portComponentRef; + } + + /** + * + * + * @generated + */ + public Handler createHandler() { + HandlerImpl handler = new HandlerImpl(); + return handler; + } + + /** + * + * + * @generated + */ + public WebServicesClient createWebServicesClient() { + WebServicesClientImpl webServicesClient = new WebServicesClientImpl(); + return webServicesClient; + } + + /** + * + * + * @generated + */ + public ComponentScopedRefs createComponentScopedRefs() { + ComponentScopedRefsImpl componentScopedRefs = new ComponentScopedRefsImpl(); + return componentScopedRefs; + } + + /** + * + * + * @generated + */ + public Webservice_clientPackage getWebservice_clientPackage() { + return (Webservice_clientPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + public static Webservice_clientPackage getPackage() { + return Webservice_clientPackage.eINSTANCE; + } +} //Webservice_clientFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientPackageImpl.java new file mode 100644 index 000000000..709a5fe27 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/impl/Webservice_clientPackageImpl.java @@ -0,0 +1,531 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.JavaRefPackage; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class Webservice_clientPackageImpl extends EPackageImpl implements Webservice_clientPackage { + /** + * + * + * @generated + */ + private EClass serviceRefEClass = null; + + /** + * + * + * @generated + */ + private EClass portComponentRefEClass = null; + + /** + * + * + * @generated + */ + private EClass handlerEClass = null; + + /** + * + * + * @generated + */ + private EClass webServicesClientEClass = null; + + /** + * + * + * @generated + */ + private EClass componentScopedRefsEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage#eNS_URI + * @see #init() + * @generated + */ + private Webservice_clientPackageImpl() { + super(eNS_URI, Webservice_clientFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *

Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *

Invocation of this method will not affect any packages that have + * already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static Webservice_clientPackage init() { + if (isInited) return (Webservice_clientPackage)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); + + // Obtain or create and register package. + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Webservice_clientPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + + // Step 1: create meta-model objects + theWebservice_clientPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theWebservice_clientPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theWebservice_clientPackage; + } + + /** + * + * + * @generated + */ + public EClass getServiceRef() { + return serviceRefEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getServiceRef_ServiceRefName() { + return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getServiceRef_WsdlFile() { + return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getServiceRef_JaxrpcMappingFile() { + return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getServiceRef_ServiceInterface() { + return (EReference)serviceRefEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getServiceRef_PortComponentRefs() { + return (EReference)serviceRefEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getServiceRef_Handlers() { + return (EReference)serviceRefEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getServiceRef_ServiceQname() { + return (EReference)serviceRefEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getPortComponentRef() { + return portComponentRefEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponentRef_PortComponentLink() { + return (EAttribute)portComponentRefEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPortComponentRef_ServiceEndpointInterface() { + return (EReference)portComponentRefEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getHandler() { + return handlerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHandler_HandlerName() { + return (EAttribute)handlerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getHandler_SoapHeaders() { + return (EReference)handlerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getHandler_SoapRoles() { + return (EAttribute)handlerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getHandler_PortNames() { + return (EAttribute)handlerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getHandler_HandlerClass() { + return (EReference)handlerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getHandler_InitParams() { + return (EReference)handlerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getWebServicesClient() { + return webServicesClientEClass; + } + + /** + * + * + * @generated + */ + public EReference getWebServicesClient_ComponentScopedRefs() { + return (EReference)webServicesClientEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getWebServicesClient_ServiceRefs() { + return (EReference)webServicesClientEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getComponentScopedRefs() { + return componentScopedRefsEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getComponentScopedRefs_ComponentName() { + return (EAttribute)componentScopedRefsEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getComponentScopedRefs_ServiceRefs() { + return (EReference)componentScopedRefsEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public Webservice_clientFactory getWebservice_clientFactory() { + return (Webservice_clientFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + serviceRefEClass = createEClass(SERVICE_REF); + createEReference(serviceRefEClass, SERVICE_REF__SERVICE_INTERFACE); + createEAttribute(serviceRefEClass, SERVICE_REF__SERVICE_REF_NAME); + createEAttribute(serviceRefEClass, SERVICE_REF__WSDL_FILE); + createEAttribute(serviceRefEClass, SERVICE_REF__JAXRPC_MAPPING_FILE); + createEReference(serviceRefEClass, SERVICE_REF__PORT_COMPONENT_REFS); + createEReference(serviceRefEClass, SERVICE_REF__HANDLERS); + createEReference(serviceRefEClass, SERVICE_REF__SERVICE_QNAME); + + portComponentRefEClass = createEClass(PORT_COMPONENT_REF); + createEAttribute(portComponentRefEClass, PORT_COMPONENT_REF__PORT_COMPONENT_LINK); + createEReference(portComponentRefEClass, PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE); + + handlerEClass = createEClass(HANDLER); + createEAttribute(handlerEClass, HANDLER__HANDLER_NAME); + createEAttribute(handlerEClass, HANDLER__SOAP_ROLES); + createEAttribute(handlerEClass, HANDLER__PORT_NAMES); + createEReference(handlerEClass, HANDLER__HANDLER_CLASS); + createEReference(handlerEClass, HANDLER__INIT_PARAMS); + createEReference(handlerEClass, HANDLER__SOAP_HEADERS); + + webServicesClientEClass = createEClass(WEB_SERVICES_CLIENT); + createEReference(webServicesClientEClass, WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS); + createEReference(webServicesClientEClass, WEB_SERVICES_CLIENT__SERVICE_REFS); + + componentScopedRefsEClass = createEClass(COMPONENT_SCOPED_REFS); + createEAttribute(componentScopedRefsEClass, COMPONENT_SCOPED_REFS__COMPONENT_NAME); + createEReference(componentScopedRefsEClass, COMPONENT_SCOPED_REFS__SERVICE_REFS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); + + // Add supertypes to classes + serviceRefEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + handlerEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(serviceRefEClass, ServiceRef.class, "ServiceRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getServiceRef_ServiceInterface(), theJavaRefPackage.getJavaClass(), null, "serviceInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getServiceRef_ServiceRefName(), ecorePackage.getEString(), "serviceRefName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getServiceRef_WsdlFile(), ecorePackage.getEString(), "wsdlFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getServiceRef_JaxrpcMappingFile(), ecorePackage.getEString(), "jaxrpcMappingFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServiceRef_PortComponentRefs(), this.getPortComponentRef(), null, "portComponentRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServiceRef_Handlers(), this.getHandler(), null, "handlers", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServiceRef_ServiceQname(), theCommonPackage.getQName(), null, "serviceQname", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(portComponentRefEClass, PortComponentRef.class, "PortComponentRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getPortComponentRef_PortComponentLink(), ecorePackage.getEString(), "portComponentLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponentRef_ServiceEndpointInterface(), theJavaRefPackage.getJavaClass(), null, "serviceEndpointInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(handlerEClass, Handler.class, "Handler", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getHandler_HandlerName(), ecorePackage.getEString(), "handlerName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getHandler_SoapRoles(), ecorePackage.getEString(), "soapRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getHandler_PortNames(), ecorePackage.getEString(), "portNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_HandlerClass(), theJavaRefPackage.getJavaClass(), null, "handlerClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_InitParams(), theCommonPackage.getParamValue(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_SoapHeaders(), theCommonPackage.getQName(), null, "soapHeaders", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(webServicesClientEClass, WebServicesClient.class, "WebServicesClient", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getWebServicesClient_ComponentScopedRefs(), this.getComponentScopedRefs(), null, "componentScopedRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebServicesClient_ServiceRefs(), this.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(componentScopedRefsEClass, ComponentScopedRefs.class, "ComponentScopedRefs", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getComponentScopedRefs_ComponentName(), ecorePackage.getEString(), "componentName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getComponentScopedRefs_ServiceRefs(), this.getServiceRef(), null, "serviceRefs", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } +} //Webservice_clientPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientAdapterFactory.java new file mode 100644 index 000000000..dd2b85547 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientAdapterFactory.java @@ -0,0 +1,231 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage + * @generated + */ +public class Webservice_clientAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static Webservice_clientPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public Webservice_clientAdapterFactory() { + if (modelPackage == null) { + modelPackage = Webservice_clientPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected Webservice_clientSwitch modelSwitch = + new Webservice_clientSwitch() { + public Object caseServiceRef(ServiceRef object) { + return createServiceRefAdapter(); + } + public Object casePortComponentRef(PortComponentRef object) { + return createPortComponentRefAdapter(); + } + public Object caseHandler(Handler object) { + return createHandlerAdapter(); + } + public Object caseWebServicesClient(WebServicesClient object) { + return createWebServicesClientAdapter(); + } + public Object caseComponentScopedRefs(ComponentScopedRefs object) { + return createComponentScopedRefsAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.ServiceRef Service Ref}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.ServiceRef + * @generated + */ + public Adapter createServiceRefAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.PortComponentRef Port Component Ref}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.PortComponentRef + * @generated + */ + public Adapter createPortComponentRefAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.Handler Handler}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Handler + * @generated + */ + public Adapter createHandlerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.WebServicesClient Web Services Client}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.WebServicesClient + * @generated + */ + public Adapter createWebServicesClientAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.ComponentScopedRefs Component Scoped Refs}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.ComponentScopedRefs + * @generated + */ + public Adapter createComponentScopedRefsAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //Webservice_clientAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientSwitch.java new file mode 100644 index 000000000..5ee385a3f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsclient/util/Webservice_clientSwitch.java @@ -0,0 +1,230 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsclient.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; +import org.eclipse.jst.j2ee.webservice.wsclient.Handler; +import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; +import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; +import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage + * @generated + */ +public class Webservice_clientSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static Webservice_clientPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public Webservice_clientSwitch() { + if (modelPackage == null) { + modelPackage = Webservice_clientPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case Webservice_clientPackage.SERVICE_REF: { + ServiceRef serviceRef = (ServiceRef)theEObject; + Object result = caseServiceRef(serviceRef); + if (result == null) result = caseCompatibilityDescriptionGroup(serviceRef); + if (result == null) result = caseDescriptionGroup(serviceRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Webservice_clientPackage.PORT_COMPONENT_REF: { + PortComponentRef portComponentRef = (PortComponentRef)theEObject; + Object result = casePortComponentRef(portComponentRef); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Webservice_clientPackage.HANDLER: { + Handler handler = (Handler)theEObject; + Object result = caseHandler(handler); + if (result == null) result = caseCompatibilityDescriptionGroup(handler); + if (result == null) result = caseDescriptionGroup(handler); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Webservice_clientPackage.WEB_SERVICES_CLIENT: { + WebServicesClient webServicesClient = (WebServicesClient)theEObject; + Object result = caseWebServicesClient(webServicesClient); + if (result == null) result = defaultCase(theEObject); + return result; + } + case Webservice_clientPackage.COMPONENT_SCOPED_REFS: { + ComponentScopedRefs componentScopedRefs = (ComponentScopedRefs)theEObject; + Object result = caseComponentScopedRefs(componentScopedRefs); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Service Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Service Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServiceRef(ServiceRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Port Component Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Port Component Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object casePortComponentRef(PortComponentRef object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Handler'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Handler'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseHandler(Handler object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Services Client'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Services Client'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebServicesClient(WebServicesClient object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Component Scoped Refs'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Component Scoped Refs'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseComponentScopedRefs(ComponentScopedRefs object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //Webservice_clientSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DescriptionTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DescriptionTypeImpl.java new file mode 100644 index 000000000..22c2cf773 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DescriptionTypeImpl.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jst.j2ee.internal.common.impl.DescriptionImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'Description Type'. + * + *

+ *

+ * + * @generated + */ +public class DescriptionTypeImpl extends DescriptionImpl implements DescriptionType +{ + /** + * + * + * @generated + */ + protected DescriptionTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getDescriptionType(); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DESCRIPTION_TYPE__LANG: + return getLang(); + case WscommonPackage.DESCRIPTION_TYPE__VALUE: + return getValue(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DESCRIPTION_TYPE__LANG: + setLang((String)newValue); + return; + case WscommonPackage.DESCRIPTION_TYPE__VALUE: + setValue((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DESCRIPTION_TYPE__LANG: + setLang(LANG_EDEFAULT); + return; + case WscommonPackage.DESCRIPTION_TYPE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DESCRIPTION_TYPE__LANG: + return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); + case WscommonPackage.DESCRIPTION_TYPE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return eDynamicIsSet(eFeature); + } + +} //DescriptionTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DisplayNameTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DisplayNameTypeImpl.java new file mode 100644 index 000000000..fc6133af3 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/DisplayNameTypeImpl.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jst.j2ee.internal.common.impl.DisplayNameImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'Display Name Type'. + * + *

+ *

+ * + * @generated + */ +public class DisplayNameTypeImpl extends DisplayNameImpl implements DisplayNameType +{ + /** + * + * + * @generated + */ + protected DisplayNameTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getDisplayNameType(); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DISPLAY_NAME_TYPE__LANG: + return getLang(); + case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: + return getValue(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DISPLAY_NAME_TYPE__LANG: + setLang((String)newValue); + return; + case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: + setValue((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DISPLAY_NAME_TYPE__LANG: + setLang(LANG_EDEFAULT); + return; + case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.DISPLAY_NAME_TYPE__LANG: + return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); + case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return eDynamicIsSet(eFeature); + } + +} //DisplayNameTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/InitParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/InitParamImpl.java new file mode 100644 index 000000000..89186b683 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/InitParamImpl.java @@ -0,0 +1,332 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'Init Param'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getParamName Param Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getParamValue Param Value}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getDescription Description}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getDescriptionTypes Description Types}
  • + *
+ *

+ * + * @generated + */ +public class InitParamImpl extends EObjectImpl implements InitParam +{ + /** + * The default value of the '{@link #getParamName() Param Name}' attribute. + * + * + * @see #getParamName() + * @generated + * @ordered + */ + protected static final String PARAM_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getParamName() Param Name}' attribute. + * + * + * @see #getParamName() + * @generated + * @ordered + */ + protected String paramName = PARAM_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getParamValue() Param Value}' attribute. + * + * + * @see #getParamValue() + * @generated + * @ordered + */ + protected static final String PARAM_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getParamValue() Param Value}' attribute. + * + * + * @see #getParamValue() + * @generated + * @ordered + */ + protected String paramValue = PARAM_VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getDescriptionTypes() Description Types}' containment reference list. + * + * + * @see #getDescriptionTypes() + * @generated + * @ordered + */ + protected EList descriptionTypes = null; + + /** + * + * + * @generated + */ + protected InitParamImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getInitParam(); + } + + /** + * + * + * @generated + */ + public String getParamName() { + return paramName; + } + + /** + * + * + * @generated + */ + public void setParamName(String newParamName) { + String oldParamName = paramName; + paramName = newParamName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__PARAM_NAME, oldParamName, paramName)); + } + + /** + * + * + * @generated + */ + public String getParamValue() { + return paramValue; + } + + /** + * + * + * @generated + */ + public void setParamValue(String newParamValue) { + String oldParamValue = paramValue; + paramValue = newParamValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getDescriptionTypes() { + if (descriptionTypes == null) { + descriptionTypes = new EObjectContainmentEList(DescriptionType.class, this, WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES); + } + return descriptionTypes; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: + return ((InternalEList)getDescriptionTypes()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.INIT_PARAM__PARAM_NAME: + return getParamName(); + case WscommonPackage.INIT_PARAM__PARAM_VALUE: + return getParamValue(); + case WscommonPackage.INIT_PARAM__DESCRIPTION: + return getDescription(); + case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: + return getDescriptionTypes(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.INIT_PARAM__PARAM_NAME: + setParamName((String)newValue); + return; + case WscommonPackage.INIT_PARAM__PARAM_VALUE: + setParamValue((String)newValue); + return; + case WscommonPackage.INIT_PARAM__DESCRIPTION: + setDescription((String)newValue); + return; + case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: + getDescriptionTypes().clear(); + getDescriptionTypes().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.INIT_PARAM__PARAM_NAME: + setParamName(PARAM_NAME_EDEFAULT); + return; + case WscommonPackage.INIT_PARAM__PARAM_VALUE: + setParamValue(PARAM_VALUE_EDEFAULT); + return; + case WscommonPackage.INIT_PARAM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: + getDescriptionTypes().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.INIT_PARAM__PARAM_NAME: + return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); + case WscommonPackage.INIT_PARAM__PARAM_VALUE: + return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); + case WscommonPackage.INIT_PARAM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: + return descriptionTypes != null && !descriptionTypes.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (paramName: ");//$NON-NLS-1$ + result.append(paramName); + result.append(", paramValue: ");//$NON-NLS-1$ + result.append(paramValue); + result.append(", description: ");//$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} //InitParamImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/PortNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/PortNameImpl.java new file mode 100644 index 000000000..04f0fe5b1 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/PortNameImpl.java @@ -0,0 +1,165 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.PortName; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'Port Name'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.PortNameImpl#getPortName Port Name}
  • + *
+ *

+ * + * @generated + */ +public class PortNameImpl extends EObjectImpl implements PortName +{ + /** + * The default value of the '{@link #getPortName() Port Name}' attribute. + * + * + * @see #getPortName() + * @generated + * @ordered + */ + protected static final String PORT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortName() Port Name}' attribute. + * + * + * @see #getPortName() + * @generated + * @ordered + */ + protected String portName = PORT_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected PortNameImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getPortName(); + } + + /** + * + * + * @generated + */ + public String getPortName() { + return portName; + } + + /** + * + * + * @generated + */ + public void setPortName(String newPortName) { + String oldPortName = portName; + portName = newPortName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.PORT_NAME__PORT_NAME, oldPortName, portName)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.PORT_NAME__PORT_NAME: + return getPortName(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.PORT_NAME__PORT_NAME: + setPortName((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.PORT_NAME__PORT_NAME: + setPortName(PORT_NAME_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.PORT_NAME__PORT_NAME: + return PORT_NAME_EDEFAULT == null ? portName != null : !PORT_NAME_EDEFAULT.equals(portName); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (portName: ");//$NON-NLS-1$ + result.append(portName); + result.append(')'); + return result.toString(); + } + +} //PortNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPHeaderImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPHeaderImpl.java new file mode 100644 index 000000000..80edef888 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPHeaderImpl.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'SOAP Header'. + * + *

+ *

+ * + * @generated + */ +public class SOAPHeaderImpl extends QNameImpl implements SOAPHeader +{ + /** + * + * + * @generated + */ + protected SOAPHeaderImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getSOAPHeader(); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: + return getNamespaceURI(); + case WscommonPackage.SOAP_HEADER__LOCAL_PART: + return getLocalPart(); + case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: + return getCombinedQName(); + case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: + return getInternalPrefixOrNsURI(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: + setNamespaceURI((String)newValue); + return; + case WscommonPackage.SOAP_HEADER__LOCAL_PART: + setLocalPart((String)newValue); + return; + case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: + setCombinedQName((String)newValue); + return; + case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: + setNamespaceURI(NAMESPACE_URI_EDEFAULT); + return; + case WscommonPackage.SOAP_HEADER__LOCAL_PART: + setLocalPart(LOCAL_PART_EDEFAULT); + return; + case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: + setCombinedQName(COMBINED_QNAME_EDEFAULT); + return; + case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: + return NAMESPACE_URI_EDEFAULT == null ? namespaceURI != null : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); + case WscommonPackage.SOAP_HEADER__LOCAL_PART: + return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); + case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: + return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); + case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: + return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); + } + return eDynamicIsSet(eFeature); + } + +} //SOAPHeaderImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPRoleImpl.java new file mode 100644 index 000000000..1259fd210 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/SOAPRoleImpl.java @@ -0,0 +1,165 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model object 'SOAP Role'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.SOAPRoleImpl#getSoapRole Soap Role}
  • + *
+ *

+ * + * @generated + */ +public class SOAPRoleImpl extends EObjectImpl implements SOAPRole +{ + /** + * The default value of the '{@link #getSoapRole() Soap Role}' attribute. + * + * + * @see #getSoapRole() + * @generated + * @ordered + */ + protected static final String SOAP_ROLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSoapRole() Soap Role}' attribute. + * + * + * @see #getSoapRole() + * @generated + * @ordered + */ + protected String soapRole = SOAP_ROLE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SOAPRoleImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WscommonPackage.eINSTANCE.getSOAPRole(); + } + + /** + * + * + * @generated + */ + public String getSoapRole() { + return soapRole; + } + + /** + * + * + * @generated + */ + public void setSoapRole(String newSoapRole) { + String oldSoapRole = soapRole; + soapRole = newSoapRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.SOAP_ROLE__SOAP_ROLE, oldSoapRole, soapRole)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_ROLE__SOAP_ROLE: + return getSoapRole(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_ROLE__SOAP_ROLE: + setSoapRole((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_ROLE__SOAP_ROLE: + setSoapRole(SOAP_ROLE_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WscommonPackage.SOAP_ROLE__SOAP_ROLE: + return SOAP_ROLE_EDEFAULT == null ? soapRole != null : !SOAP_ROLE_EDEFAULT.equals(soapRole); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (soapRole: ");//$NON-NLS-1$ + result.append(soapRole); + result.append(')'); + return result.toString(); + } + +} //SOAPRoleImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonFactoryImpl.java new file mode 100644 index 000000000..bfdc7a2df --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonFactoryImpl.java @@ -0,0 +1,140 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.PortName; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class WscommonFactoryImpl extends EFactoryImpl implements WscommonFactory +{ + /** + * Creates and instance of the factory. + * + * + * @generated + */ + public WscommonFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case WscommonPackage.INIT_PARAM: return createInitParam(); + case WscommonPackage.SOAP_HEADER: return createSOAPHeader(); + case WscommonPackage.SOAP_ROLE: return createSOAPRole(); + case WscommonPackage.PORT_NAME: return createPortName(); + case WscommonPackage.DESCRIPTION_TYPE: return createDescriptionType(); + case WscommonPackage.DISPLAY_NAME_TYPE: return createDisplayNameType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public InitParam createInitParam() { + InitParamImpl initParam = new InitParamImpl(); + return initParam; + } + + /** + * + * + * @generated + */ + public SOAPHeader createSOAPHeader() { + SOAPHeaderImpl soapHeader = new SOAPHeaderImpl(); + return soapHeader; + } + + /** + * + * + * @generated + */ + public SOAPRole createSOAPRole() { + SOAPRoleImpl soapRole = new SOAPRoleImpl(); + return soapRole; + } + + /** + * + * + * @generated + */ + public PortName createPortName() { + PortNameImpl portName = new PortNameImpl(); + return portName; + } + + /** + * + * + * @generated + */ + public DescriptionType createDescriptionType() { + DescriptionTypeImpl descriptionType = new DescriptionTypeImpl(); + return descriptionType; + } + + /** + * + * + * @generated + */ + public DisplayNameType createDisplayNameType() { + DisplayNameTypeImpl displayNameType = new DisplayNameTypeImpl(); + return displayNameType; + } + + /** + * + * + * @generated + */ + public WscommonPackage getWscommonPackage() { + return (WscommonPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + public static WscommonPackage getPackage() { + return WscommonPackage.eINSTANCE; + } +} //WscommonFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonPackageImpl.java new file mode 100644 index 000000000..357f83b59 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/impl/WscommonPackageImpl.java @@ -0,0 +1,409 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.PortName; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class WscommonPackageImpl extends EPackageImpl implements WscommonPackage +{ + /** + * + * + * @generated + */ + private EClass initParamEClass = null; + + /** + * + * + * @generated + */ + private EClass soapHeaderEClass = null; + + /** + * + * + * @generated + */ + private EClass soapRoleEClass = null; + + /** + * + * + * @generated + */ + private EClass portNameEClass = null; + + /** + * + * + * @generated + */ + private EClass descriptionTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass displayNameTypeEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage#eNS_URI + * @see #init() + * @generated + */ + private WscommonPackageImpl() { + super(eNS_URI, WscommonFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *

Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *

Invocation of this method will not affect any packages that have + * already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static WscommonPackage init() { + if (isInited) return (WscommonPackage)EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI); + + // Obtain or create and register package. + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WscommonPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + + // Step 1: create meta-model objects + theWscommonPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWsddPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theWscommonPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWsddPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theWscommonPackage; + } + + /** + * + * + * @generated + */ + public EClass getInitParam() { + return initParamEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getInitParam_ParamName() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getInitParam_ParamValue() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getInitParam_Description() { + return (EAttribute)initParamEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getInitParam_DescriptionTypes() { + return (EReference)initParamEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getSOAPHeader() { + return soapHeaderEClass; + } + + /** + * + * + * @generated + */ + public EClass getSOAPRole() { + return soapRoleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSOAPRole_SoapRole() { + return (EAttribute)soapRoleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getPortName() { + return portNameEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPortName_PortName() { + return (EAttribute)portNameEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDescriptionType() { + return descriptionTypeEClass; + } + + /** + * + * + * @generated + */ + public EClass getDisplayNameType() { + return displayNameTypeEClass; + } + + /** + * + * + * @generated + */ + public WscommonFactory getWscommonFactory() { + return (WscommonFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + initParamEClass = createEClass(INIT_PARAM); + createEAttribute(initParamEClass, INIT_PARAM__PARAM_NAME); + createEAttribute(initParamEClass, INIT_PARAM__PARAM_VALUE); + createEAttribute(initParamEClass, INIT_PARAM__DESCRIPTION); + createEReference(initParamEClass, INIT_PARAM__DESCRIPTION_TYPES); + + soapHeaderEClass = createEClass(SOAP_HEADER); + + soapRoleEClass = createEClass(SOAP_ROLE); + createEAttribute(soapRoleEClass, SOAP_ROLE__SOAP_ROLE); + + portNameEClass = createEClass(PORT_NAME); + createEAttribute(portNameEClass, PORT_NAME__PORT_NAME); + + descriptionTypeEClass = createEClass(DESCRIPTION_TYPE); + + displayNameTypeEClass = createEClass(DISPLAY_NAME_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Add supertypes to classes + soapHeaderEClass.getESuperTypes().add(theCommonPackage.getQName()); + descriptionTypeEClass.getESuperTypes().add(theCommonPackage.getDescription()); + displayNameTypeEClass.getESuperTypes().add(theCommonPackage.getDisplayName()); + + // Initialize classes and features; add operations and parameters + initEClass(initParamEClass, InitParam.class, "InitParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getInitParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getInitParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getInitParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getInitParam_DescriptionTypes(), this.getDescriptionType(), null, "descriptionTypes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(soapHeaderEClass, SOAPHeader.class, "SOAPHeader", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + initEClass(soapRoleEClass, SOAPRole.class, "SOAPRole", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getSOAPRole_SoapRole(), ecorePackage.getEString(), "soapRole", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(portNameEClass, PortName.class, "PortName", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getPortName_PortName(), ecorePackage.getEString(), "portName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(descriptionTypeEClass, DescriptionType.class, "DescriptionType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + initEClass(displayNameTypeEClass, DisplayNameType.class, "DisplayNameType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } +} //WscommonPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonAdapterFactory.java new file mode 100644 index 000000000..aa209d139 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonAdapterFactory.java @@ -0,0 +1,269 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.PortName; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage + * @generated + */ +public class WscommonAdapterFactory extends AdapterFactoryImpl +{ + + /** + * The cached model package. + * + * + * @generated + */ + protected static WscommonPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public WscommonAdapterFactory() { + if (modelPackage == null) { + modelPackage = WscommonPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected WscommonSwitch modelSwitch = + new WscommonSwitch() { + public Object caseInitParam(InitParam object) { + return createInitParamAdapter(); + } + public Object caseSOAPHeader(SOAPHeader object) { + return createSOAPHeaderAdapter(); + } + public Object caseSOAPRole(SOAPRole object) { + return createSOAPRoleAdapter(); + } + public Object casePortName(PortName object) { + return createPortNameAdapter(); + } + public Object caseDescriptionType(DescriptionType object) { + return createDescriptionTypeAdapter(); + } + public Object caseDisplayNameType(DisplayNameType object) { + return createDisplayNameTypeAdapter(); + } + public Object caseQName(QName object) { + return createQNameAdapter(); + } + public Object caseDescription(Description object) { + return createDescriptionAdapter(); + } + public Object caseDisplayName(DisplayName object) { + return createDisplayNameAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.InitParam Init Param}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.InitParam + * @generated + */ + public Adapter createInitParamAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPHeader SOAP Header}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPHeader + * @generated + */ + public Adapter createSOAPHeaderAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPRole SOAP Role}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPRole + * @generated + */ + public Adapter createSOAPRoleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.PortName Port Name}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.PortName + * @generated + */ + public Adapter createPortNameAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.DescriptionType Description Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.DescriptionType + * @generated + */ + public Adapter createDescriptionTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.DisplayNameType Display Name Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.DisplayNameType + * @generated + */ + public Adapter createDisplayNameTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Description Description}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.Description + * @generated + */ + public Adapter createDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DisplayName Display Name}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DisplayName + * @generated + */ + public Adapter createDisplayNameAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.QName + * @generated + */ + public Adapter createQNameAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //WscommonAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonSwitch.java new file mode 100644 index 000000000..21b867277 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wscommon/util/WscommonSwitch.java @@ -0,0 +1,268 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wscommon.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.PortName; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; + + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage + * @generated + */ +public class WscommonSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static WscommonPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public WscommonSwitch() { + if (modelPackage == null) { + modelPackage = WscommonPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case WscommonPackage.INIT_PARAM: { + InitParam initParam = (InitParam)theEObject; + Object result = caseInitParam(initParam); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WscommonPackage.SOAP_HEADER: { + SOAPHeader soapHeader = (SOAPHeader)theEObject; + Object result = caseSOAPHeader(soapHeader); + if (result == null) result = caseQName(soapHeader); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WscommonPackage.SOAP_ROLE: { + SOAPRole soapRole = (SOAPRole)theEObject; + Object result = caseSOAPRole(soapRole); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WscommonPackage.PORT_NAME: { + PortName portName = (PortName)theEObject; + Object result = casePortName(portName); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WscommonPackage.DESCRIPTION_TYPE: { + DescriptionType descriptionType = (DescriptionType)theEObject; + Object result = caseDescriptionType(descriptionType); + if (result == null) result = caseDescription(descriptionType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WscommonPackage.DISPLAY_NAME_TYPE: { + DisplayNameType displayNameType = (DisplayNameType)theEObject; + Object result = caseDisplayNameType(displayNameType); + if (result == null) result = caseDisplayName(displayNameType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Init Param'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Init Param'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseInitParam(InitParam object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'SOAP Header'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'SOAP Header'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSOAPHeader(SOAPHeader object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'SOAP Role'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'SOAP Role'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSOAPRole(SOAPRole object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Port Name'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Port Name'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object casePortName(PortName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionType(DescriptionType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Display Name Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Display Name Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDisplayNameType(DisplayNameType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescription(Description object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Display Name'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Display Name'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDisplayName(DisplayName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'QName'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'QName'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQName(QName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //WscommonSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/BeanLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/BeanLinkImpl.java new file mode 100644 index 000000000..6446efcaa --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/BeanLinkImpl.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Bean Link'. + * + *

+ *

+ * + * @generated + */ +public class BeanLinkImpl extends EObjectImpl implements BeanLink +{ + /** + * + * + * @generated + */ + protected BeanLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getBeanLink(); + } + +} //BeanLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/EJBLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/EJBLinkImpl.java new file mode 100644 index 000000000..9e13a2085 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/EJBLinkImpl.java @@ -0,0 +1,164 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'EJB Link'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.EJBLinkImpl#getEjbLink Ejb Link}
  • + *
+ *

+ * + * @generated + */ +public class EJBLinkImpl extends BeanLinkImpl implements EJBLink +{ + /** + * The default value of the '{@link #getEjbLink() Ejb Link}' attribute. + * + * + * @see #getEjbLink() + * @generated + * @ordered + */ + protected static final String EJB_LINK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEjbLink() Ejb Link}' attribute. + * + * + * @see #getEjbLink() + * @generated + * @ordered + */ + protected String ejbLink = EJB_LINK_EDEFAULT; + + /** + * + * + * @generated + */ + protected EJBLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getEJBLink(); + } + + /** + * + * + * @generated + */ + public String getEjbLink() { + return ejbLink; + } + + /** + * + * + * @generated + */ + public void setEjbLink(String newEjbLink) { + String oldEjbLink = ejbLink; + ejbLink = newEjbLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.EJB_LINK__EJB_LINK, oldEjbLink, ejbLink)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.EJB_LINK__EJB_LINK: + return getEjbLink(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.EJB_LINK__EJB_LINK: + setEjbLink((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.EJB_LINK__EJB_LINK: + setEjbLink(EJB_LINK_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.EJB_LINK__EJB_LINK: + return EJB_LINK_EDEFAULT == null ? ejbLink != null : !EJB_LINK_EDEFAULT.equals(ejbLink); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ejbLink: ");//$NON-NLS-1$ + result.append(ejbLink); + result.append(')'); + return result.toString(); + } + +} //EJBLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/HandlerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/HandlerImpl.java new file mode 100644 index 000000000..7176ea397 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/HandlerImpl.java @@ -0,0 +1,431 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; +import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Handler'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getHandlerName Handler Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getHandlerClass Handler Class}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getInitParams Init Params}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getSoapHeaders Soap Headers}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getSoapRoles Soap Roles}
  • + *
+ *

+ * + * @generated + */ +public class HandlerImpl extends CompatibilityDescriptionGroupImpl implements Handler +{ + /** + * The default value of the '{@link #getHandlerName() Handler Name}' attribute. + * + * + * @see #getHandlerName() + * @generated + * @ordered + */ + protected static final String HANDLER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHandlerName() Handler Name}' attribute. + * + * + * @see #getHandlerName() + * @generated + * @ordered + */ + protected String handlerName = HANDLER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getHandlerClass() Handler Class}' attribute. + * + * + * @see #getHandlerClass() + * @generated + * @ordered + */ + protected static final String HANDLER_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHandlerClass() Handler Class}' attribute. + * + * + * @see #getHandlerClass() + * @generated + * @ordered + */ + protected String handlerClass = HANDLER_CLASS_EDEFAULT; + + /** + * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. + * + * + * @see #getInitParams() + * @generated + * @ordered + */ + protected EList initParams = null; + + /** + * The cached value of the '{@link #getSoapHeaders() Soap Headers}' containment reference list. + * + * + * @see #getSoapHeaders() + * @generated + * @ordered + */ + protected EList soapHeaders = null; + + /** + * The cached value of the '{@link #getSoapRoles() Soap Roles}' containment reference list. + * + * + * @see #getSoapRoles() + * @generated + * @ordered + */ + protected EList soapRoles = null; + + /** + * + * + * @generated + */ + protected HandlerImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getHandler(); + } + + /** + * + * + * @generated + */ + public String getHandlerName() { + return handlerName; + } + + /** + * + * + * @generated + */ + public void setHandlerName(String newHandlerName) { + String oldHandlerName = handlerName; + handlerName = newHandlerName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.HANDLER__HANDLER_NAME, oldHandlerName, handlerName)); + } + + /** + * + * + * @generated + */ + public String getHandlerClass() { + return handlerClass; + } + + /** + * + * + * @generated + */ + public void setHandlerClass(String newHandlerClass) { + String oldHandlerClass = handlerClass; + handlerClass = newHandlerClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); + } + + /** + * + * + * @generated + */ + public EList getInitParams() { + if (initParams == null) { + initParams = new EObjectContainmentEList(InitParam.class, this, WsddPackage.HANDLER__INIT_PARAMS); + } + return initParams; + } + + /** + * + * + * @generated + */ + public EList getSoapHeaders() { + if (soapHeaders == null) { + soapHeaders = new EObjectContainmentEList(SOAPHeader.class, this, WsddPackage.HANDLER__SOAP_HEADERS); + } + return soapHeaders; + } + + /** + * + * + * @generated + */ + public EList getSoapRoles() { + if (soapRoles == null) { + soapRoles = new EObjectContainmentEList(SOAPRole.class, this, WsddPackage.HANDLER__SOAP_ROLES); + } + return soapRoles; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WsddPackage.HANDLER__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case WsddPackage.HANDLER__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case WsddPackage.HANDLER__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WsddPackage.HANDLER__INIT_PARAMS: + return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); + case WsddPackage.HANDLER__SOAP_HEADERS: + return ((InternalEList)getSoapHeaders()).basicRemove(otherEnd, msgs); + case WsddPackage.HANDLER__SOAP_ROLES: + return ((InternalEList)getSoapRoles()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.HANDLER__ICONS: + return getIcons(); + case WsddPackage.HANDLER__DISPLAY_NAMES: + return getDisplayNames(); + case WsddPackage.HANDLER__DESCRIPTIONS: + return getDescriptions(); + case WsddPackage.HANDLER__SMALL_ICON: + return getSmallIcon(); + case WsddPackage.HANDLER__LARGE_ICON: + return getLargeIcon(); + case WsddPackage.HANDLER__DESCRIPTION: + return getDescription(); + case WsddPackage.HANDLER__DISPLAY_NAME: + return getDisplayName(); + case WsddPackage.HANDLER__HANDLER_NAME: + return getHandlerName(); + case WsddPackage.HANDLER__HANDLER_CLASS: + return getHandlerClass(); + case WsddPackage.HANDLER__INIT_PARAMS: + return getInitParams(); + case WsddPackage.HANDLER__SOAP_HEADERS: + return getSoapHeaders(); + case WsddPackage.HANDLER__SOAP_ROLES: + return getSoapRoles(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.HANDLER__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case WsddPackage.HANDLER__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case WsddPackage.HANDLER__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WsddPackage.HANDLER__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WsddPackage.HANDLER__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WsddPackage.HANDLER__DESCRIPTION: + setDescription((String)newValue); + return; + case WsddPackage.HANDLER__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WsddPackage.HANDLER__HANDLER_NAME: + setHandlerName((String)newValue); + return; + case WsddPackage.HANDLER__HANDLER_CLASS: + setHandlerClass((String)newValue); + return; + case WsddPackage.HANDLER__INIT_PARAMS: + getInitParams().clear(); + getInitParams().addAll((Collection)newValue); + return; + case WsddPackage.HANDLER__SOAP_HEADERS: + getSoapHeaders().clear(); + getSoapHeaders().addAll((Collection)newValue); + return; + case WsddPackage.HANDLER__SOAP_ROLES: + getSoapRoles().clear(); + getSoapRoles().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.HANDLER__ICONS: + getIcons().clear(); + return; + case WsddPackage.HANDLER__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case WsddPackage.HANDLER__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WsddPackage.HANDLER__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WsddPackage.HANDLER__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WsddPackage.HANDLER__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WsddPackage.HANDLER__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WsddPackage.HANDLER__HANDLER_NAME: + setHandlerName(HANDLER_NAME_EDEFAULT); + return; + case WsddPackage.HANDLER__HANDLER_CLASS: + setHandlerClass(HANDLER_CLASS_EDEFAULT); + return; + case WsddPackage.HANDLER__INIT_PARAMS: + getInitParams().clear(); + return; + case WsddPackage.HANDLER__SOAP_HEADERS: + getSoapHeaders().clear(); + return; + case WsddPackage.HANDLER__SOAP_ROLES: + getSoapRoles().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.HANDLER__ICONS: + return icons != null && !icons.isEmpty(); + case WsddPackage.HANDLER__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case WsddPackage.HANDLER__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WsddPackage.HANDLER__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WsddPackage.HANDLER__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WsddPackage.HANDLER__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WsddPackage.HANDLER__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WsddPackage.HANDLER__HANDLER_NAME: + return HANDLER_NAME_EDEFAULT == null ? handlerName != null : !HANDLER_NAME_EDEFAULT.equals(handlerName); + case WsddPackage.HANDLER__HANDLER_CLASS: + return HANDLER_CLASS_EDEFAULT == null ? handlerClass != null : !HANDLER_CLASS_EDEFAULT.equals(handlerClass); + case WsddPackage.HANDLER__INIT_PARAMS: + return initParams != null && !initParams.isEmpty(); + case WsddPackage.HANDLER__SOAP_HEADERS: + return soapHeaders != null && !soapHeaders.isEmpty(); + case WsddPackage.HANDLER__SOAP_ROLES: + return soapRoles != null && !soapRoles.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (handlerName: ");//$NON-NLS-1$ + result.append(handlerName); + result.append(", handlerClass: ");//$NON-NLS-1$ + result.append(handlerClass); + result.append(')'); + return result.toString(); + } + +} //HandlerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/PortComponentImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/PortComponentImpl.java new file mode 100644 index 000000000..caa3efe34 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/PortComponentImpl.java @@ -0,0 +1,829 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Port Component'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getPortComponentName Port Component Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getServiceEndpointInterface Service Endpoint Interface}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getSmallIcon Small Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getLargeIcon Large Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDescription Description}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDisplayName Display Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getWsdlPort Wsdl Port}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getServiceImplBean Service Impl Bean}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getHandlers Handlers}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDescriptionType Description Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDisplayNameType Display Name Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getIconType Icon Type}
  • + *
+ *

+ * + * @generated + */ +public class PortComponentImpl extends EObjectImpl implements PortComponent +{ + /** + * The default value of the '{@link #getPortComponentName() Port Component Name}' attribute. + * + * + * @see #getPortComponentName() + * @generated + * @ordered + */ + protected static final String PORT_COMPONENT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortComponentName() Port Component Name}' attribute. + * + * + * @see #getPortComponentName() + * @generated + * @ordered + */ + protected String portComponentName = PORT_COMPONENT_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' attribute. + * + * + * @see #getServiceEndpointInterface() + * @generated + * @ordered + */ + protected static final String SERVICE_ENDPOINT_INTERFACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' attribute. + * + * + * @see #getServiceEndpointInterface() + * @generated + * @ordered + */ + protected String serviceEndpointInterface = SERVICE_ENDPOINT_INTERFACE_EDEFAULT; + + /** + * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected static final String SMALL_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected String smallIcon = SMALL_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected static final String LARGE_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected String largeIcon = LARGE_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected static final String DISPLAY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected String displayName = DISPLAY_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getWsdlPort() Wsdl Port}' containment reference. + * + * + * @see #getWsdlPort() + * @generated + * @ordered + */ + protected WSDLPort wsdlPort = null; + + /** + * The cached value of the '{@link #getServiceImplBean() Service Impl Bean}' containment reference. + * + * + * @see #getServiceImplBean() + * @generated + * @ordered + */ + protected ServiceImplBean serviceImplBean = null; + + /** + * The cached value of the '{@link #getHandlers() Handlers}' containment reference list. + * + * + * @see #getHandlers() + * @generated + * @ordered + */ + protected EList handlers = null; + + /** + * The cached value of the '{@link #getDescriptionType() Description Type}' containment reference. + * + * + * @see #getDescriptionType() + * @generated + * @ordered + */ + protected DescriptionType descriptionType = null; + + /** + * The cached value of the '{@link #getDisplayNameType() Display Name Type}' containment reference. + * + * + * @see #getDisplayNameType() + * @generated + * @ordered + */ + protected DisplayNameType displayNameType = null; + + /** + * The cached value of the '{@link #getIconType() Icon Type}' containment reference. + * + * + * @see #getIconType() + * @generated + * @ordered + */ + protected IconType iconType = null; + + /** + * + * + * @generated + */ + protected PortComponentImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getPortComponent(); + } + + /** + * + * + * @generated + */ + public String getPortComponentName() { + return portComponentName; + } + + /** + * + * + * @generated + */ + public void setPortComponentName(String newPortComponentName) { + String oldPortComponentName = portComponentName; + portComponentName = newPortComponentName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME, oldPortComponentName, portComponentName)); + } + + /** + * + * + * @generated + */ + public String getServiceEndpointInterface() { + return serviceEndpointInterface; + } + + /** + * + * + * @generated + */ + public void setServiceEndpointInterface(String newServiceEndpointInterface) { + String oldServiceEndpointInterface = serviceEndpointInterface; + serviceEndpointInterface = newServiceEndpointInterface; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); + } + + /** + * + * + * @generated + */ + public String getSmallIcon() { + return smallIcon; + } + + /** + * + * + * @generated + */ + public void setSmallIcon(String newSmallIcon) { + String oldSmallIcon = smallIcon; + smallIcon = newSmallIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SMALL_ICON, oldSmallIcon, smallIcon)); + } + + /** + * + * + * @generated + */ + public String getLargeIcon() { + return largeIcon; + } + + /** + * + * + * @generated + */ + public void setLargeIcon(String newLargeIcon) { + String oldLargeIcon = largeIcon; + largeIcon = newLargeIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__LARGE_ICON, oldLargeIcon, largeIcon)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getDisplayName() { + return displayName; + } + + /** + * + * + * @generated + */ + public void setDisplayName(String newDisplayName) { + String oldDisplayName = displayName; + displayName = newDisplayName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME, oldDisplayName, displayName)); + } + + /** + * + * + * @generated + */ + public WSDLPort getWsdlPort() { + return wsdlPort; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetWsdlPort(WSDLPort newWsdlPort, NotificationChain msgs) { + WSDLPort oldWsdlPort = wsdlPort; + wsdlPort = newWsdlPort; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__WSDL_PORT, oldWsdlPort, newWsdlPort); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setWsdlPort(WSDLPort newWsdlPort) { + if (newWsdlPort != wsdlPort) { + NotificationChain msgs = null; + if (wsdlPort != null) + msgs = ((InternalEObject)wsdlPort).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__WSDL_PORT, null, msgs); + if (newWsdlPort != null) + msgs = ((InternalEObject)newWsdlPort).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__WSDL_PORT, null, msgs); + msgs = basicSetWsdlPort(newWsdlPort, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__WSDL_PORT, newWsdlPort, newWsdlPort)); + } + + /** + * + * + * @generated + */ + public ServiceImplBean getServiceImplBean() { + return serviceImplBean; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetServiceImplBean(ServiceImplBean newServiceImplBean, NotificationChain msgs) { + ServiceImplBean oldServiceImplBean = serviceImplBean; + serviceImplBean = newServiceImplBean; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, oldServiceImplBean, newServiceImplBean); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setServiceImplBean(ServiceImplBean newServiceImplBean) { + if (newServiceImplBean != serviceImplBean) { + NotificationChain msgs = null; + if (serviceImplBean != null) + msgs = ((InternalEObject)serviceImplBean).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, null, msgs); + if (newServiceImplBean != null) + msgs = ((InternalEObject)newServiceImplBean).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, null, msgs); + msgs = basicSetServiceImplBean(newServiceImplBean, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, newServiceImplBean, newServiceImplBean)); + } + + /** + * + * + * @generated + */ + public EList getHandlers() { + if (handlers == null) { + handlers = new EObjectContainmentEList(Handler.class, this, WsddPackage.PORT_COMPONENT__HANDLERS); + } + return handlers; + } + + /** + * + * + * @generated + */ + public DescriptionType getDescriptionType() { + return descriptionType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDescriptionType(DescriptionType newDescriptionType, NotificationChain msgs) { + DescriptionType oldDescriptionType = descriptionType; + descriptionType = newDescriptionType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, oldDescriptionType, newDescriptionType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDescriptionType(DescriptionType newDescriptionType) { + if (newDescriptionType != descriptionType) { + NotificationChain msgs = null; + if (descriptionType != null) + msgs = ((InternalEObject)descriptionType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, null, msgs); + if (newDescriptionType != null) + msgs = ((InternalEObject)newDescriptionType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, null, msgs); + msgs = basicSetDescriptionType(newDescriptionType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, newDescriptionType, newDescriptionType)); + } + + /** + * + * + * @generated + */ + public DisplayNameType getDisplayNameType() { + return displayNameType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDisplayNameType(DisplayNameType newDisplayNameType, NotificationChain msgs) { + DisplayNameType oldDisplayNameType = displayNameType; + displayNameType = newDisplayNameType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, oldDisplayNameType, newDisplayNameType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDisplayNameType(DisplayNameType newDisplayNameType) { + if (newDisplayNameType != displayNameType) { + NotificationChain msgs = null; + if (displayNameType != null) + msgs = ((InternalEObject)displayNameType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, null, msgs); + if (newDisplayNameType != null) + msgs = ((InternalEObject)newDisplayNameType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, null, msgs); + msgs = basicSetDisplayNameType(newDisplayNameType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, newDisplayNameType, newDisplayNameType)); + } + + /** + * + * + * @generated + */ + public IconType getIconType() { + return iconType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetIconType(IconType newIconType, NotificationChain msgs) { + IconType oldIconType = iconType; + iconType = newIconType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__ICON_TYPE, oldIconType, newIconType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setIconType(IconType newIconType) { + if (newIconType != iconType) { + NotificationChain msgs = null; + if (iconType != null) + msgs = ((InternalEObject)iconType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__ICON_TYPE, null, msgs); + if (newIconType != null) + msgs = ((InternalEObject)newIconType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__ICON_TYPE, null, msgs); + msgs = basicSetIconType(newIconType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__ICON_TYPE, newIconType, newIconType)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WsddPackage.PORT_COMPONENT__WSDL_PORT: + return basicSetWsdlPort(null, msgs); + case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: + return basicSetServiceImplBean(null, msgs); + case WsddPackage.PORT_COMPONENT__HANDLERS: + return ((InternalEList)getHandlers()).basicRemove(otherEnd, msgs); + case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: + return basicSetDescriptionType(null, msgs); + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: + return basicSetDisplayNameType(null, msgs); + case WsddPackage.PORT_COMPONENT__ICON_TYPE: + return basicSetIconType(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: + return getPortComponentName(); + case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: + return getServiceEndpointInterface(); + case WsddPackage.PORT_COMPONENT__SMALL_ICON: + return getSmallIcon(); + case WsddPackage.PORT_COMPONENT__LARGE_ICON: + return getLargeIcon(); + case WsddPackage.PORT_COMPONENT__DESCRIPTION: + return getDescription(); + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: + return getDisplayName(); + case WsddPackage.PORT_COMPONENT__WSDL_PORT: + return getWsdlPort(); + case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: + return getServiceImplBean(); + case WsddPackage.PORT_COMPONENT__HANDLERS: + return getHandlers(); + case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: + return getDescriptionType(); + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: + return getDisplayNameType(); + case WsddPackage.PORT_COMPONENT__ICON_TYPE: + return getIconType(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: + setPortComponentName((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: + setServiceEndpointInterface((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__DESCRIPTION: + setDescription((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WsddPackage.PORT_COMPONENT__WSDL_PORT: + setWsdlPort((WSDLPort)newValue); + return; + case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: + setServiceImplBean((ServiceImplBean)newValue); + return; + case WsddPackage.PORT_COMPONENT__HANDLERS: + getHandlers().clear(); + getHandlers().addAll((Collection)newValue); + return; + case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: + setDescriptionType((DescriptionType)newValue); + return; + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: + setDisplayNameType((DisplayNameType)newValue); + return; + case WsddPackage.PORT_COMPONENT__ICON_TYPE: + setIconType((IconType)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: + setPortComponentName(PORT_COMPONENT_NAME_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: + setServiceEndpointInterface(SERVICE_ENDPOINT_INTERFACE_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WsddPackage.PORT_COMPONENT__WSDL_PORT: + setWsdlPort((WSDLPort)null); + return; + case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: + setServiceImplBean((ServiceImplBean)null); + return; + case WsddPackage.PORT_COMPONENT__HANDLERS: + getHandlers().clear(); + return; + case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: + setDescriptionType((DescriptionType)null); + return; + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: + setDisplayNameType((DisplayNameType)null); + return; + case WsddPackage.PORT_COMPONENT__ICON_TYPE: + setIconType((IconType)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: + return PORT_COMPONENT_NAME_EDEFAULT == null ? portComponentName != null : !PORT_COMPONENT_NAME_EDEFAULT.equals(portComponentName); + case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: + return SERVICE_ENDPOINT_INTERFACE_EDEFAULT == null ? serviceEndpointInterface != null : !SERVICE_ENDPOINT_INTERFACE_EDEFAULT.equals(serviceEndpointInterface); + case WsddPackage.PORT_COMPONENT__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WsddPackage.PORT_COMPONENT__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WsddPackage.PORT_COMPONENT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WsddPackage.PORT_COMPONENT__WSDL_PORT: + return wsdlPort != null; + case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: + return serviceImplBean != null; + case WsddPackage.PORT_COMPONENT__HANDLERS: + return handlers != null && !handlers.isEmpty(); + case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: + return descriptionType != null; + case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: + return displayNameType != null; + case WsddPackage.PORT_COMPONENT__ICON_TYPE: + return iconType != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (portComponentName: ");//$NON-NLS-1$ + result.append(portComponentName); + result.append(", serviceEndpointInterface: ");//$NON-NLS-1$ + result.append(serviceEndpointInterface); + result.append(", smallIcon: ");//$NON-NLS-1$ + result.append(smallIcon); + result.append(", largeIcon: ");//$NON-NLS-1$ + result.append(largeIcon); + result.append(", description: ");//$NON-NLS-1$ + result.append(description); + result.append(", displayName: ");//$NON-NLS-1$ + result.append(displayName); + result.append(')'); + return result.toString(); + } + +} //PortComponentImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServiceImplBeanImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServiceImplBeanImpl.java new file mode 100644 index 000000000..3c4a124bd --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServiceImplBeanImpl.java @@ -0,0 +1,316 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Service Impl Bean'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getEEJBLink EEJB Link}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getEServletLink EServlet Link}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getBeanLink Bean Link}
  • + *
+ *

+ * + * @generated + */ +public class ServiceImplBeanImpl extends EObjectImpl implements ServiceImplBean +{ + /** + * The cached value of the '{@link #getEEJBLink() EEJB Link}' containment reference. + * + * + * @see #getEEJBLink() + * @generated + * @ordered + */ + protected EJBLink eEJBLink = null; + + /** + * The cached value of the '{@link #getEServletLink() EServlet Link}' containment reference. + * + * + * @see #getEServletLink() + * @generated + * @ordered + */ + protected ServletLink eServletLink = null; + + /** + * The cached value of the '{@link #getBeanLink() Bean Link}' containment reference. + * + * + * @see #getBeanLink() + * @generated + * @ordered + */ + protected BeanLink beanLink = null; + + /** + * + * + * @generated + */ + protected ServiceImplBeanImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getServiceImplBean(); + } + + /** + * + * + * @generated + */ + public EJBLink getEEJBLink() { + return eEJBLink; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEEJBLink(EJBLink newEEJBLink, NotificationChain msgs) { + EJBLink oldEEJBLink = eEJBLink; + eEJBLink = newEEJBLink; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, oldEEJBLink, newEEJBLink); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEEJBLink(EJBLink newEEJBLink) { + if (newEEJBLink != eEJBLink) { + NotificationChain msgs = null; + if (eEJBLink != null) + msgs = ((InternalEObject)eEJBLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, null, msgs); + if (newEEJBLink != null) + msgs = ((InternalEObject)newEEJBLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, null, msgs); + msgs = basicSetEEJBLink(newEEJBLink, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, newEEJBLink, newEEJBLink)); + } + + /** + * + * + * @generated + */ + public ServletLink getEServletLink() { + return eServletLink; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEServletLink(ServletLink newEServletLink, NotificationChain msgs) { + ServletLink oldEServletLink = eServletLink; + eServletLink = newEServletLink; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, oldEServletLink, newEServletLink); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEServletLink(ServletLink newEServletLink) { + if (newEServletLink != eServletLink) { + NotificationChain msgs = null; + if (eServletLink != null) + msgs = ((InternalEObject)eServletLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, null, msgs); + if (newEServletLink != null) + msgs = ((InternalEObject)newEServletLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, null, msgs); + msgs = basicSetEServletLink(newEServletLink, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, newEServletLink, newEServletLink)); + } + + /** + * + * + * @generated + */ + public BeanLink getBeanLink() { + return beanLink; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetBeanLink(BeanLink newBeanLink, NotificationChain msgs) { + BeanLink oldBeanLink = beanLink; + beanLink = newBeanLink; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, oldBeanLink, newBeanLink); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setBeanLink(BeanLink newBeanLink) { + if (newBeanLink != beanLink) { + NotificationChain msgs = null; + if (beanLink != null) + msgs = ((InternalEObject)beanLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, null, msgs); + if (newBeanLink != null) + msgs = ((InternalEObject)newBeanLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, null, msgs); + msgs = basicSetBeanLink(newBeanLink, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, newBeanLink, newBeanLink)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: + return basicSetEEJBLink(null, msgs); + case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: + return basicSetEServletLink(null, msgs); + case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: + return basicSetBeanLink(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: + return getEEJBLink(); + case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: + return getEServletLink(); + case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: + return getBeanLink(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: + setEEJBLink((EJBLink)newValue); + return; + case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: + setEServletLink((ServletLink)newValue); + return; + case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: + setBeanLink((BeanLink)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: + setEEJBLink((EJBLink)null); + return; + case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: + setEServletLink((ServletLink)null); + return; + case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: + setBeanLink((BeanLink)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: + return eEJBLink != null; + case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: + return eServletLink != null; + case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: + return beanLink != null; + } + return eDynamicIsSet(eFeature); + } + +} //ServiceImplBeanImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServletLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServletLinkImpl.java new file mode 100644 index 000000000..78b35ab56 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/ServletLinkImpl.java @@ -0,0 +1,164 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Servlet Link'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServletLinkImpl#getServletLink Servlet Link}
  • + *
+ *

+ * + * @generated + */ +public class ServletLinkImpl extends BeanLinkImpl implements ServletLink +{ + /** + * The default value of the '{@link #getServletLink() Servlet Link}' attribute. + * + * + * @see #getServletLink() + * @generated + * @ordered + */ + protected static final String SERVLET_LINK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServletLink() Servlet Link}' attribute. + * + * + * @see #getServletLink() + * @generated + * @ordered + */ + protected String servletLink = SERVLET_LINK_EDEFAULT; + + /** + * + * + * @generated + */ + protected ServletLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getServletLink(); + } + + /** + * + * + * @generated + */ + public String getServletLink() { + return servletLink; + } + + /** + * + * + * @generated + */ + public void setServletLink(String newServletLink) { + String oldServletLink = servletLink; + servletLink = newServletLink; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVLET_LINK__SERVLET_LINK, oldServletLink, servletLink)); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVLET_LINK__SERVLET_LINK: + return getServletLink(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVLET_LINK__SERVLET_LINK: + setServletLink((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVLET_LINK__SERVLET_LINK: + setServletLink(SERVLET_LINK_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.SERVLET_LINK__SERVLET_LINK: + return SERVLET_LINK_EDEFAULT == null ? servletLink != null : !SERVLET_LINK_EDEFAULT.equals(servletLink); + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servletLink: ");//$NON-NLS-1$ + result.append(servletLink); + result.append(')'); + return result.toString(); + } + +} //ServletLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WSDLPortImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WSDLPortImpl.java new file mode 100644 index 000000000..1cfc3f239 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WSDLPortImpl.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'WSDL Port'. + * + *

+ *

+ * + * @generated + */ +public class WSDLPortImpl extends QNameImpl implements WSDLPort +{ + /** + * + * + * @generated + */ + protected WSDLPortImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getWSDLPort(); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WSDL_PORT__NAMESPACE_URI: + return getNamespaceURI(); + case WsddPackage.WSDL_PORT__LOCAL_PART: + return getLocalPart(); + case WsddPackage.WSDL_PORT__COMBINED_QNAME: + return getCombinedQName(); + case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: + return getInternalPrefixOrNsURI(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WSDL_PORT__NAMESPACE_URI: + setNamespaceURI((String)newValue); + return; + case WsddPackage.WSDL_PORT__LOCAL_PART: + setLocalPart((String)newValue); + return; + case WsddPackage.WSDL_PORT__COMBINED_QNAME: + setCombinedQName((String)newValue); + return; + case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI((String)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WSDL_PORT__NAMESPACE_URI: + setNamespaceURI(NAMESPACE_URI_EDEFAULT); + return; + case WsddPackage.WSDL_PORT__LOCAL_PART: + setLocalPart(LOCAL_PART_EDEFAULT); + return; + case WsddPackage.WSDL_PORT__COMBINED_QNAME: + setCombinedQName(COMBINED_QNAME_EDEFAULT); + return; + case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: + setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WSDL_PORT__NAMESPACE_URI: + return NAMESPACE_URI_EDEFAULT == null ? namespaceURI != null : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); + case WsddPackage.WSDL_PORT__LOCAL_PART: + return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); + case WsddPackage.WSDL_PORT__COMBINED_QNAME: + return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); + case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: + return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); + } + return eDynamicIsSet(eFeature); + } + +} //WSDLPortImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServiceDescriptionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServiceDescriptionImpl.java new file mode 100644 index 000000000..c6724ba87 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServiceDescriptionImpl.java @@ -0,0 +1,969 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.common.CommonFactory; +import org.eclipse.jst.j2ee.common.Description; +import org.eclipse.jst.j2ee.common.DisplayName; +import org.eclipse.jst.j2ee.common.IconType; +import org.eclipse.jst.j2ee.common.J2EEVersionResource; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; +import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Web Service Description'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getJaxrpcMappingFile Jaxrpc Mapping File}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getWebServiceDescriptionName Web Service Description Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getWsdlFile Wsdl File}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getSmallIcon Small Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getLargeIcon Large Icon}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDescription Description}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDisplayName Display Name}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getPortComponents Port Components}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDescriptionType Description Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDisplayNameType Display Name Type}
  • + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getIconType Icon Type}
  • + *
+ *

+ * + * @generated + */ +public class WebServiceDescriptionImpl extends EObjectImpl implements WebServiceDescription +{ + /** + * The default value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. + * + * + * @see #getJaxrpcMappingFile() + * @generated + * @ordered + */ + protected static final String JAXRPC_MAPPING_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. + * + * + * @see #getJaxrpcMappingFile() + * @generated + * @ordered + */ + protected String jaxrpcMappingFile = JAXRPC_MAPPING_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getWebServiceDescriptionName() Web Service Description Name}' attribute. + * + * + * @see #getWebServiceDescriptionName() + * @generated + * @ordered + */ + protected static final String WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWebServiceDescriptionName() Web Service Description Name}' attribute. + * + * + * @see #getWebServiceDescriptionName() + * @generated + * @ordered + */ + protected String webServiceDescriptionName = WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getWsdlFile() Wsdl File}' attribute. + * + * + * @see #getWsdlFile() + * @generated + * @ordered + */ + protected static final String WSDL_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWsdlFile() Wsdl File}' attribute. + * + * + * @see #getWsdlFile() + * @generated + * @ordered + */ + protected String wsdlFile = WSDL_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected static final String SMALL_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. + * + * + * @see #getSmallIcon() + * @generated + * @ordered + */ + protected String smallIcon = SMALL_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected static final String LARGE_ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. + * + * + * @see #getLargeIcon() + * @generated + * @ordered + */ + protected String largeIcon = LARGE_ICON_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected static final String DISPLAY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayName() Display Name}' attribute. + * + * + * @see #getDisplayName() + * @generated + * @ordered + */ + protected String displayName = DISPLAY_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getPortComponents() Port Components}' containment reference list. + * + * + * @see #getPortComponents() + * @generated + * @ordered + */ + protected EList portComponents = null; + + /** + * The cached value of the '{@link #getDescriptionType() Description Type}' containment reference. + * + * + * @see #getDescriptionType() + * @generated + * @ordered + */ + protected DescriptionType descriptionType = null; + + /** + * The cached value of the '{@link #getDisplayNameType() Display Name Type}' containment reference. + * + * + * @see #getDisplayNameType() + * @generated + * @ordered + */ + protected DisplayNameType displayNameType = null; + + /** + * The cached value of the '{@link #getIconType() Icon Type}' containment reference. + * + * + * @see #getIconType() + * @generated + * @ordered + */ + protected IconType iconType = null; + + /** + * + * + * @generated + */ + protected WebServiceDescriptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getWebServiceDescription(); + } + + /** + * + * + * @generated + */ + public String getJaxrpcMappingFile() { + return jaxrpcMappingFile; + } + + /** + * + * + * @generated + */ + public void setJaxrpcMappingFile(String newJaxrpcMappingFile) { + String oldJaxrpcMappingFile = jaxrpcMappingFile; + jaxrpcMappingFile = newJaxrpcMappingFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE, oldJaxrpcMappingFile, jaxrpcMappingFile)); + } + + /** + * + * + * @generated + */ + public String getWebServiceDescriptionName() { + return webServiceDescriptionName; + } + + /** + * + * + * @generated + */ + public void setWebServiceDescriptionName(String newWebServiceDescriptionName) { + String oldWebServiceDescriptionName = webServiceDescriptionName; + webServiceDescriptionName = newWebServiceDescriptionName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME, oldWebServiceDescriptionName, webServiceDescriptionName)); + } + + /** + * + * + * @generated + */ + public String getWsdlFile() { + return wsdlFile; + } + + /** + * + * + * @generated + */ + public void setWsdlFile(String newWsdlFile) { + String oldWsdlFile = wsdlFile; + wsdlFile = newWsdlFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE, oldWsdlFile, wsdlFile)); + } + + /** + * + * + * @generated + */ + public String getSmallIconGen() { + return smallIcon; + } + public String getSmallIcon() { + if(eResource() == null) + return getSmallIconGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getSmallIconGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getIconType() != null) + return getIconType().getSmallIcon(); + } + return null; + } + + /** + * + * + * @generated + */ + public void setSmallIconGen(String newSmallIcon) { + String oldSmallIcon = smallIcon; + smallIcon = newSmallIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON, oldSmallIcon, smallIcon)); + } + + /** + * + * + * @generated + */ + public String getLargeIconGen() { + return largeIcon; + } + public String getLargeIcon() { + if(eResource() == null) + return getLargeIconGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getLargeIconGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getIconType() != null) + return getIconType().getLargeIcon(); + } + return null; + } + + /** + * + * + * @generated + */ + public void setLargeIconGen(String newLargeIcon) { + String oldLargeIcon = largeIcon; + largeIcon = newLargeIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON, oldLargeIcon, largeIcon)); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#getJ2EEVersionID() + */ + public int getJ2EEVersionID() throws IllegalStateException { + J2EEVersionResource res = (J2EEVersionResource) eResource(); + if (res == null) + throw new IllegalStateException(); + return res.getJ2EEVersionID(); + } + + /** + * + * + * @generated + */ + public String getDescriptionGen() { + return description; + } + + public String getDescription() { + if(eResource() == null) + return getDescriptionGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getDescriptionGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getDescriptionType() != null) + return ((Description)getDescriptionType()).getValue(); + } + return null; + } + + /** + * + * + * @generated + */ + public void setDescriptionGen(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION, oldDescription, description)); + } + public void setDescription(String newDescription) { + if(eResource() == null) { + setDescriptionGen(newDescription); + internalSetDescriptionType(newDescription); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setDescriptionGen(newDescription); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetDescriptionType(newDescription); + break; + } + } + + /** + * + * + * @generated + */ + public String getDisplayNameGen() { + return displayName; + } + public String getDisplayName() { + if(eResource() == null) + return getDisplayNameGen(); + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + return getDisplayNameGen(); + case J2EEVersionConstants.J2EE_1_4_ID : + default : + if (getDisplayNameType() != null) + return ((DisplayName)getDisplayNameType()).getValue(); + } + return null; + } + + /** + * + * + * @generated + */ + public void setDisplayNameGen(String newDisplayName) { + String oldDisplayName = displayName; + displayName = newDisplayName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME, oldDisplayName, displayName)); + } + public void setDisplayName(String newDisplayName) { + if(eResource() == null) { + setDisplayNameGen(newDisplayName); + internalSetDisplayNameType(newDisplayName); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setDisplayNameGen(newDisplayName); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetDisplayNameType(newDisplayName); + break; + } + } + + /** + * + * + * @generated + */ + public EList getPortComponents() { + if (portComponents == null) { + portComponents = new EObjectContainmentEList(PortComponent.class, this, WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS); + } + return portComponents; + } + + /** + * + * + * @generated + */ + public DescriptionType getDescriptionType() { + return descriptionType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDescriptionType(DescriptionType newDescriptionType, NotificationChain msgs) { + DescriptionType oldDescriptionType = descriptionType; + descriptionType = newDescriptionType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, oldDescriptionType, newDescriptionType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDescriptionType(DescriptionType newDescriptionType) { + if (newDescriptionType != descriptionType) { + NotificationChain msgs = null; + if (descriptionType != null) + msgs = ((InternalEObject)descriptionType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, null, msgs); + if (newDescriptionType != null) + msgs = ((InternalEObject)newDescriptionType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, null, msgs); + msgs = basicSetDescriptionType(newDescriptionType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, newDescriptionType, newDescriptionType)); + } + + /** + * + * + * @generated + */ + public DisplayNameType getDisplayNameType() { + return displayNameType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDisplayNameType(DisplayNameType newDisplayNameType, NotificationChain msgs) { + DisplayNameType oldDisplayNameType = displayNameType; + displayNameType = newDisplayNameType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, oldDisplayNameType, newDisplayNameType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDisplayNameType(DisplayNameType newDisplayNameType) { + if (newDisplayNameType != displayNameType) { + NotificationChain msgs = null; + if (displayNameType != null) + msgs = ((InternalEObject)displayNameType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, null, msgs); + if (newDisplayNameType != null) + msgs = ((InternalEObject)newDisplayNameType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, null, msgs); + msgs = basicSetDisplayNameType(newDisplayNameType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, newDisplayNameType, newDisplayNameType)); + } + + /** + * + * + * @generated + */ + public IconType getIconType() { + return iconType; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetIconType(IconType newIconType, NotificationChain msgs) { + IconType oldIconType = iconType; + iconType = newIconType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, oldIconType, newIconType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setIconType(IconType newIconType) { + if (newIconType != iconType) { + NotificationChain msgs = null; + if (iconType != null) + msgs = ((InternalEObject)iconType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, null, msgs); + if (newIconType != null) + msgs = ((InternalEObject)newIconType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, null, msgs); + msgs = basicSetIconType(newIconType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, newIconType, newIconType)); + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: + return ((InternalEList)getPortComponents()).basicRemove(otherEnd, msgs); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: + return basicSetDescriptionType(null, msgs); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: + return basicSetDisplayNameType(null, msgs); + case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: + return basicSetIconType(null, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: + return getJaxrpcMappingFile(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: + return getWebServiceDescriptionName(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: + return getWsdlFile(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: + return getSmallIcon(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: + return getLargeIcon(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: + return getDescription(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: + return getDisplayName(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: + return getPortComponents(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: + return getDescriptionType(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: + return getDisplayNameType(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: + return getIconType(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: + setJaxrpcMappingFile((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: + setWebServiceDescriptionName((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: + setWsdlFile((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: + setDescription((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: + getPortComponents().clear(); + getPortComponents().addAll((Collection)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: + setDescriptionType((DescriptionType)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: + setDisplayNameType((DisplayNameType)newValue); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: + setIconType((IconType)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: + setJaxrpcMappingFile(JAXRPC_MAPPING_FILE_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: + setWebServiceDescriptionName(WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: + setWsdlFile(WSDL_FILE_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: + getPortComponents().clear(); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: + setDescriptionType((DescriptionType)null); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: + setDisplayNameType((DisplayNameType)null); + return; + case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: + setIconType((IconType)null); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: + return JAXRPC_MAPPING_FILE_EDEFAULT == null ? jaxrpcMappingFile != null : !JAXRPC_MAPPING_FILE_EDEFAULT.equals(jaxrpcMappingFile); + case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: + return WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT == null ? webServiceDescriptionName != null : !WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT.equals(webServiceDescriptionName); + case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: + return WSDL_FILE_EDEFAULT == null ? wsdlFile != null : !WSDL_FILE_EDEFAULT.equals(wsdlFile); + case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: + return portComponents != null && !portComponents.isEmpty(); + case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: + return descriptionType != null; + case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: + return displayNameType != null; + case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: + return iconType != null; + } + return eDynamicIsSet(eFeature); + } + + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jaxrpcMappingFile: ");//$NON-NLS-1$ + result.append(jaxrpcMappingFile); + result.append(", webServiceDescriptionName: ");//$NON-NLS-1$ + result.append(webServiceDescriptionName); + result.append(", wsdlFile: ");//$NON-NLS-1$ + result.append(wsdlFile); + result.append(", smallIcon: ");//$NON-NLS-1$ + result.append(smallIcon); + result.append(", largeIcon: ");//$NON-NLS-1$ + result.append(largeIcon); + result.append(", description: ");//$NON-NLS-1$ + result.append(description); + result.append(", displayName: ");//$NON-NLS-1$ + result.append(displayName); + result.append(')'); + return result.toString(); + } + + /** + * @param newDescription + */ + protected void internalSetDescriptionType(String newDescription) { + DescriptionType newValue = null; + if(getDescriptionType() != null) { + newValue = getDescriptionType(); + newValue.setValue(newDescription); + } + else { + newValue = WscommonFactory.eINSTANCE.createDescriptionType(); + newValue.setValue(newDescription); + setDescriptionType(newValue); + } + + } + + /** + * @param newDisplayName + */ + protected void internalSetDisplayNameType(String newDisplayName) { + DisplayNameType newValue = null; + if(getDisplayNameType() != null) { + newValue = getDisplayNameType(); + newValue.setValue(newDisplayName); + } + else { + newValue = WscommonFactory.eINSTANCE.createDisplayNameType(); + newValue.setValue(newDisplayName); + setDisplayNameType(newValue); + } + + } + + /** + * @param newLargeIcon + */ + protected void internalSetLargeIconType(String newLargeIcon) { + IconType newValue = null; + if(getIconType() != null) { + newValue = getIconType(); + newValue.setLargeIcon(newLargeIcon); + } + else { + newValue = CommonFactory.eINSTANCE.createIconType(); + newValue.setLargeIcon(newLargeIcon); + setIconType(newValue); + } + + } + + /** + * @param newSmallIcon + */ + protected void internalSetSmallIconType(String newSmallIcon) { + IconType newValue = null; + if(getIconType() != null) { + newValue = getIconType(); + newValue.setSmallIcon(newSmallIcon); + } + else { + newValue = CommonFactory.eINSTANCE.createIconType(); + newValue.setSmallIcon(newSmallIcon); + setIconType(newValue); + } + } + + public void setLargeIcon(String newLargeIcon) { + if(eResource() == null) { + setLargeIconGen(newLargeIcon); + internalSetLargeIconType(newLargeIcon); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setLargeIconGen(newLargeIcon); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetLargeIconType(newLargeIcon); + break; + } + } + + public void setSmallIcon(String newSmallIcon) { + if(eResource() == null) { + setSmallIconGen(newSmallIcon); + internalSetSmallIconType(newSmallIcon); + return; + } + + switch (getJ2EEVersionID()) { + case J2EEVersionConstants.J2EE_1_2_ID : + case J2EEVersionConstants.J2EE_1_3_ID : + setSmallIconGen(newSmallIcon); + break; + case J2EEVersionConstants.J2EE_1_4_ID : + default : + internalSetSmallIconType(newSmallIcon); + break; + } + } + +} //WebServiceDescriptionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServicesImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServicesImpl.java new file mode 100644 index 000000000..dfaedf9bb --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WebServicesImpl.java @@ -0,0 +1,241 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.jst.j2ee.internal.common.impl.CompatibilityDescriptionGroupImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model object 'Web Services'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServicesImpl#getWebServiceDescriptions Web Service Descriptions}
  • + *
+ *

+ * + * @generated + */ +public class WebServicesImpl extends CompatibilityDescriptionGroupImpl implements WebServices +{ + /** + * The cached value of the '{@link #getWebServiceDescriptions() Web Service Descriptions}' containment reference list. + * + * + * @see #getWebServiceDescriptions() + * @generated + * @ordered + */ + protected EList webServiceDescriptions = null; + + /** + * + * + * @generated + */ + protected WebServicesImpl() { + super(); + } + + /** + * + * + * @generated + */ + protected EClass eStaticClass() { + return WsddPackage.eINSTANCE.getWebServices(); + } + + /** + * + */ + public void setDisplayName(String newDisplayName) { + super.setDisplayName(newDisplayName); + } + + /** + * + * + * @generated + */ + public EList getWebServiceDescriptions() { + if (webServiceDescriptions == null) { + webServiceDescriptions = new EObjectContainmentEList(WebServiceDescription.class, this, WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS); + } + return webServiceDescriptions; + } + + /** + * + * + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { + if (featureID >= 0) { + switch (eDerivedStructuralFeatureID(featureID, baseClass)) { + case WsddPackage.WEB_SERVICES__ICONS: + return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); + case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: + return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); + case WsddPackage.WEB_SERVICES__DESCRIPTIONS: + return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); + case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: + return ((InternalEList)getWebServiceDescriptions()).basicRemove(otherEnd, msgs); + default: + return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); + } + } + return eBasicSetContainer(null, featureID, msgs); + } + + /** + * + * + * @generated + */ + public Object eGet(EStructuralFeature eFeature, boolean resolve) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICES__ICONS: + return getIcons(); + case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: + return getDisplayNames(); + case WsddPackage.WEB_SERVICES__DESCRIPTIONS: + return getDescriptions(); + case WsddPackage.WEB_SERVICES__SMALL_ICON: + return getSmallIcon(); + case WsddPackage.WEB_SERVICES__LARGE_ICON: + return getLargeIcon(); + case WsddPackage.WEB_SERVICES__DESCRIPTION: + return getDescription(); + case WsddPackage.WEB_SERVICES__DISPLAY_NAME: + return getDisplayName(); + case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: + return getWebServiceDescriptions(); + } + return eDynamicGet(eFeature, resolve); + } + + /** + * + * + * @generated + */ + public void eSet(EStructuralFeature eFeature, Object newValue) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICES__ICONS: + getIcons().clear(); + getIcons().addAll((Collection)newValue); + return; + case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: + getDisplayNames().clear(); + getDisplayNames().addAll((Collection)newValue); + return; + case WsddPackage.WEB_SERVICES__DESCRIPTIONS: + getDescriptions().clear(); + getDescriptions().addAll((Collection)newValue); + return; + case WsddPackage.WEB_SERVICES__SMALL_ICON: + setSmallIcon((String)newValue); + return; + case WsddPackage.WEB_SERVICES__LARGE_ICON: + setLargeIcon((String)newValue); + return; + case WsddPackage.WEB_SERVICES__DESCRIPTION: + setDescription((String)newValue); + return; + case WsddPackage.WEB_SERVICES__DISPLAY_NAME: + setDisplayName((String)newValue); + return; + case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: + getWebServiceDescriptions().clear(); + getWebServiceDescriptions().addAll((Collection)newValue); + return; + } + eDynamicSet(eFeature, newValue); + } + + /** + * + * + * @generated + */ + public void eUnset(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICES__ICONS: + getIcons().clear(); + return; + case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: + getDisplayNames().clear(); + return; + case WsddPackage.WEB_SERVICES__DESCRIPTIONS: + getDescriptions().clear(); + return; + case WsddPackage.WEB_SERVICES__SMALL_ICON: + setSmallIcon(SMALL_ICON_EDEFAULT); + return; + case WsddPackage.WEB_SERVICES__LARGE_ICON: + setLargeIcon(LARGE_ICON_EDEFAULT); + return; + case WsddPackage.WEB_SERVICES__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case WsddPackage.WEB_SERVICES__DISPLAY_NAME: + setDisplayName(DISPLAY_NAME_EDEFAULT); + return; + case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: + getWebServiceDescriptions().clear(); + return; + } + eDynamicUnset(eFeature); + } + + /** + * + * + * @generated + */ + public boolean eIsSet(EStructuralFeature eFeature) { + switch (eDerivedStructuralFeatureID(eFeature)) { + case WsddPackage.WEB_SERVICES__ICONS: + return icons != null && !icons.isEmpty(); + case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: + return displayNames != null && !displayNames.isEmpty(); + case WsddPackage.WEB_SERVICES__DESCRIPTIONS: + return descriptions != null && !descriptions.isEmpty(); + case WsddPackage.WEB_SERVICES__SMALL_ICON: + return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); + case WsddPackage.WEB_SERVICES__LARGE_ICON: + return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); + case WsddPackage.WEB_SERVICES__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case WsddPackage.WEB_SERVICES__DISPLAY_NAME: + return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); + case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: + return webServiceDescriptions != null && !webServiceDescriptions.isEmpty(); + } + return eDynamicIsSet(eFeature); + } + +} //WebServicesImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddFactoryImpl.java new file mode 100644 index 000000000..296f7e359 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddFactoryImpl.java @@ -0,0 +1,176 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddFactory; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class WsddFactoryImpl extends EFactoryImpl implements WsddFactory +{ + /** + * Creates and instance of the factory. + * + * + * @generated + */ + public WsddFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case WsddPackage.WEB_SERVICES: return createWebServices(); + case WsddPackage.WEB_SERVICE_DESCRIPTION: return createWebServiceDescription(); + case WsddPackage.PORT_COMPONENT: return createPortComponent(); + case WsddPackage.WSDL_PORT: return createWSDLPort(); + case WsddPackage.SERVICE_IMPL_BEAN: return createServiceImplBean(); + case WsddPackage.SERVLET_LINK: return createServletLink(); + case WsddPackage.EJB_LINK: return createEJBLink(); + case WsddPackage.HANDLER: return createHandler(); + case WsddPackage.BEAN_LINK: return createBeanLink(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");//$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public WebServices createWebServices() { + WebServicesImpl webServices = new WebServicesImpl(); + return webServices; + } + + /** + * + * + * @generated + */ + public WebServiceDescription createWebServiceDescription() { + WebServiceDescriptionImpl webServiceDescription = new WebServiceDescriptionImpl(); + return webServiceDescription; + } + + /** + * + * + * @generated + */ + public PortComponent createPortComponent() { + PortComponentImpl portComponent = new PortComponentImpl(); + return portComponent; + } + + /** + * + * + * @generated + */ + public WSDLPort createWSDLPort() { + WSDLPortImpl wsdlPort = new WSDLPortImpl(); + return wsdlPort; + } + + /** + * + * + * @generated + */ + public ServiceImplBean createServiceImplBean() { + ServiceImplBeanImpl serviceImplBean = new ServiceImplBeanImpl(); + return serviceImplBean; + } + + /** + * + * + * @generated + */ + public ServletLink createServletLink() { + ServletLinkImpl servletLink = new ServletLinkImpl(); + return servletLink; + } + + /** + * + * + * @generated + */ + public EJBLink createEJBLink() { + EJBLinkImpl ejbLink = new EJBLinkImpl(); + return ejbLink; + } + + /** + * + * + * @generated + */ + public Handler createHandler() { + HandlerImpl handler = new HandlerImpl(); + return handler; + } + + /** + * + * + * @generated + */ + public BeanLink createBeanLink() { + BeanLinkImpl beanLink = new BeanLinkImpl(); + return beanLink; + } + + /** + * + * + * @generated + */ + public WsddPackage getWsddPackage() { + return (WsddPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + public static WsddPackage getPackage() { + return WsddPackage.eINSTANCE; + } +} //WsddFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddPackageImpl.java new file mode 100644 index 000000000..25a72643f --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddPackageImpl.java @@ -0,0 +1,783 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.impl.EcorePackageImpl; +import org.eclipse.jem.java.impl.JavaRefPackageImpl; +import org.eclipse.jst.j2ee.application.ApplicationPackage; +import org.eclipse.jst.j2ee.client.ClientPackage; +import org.eclipse.jst.j2ee.common.CommonPackage; +import org.eclipse.jst.j2ee.ejb.EjbPackage; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.client.impl.ClientPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbPackageImpl; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaPackageImpl; +import org.eclipse.jst.j2ee.internal.jsp.impl.JspPackageImpl; +import org.eclipse.jst.j2ee.internal.taglib.impl.TaglibPackageImpl; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationPackageImpl; +import org.eclipse.jst.j2ee.jca.JcaPackage; +import org.eclipse.jst.j2ee.jsp.JspPackage; +import org.eclipse.jst.j2ee.taglib.TaglibPackage; +import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; +import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddFactory; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class WsddPackageImpl extends EPackageImpl implements WsddPackage +{ + /** + * + * + * @generated + */ + private EClass webServicesEClass = null; + + /** + * + * + * @generated + */ + private EClass webServiceDescriptionEClass = null; + + /** + * + * + * @generated + */ + private EClass portComponentEClass = null; + + /** + * + * + * @generated + */ + private EClass wsdlPortEClass = null; + + /** + * + * + * @generated + */ + private EClass serviceImplBeanEClass = null; + + /** + * + * + * @generated + */ + private EClass servletLinkEClass = null; + + /** + * + * + * @generated + */ + private EClass ejbLinkEClass = null; + + /** + * + * + * @generated + */ + private EClass handlerEClass = null; + + /** + * + * + * @generated + */ + private EClass beanLinkEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage#eNS_URI + * @see #init() + * @generated + */ + private WsddPackageImpl() { + super(eNS_URI, WsddFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *

Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *

Invocation of this method will not affect any packages that have + * already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static WsddPackage init() { + if (isInited) return (WsddPackage)EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI); + + // Obtain or create and register package. + WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WsddPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackageImpl.init(); + JavaRefPackageImpl.init(); + + // Obtain or create and register interdependencies + EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); + ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); + Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); + WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); + ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); + JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); + TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); + + // Step 1: create meta-model objects + theWsddPackage.createPackageContents(); + theEjbPackage.createPackageContents(); + theClientPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + theJcaPackage.createPackageContents(); + theWebservice_clientPackage.createPackageContents(); + theWscommonPackage.createPackageContents(); + theWebapplicationPackage.createPackageContents(); + theApplicationPackage.createPackageContents(); + theJspPackage.createPackageContents(); + theTaglibPackage.createPackageContents(); + + // Step 2: complete initialization + theWsddPackage.initializePackageContents(); + theEjbPackage.initializePackageContents(); + theClientPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + theJcaPackage.initializePackageContents(); + theWebservice_clientPackage.initializePackageContents(); + theWscommonPackage.initializePackageContents(); + theWebapplicationPackage.initializePackageContents(); + theApplicationPackage.initializePackageContents(); + theJspPackage.initializePackageContents(); + theTaglibPackage.initializePackageContents(); + + return theWsddPackage; + } + + /** + * + * + * @generated + */ + public EClass getWebServices() { + return webServicesEClass; + } + + /** + * + * + * @generated + */ + public EReference getWebServices_WebServiceDescriptions() { + return (EReference)webServicesEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getWebServiceDescription() { + return webServiceDescriptionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_JaxrpcMappingFile() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_WebServiceDescriptionName() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_WsdlFile() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_SmallIcon() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_LargeIcon() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_Description() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getWebServiceDescription_DisplayName() { + return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getWebServiceDescription_PortComponents() { + return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getWebServiceDescription_DescriptionType() { + return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getWebServiceDescription_DisplayNameType() { + return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EReference getWebServiceDescription_IconType() { + return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EClass getPortComponent() { + return portComponentEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_PortComponentName() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_ServiceEndpointInterface() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_SmallIcon() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_LargeIcon() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_Description() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getPortComponent_DisplayName() { + return (EAttribute)portComponentEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_WsdlPort() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_ServiceImplBean() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_Handlers() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_DescriptionType() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_DisplayNameType() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getPortComponent_IconType() { + return (EReference)portComponentEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EClass getWSDLPort() { + return wsdlPortEClass; + } + + /** + * + * + * @generated + */ + public EClass getServiceImplBean() { + return serviceImplBeanEClass; + } + + /** + * + * + * @generated + */ + public EReference getServiceImplBean_EEJBLink() { + return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getServiceImplBean_EServletLink() { + return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getServiceImplBean_BeanLink() { + return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getServletLink() { + return servletLinkEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getServletLink_ServletLink() { + return (EAttribute)servletLinkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getEJBLink() { + return ejbLinkEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEJBLink_EjbLink() { + return (EAttribute)ejbLinkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getHandler() { + return handlerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHandler_HandlerName() { + return (EAttribute)handlerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getHandler_HandlerClass() { + return (EAttribute)handlerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getHandler_InitParams() { + return (EReference)handlerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getHandler_SoapHeaders() { + return (EReference)handlerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getHandler_SoapRoles() { + return (EReference)handlerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getBeanLink() { + return beanLinkEClass; + } + + /** + * + * + * @generated + */ + public WsddFactory getWsddFactory() { + return (WsddFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + webServicesEClass = createEClass(WEB_SERVICES); + createEReference(webServicesEClass, WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS); + + webServiceDescriptionEClass = createEClass(WEB_SERVICE_DESCRIPTION); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__WSDL_FILE); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__SMALL_ICON); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__LARGE_ICON); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DESCRIPTION); + createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DISPLAY_NAME); + createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS); + createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE); + createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE); + createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__ICON_TYPE); + + portComponentEClass = createEClass(PORT_COMPONENT); + createEAttribute(portComponentEClass, PORT_COMPONENT__PORT_COMPONENT_NAME); + createEAttribute(portComponentEClass, PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE); + createEAttribute(portComponentEClass, PORT_COMPONENT__SMALL_ICON); + createEAttribute(portComponentEClass, PORT_COMPONENT__LARGE_ICON); + createEAttribute(portComponentEClass, PORT_COMPONENT__DESCRIPTION); + createEAttribute(portComponentEClass, PORT_COMPONENT__DISPLAY_NAME); + createEReference(portComponentEClass, PORT_COMPONENT__WSDL_PORT); + createEReference(portComponentEClass, PORT_COMPONENT__SERVICE_IMPL_BEAN); + createEReference(portComponentEClass, PORT_COMPONENT__HANDLERS); + createEReference(portComponentEClass, PORT_COMPONENT__DESCRIPTION_TYPE); + createEReference(portComponentEClass, PORT_COMPONENT__DISPLAY_NAME_TYPE); + createEReference(portComponentEClass, PORT_COMPONENT__ICON_TYPE); + + wsdlPortEClass = createEClass(WSDL_PORT); + + serviceImplBeanEClass = createEClass(SERVICE_IMPL_BEAN); + createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__EEJB_LINK); + createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__ESERVLET_LINK); + createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__BEAN_LINK); + + servletLinkEClass = createEClass(SERVLET_LINK); + createEAttribute(servletLinkEClass, SERVLET_LINK__SERVLET_LINK); + + ejbLinkEClass = createEClass(EJB_LINK); + createEAttribute(ejbLinkEClass, EJB_LINK__EJB_LINK); + + handlerEClass = createEClass(HANDLER); + createEAttribute(handlerEClass, HANDLER__HANDLER_NAME); + createEAttribute(handlerEClass, HANDLER__HANDLER_CLASS); + createEReference(handlerEClass, HANDLER__INIT_PARAMS); + createEReference(handlerEClass, HANDLER__SOAP_HEADERS); + createEReference(handlerEClass, HANDLER__SOAP_ROLES); + + beanLinkEClass = createEClass(BEAN_LINK); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI); + + // Add supertypes to classes + webServicesEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + wsdlPortEClass.getESuperTypes().add(theCommonPackage.getQName()); + servletLinkEClass.getESuperTypes().add(this.getBeanLink()); + ejbLinkEClass.getESuperTypes().add(this.getBeanLink()); + handlerEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); + + // Initialize classes and features; add operations and parameters + initEClass(webServicesEClass, WebServices.class, "WebServices", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getWebServices_WebServiceDescriptions(), this.getWebServiceDescription(), null, "webServiceDescriptions", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(webServiceDescriptionEClass, WebServiceDescription.class, "WebServiceDescription", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_JaxrpcMappingFile(), ecorePackage.getEString(), "jaxrpcMappingFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_WebServiceDescriptionName(), ecorePackage.getEString(), "webServiceDescriptionName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_WsdlFile(), ecorePackage.getEString(), "wsdlFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getWebServiceDescription_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebServiceDescription_PortComponents(), this.getPortComponent(), null, "portComponents", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebServiceDescription_DescriptionType(), theWscommonPackage.getDescriptionType(), null, "descriptionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebServiceDescription_DisplayNameType(), theWscommonPackage.getDisplayNameType(), null, "displayNameType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getWebServiceDescription_IconType(), theCommonPackage.getIconType(), null, "iconType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(portComponentEClass, PortComponent.class, "PortComponent", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getPortComponent_PortComponentName(), ecorePackage.getEString(), "portComponentName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getPortComponent_ServiceEndpointInterface(), ecorePackage.getEString(), "serviceEndpointInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getPortComponent_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getPortComponent_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getPortComponent_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getPortComponent_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_WsdlPort(), this.getWSDLPort(), null, "wsdlPort", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_ServiceImplBean(), this.getServiceImplBean(), null, "serviceImplBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_Handlers(), this.getHandler(), null, "handlers", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_DescriptionType(), theWscommonPackage.getDescriptionType(), null, "descriptionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_DisplayNameType(), theWscommonPackage.getDisplayNameType(), null, "displayNameType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getPortComponent_IconType(), theCommonPackage.getIconType(), null, "iconType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(wsdlPortEClass, WSDLPort.class, "WSDLPort", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + initEClass(serviceImplBeanEClass, ServiceImplBean.class, "ServiceImplBean", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEReference(getServiceImplBean_EEJBLink(), this.getEJBLink(), null, "eEJBLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServiceImplBean_EServletLink(), this.getServletLink(), null, "eServletLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getServiceImplBean_BeanLink(), this.getBeanLink(), null, "beanLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(servletLinkEClass, ServletLink.class, "ServletLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getServletLink_ServletLink(), ecorePackage.getEString(), "servletLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(ejbLinkEClass, EJBLink.class, "EJBLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getEJBLink_EjbLink(), ecorePackage.getEString(), "ejbLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(handlerEClass, Handler.class, "Handler", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + initEAttribute(getHandler_HandlerName(), ecorePackage.getEString(), "handlerName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEAttribute(getHandler_HandlerClass(), ecorePackage.getEString(), "handlerClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_InitParams(), theWscommonPackage.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_SoapHeaders(), theWscommonPackage.getSOAPHeader(), null, "soapHeaders", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + initEReference(getHandler_SoapRoles(), theWscommonPackage.getSOAPRole(), null, "soapRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ + + initEClass(beanLinkEClass, BeanLink.class, "BeanLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } +} //WsddPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddResourceImpl.java new file mode 100644 index 000000000..9b5937549 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/impl/WsddResourceImpl.java @@ -0,0 +1,181 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.impl; + + +import org.eclipse.emf.common.util.URI; +import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; +import org.eclipse.jst.j2ee.internal.model.translator.webservices.WsddTranslator; +import org.eclipse.jst.j2ee.webservice.WebServiceConstants; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddResource; +import org.eclipse.wst.common.internal.emf.resource.Renderer; +import org.eclipse.wst.common.internal.emf.resource.Translator; + +public class WsddResourceImpl extends XMLResourceImpl implements WsddResource +{ + /** + * Constructor for WsddResourceImpl. + */ + public WsddResourceImpl(URI uri, Renderer aRenderer) { + super(uri, aRenderer); + } + + /** + * Constructor for WsddResourceImpl. + * @param uri + */ + public WsddResourceImpl(Renderer aRenderer) { + super(aRenderer); + } + + /** + * Return the first element in the EList. + */ + public WebServices getWebServices() { + return (WebServices) getRootObject(); + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() + */ + public Translator getRootTranslator() { + return WsddTranslator.INSTANCE; + } + + /** + * @see org.eclipse.jst.j2ee.internal.common.XMLResource#getType() + */ + public int getType() { + return WEB_SERVICE_TYPE; + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() + */ + public String getDoctype() + { + switch (getJ2EEVersionID()) + { + case (J2EE_1_2_ID) : + case (J2EE_1_3_ID) : + return WebServiceConstants.WEBSERVICE_DOCTYPE; + default : + return null; + } + + + } + + public boolean isWebService1_0() + { + return (getModuleVersionID()==WebServiceConstants.WEBSERVICE_1_0_ID); + } + + public boolean isWebService1_1() + { + return (getModuleVersionID()==WebServiceConstants.WEBSERVICE_1_1_ID); + } + + /* + * This directly sets the module version id + */ + public void setModuleVersionID(int id) { + super.setVersionID(id); + switch (id) { + case (WebServiceConstants.WEBSERVICE_1_1_ID) : + super.setDoctypeValues(null, null); + break; + case (WebServiceConstants.WEBSERVICE_1_0_ID) : + super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + break; + } + } + /* + * Based on the J2EE version, this will set the module version + */ + public void setJ2EEVersionID(int id) + { + switch (id) { + case (J2EE_1_4_ID) : + primSetDoctypeValues(null, null); + primSetVersionID(WebServiceConstants.WEBSERVICE_1_1_ID); + break; + case (J2EE_1_3_ID) : + primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); + primSetVersionID(WebServiceConstants.WEBSERVICE_1_0_ID); + break; + case (J2EE_1_2_ID) : + primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); + primSetVersionID(WebServiceConstants.WEBSERVICE_1_0_ID); + } + + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() + */ + public String getJ2EE_1_2_PublicID() { + return WebServiceConstants.WEBSERVICE_PUBLICID; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() + */ + public String getJ2EE_1_2_SystemID() { + return WebServiceConstants.WEBSERVICE_SYSTEMID; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() + */ + public String getJ2EE_1_3_PublicID() { + return WebServiceConstants.WEBSERVICE_PUBLICID; + } + + /* (non-Javadoc) + * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() + */ + public String getJ2EE_1_3_SystemID() { + return WebServiceConstants.WEBSERVICE_SYSTEMID; + } + + /* Return J2EE version based on module version + */ + public int getJ2EEVersionID() { + switch (getModuleVersionID()) { + case WebServiceConstants.WEBSERVICE_1_0_ID: + return J2EEVersionConstants.J2EE_1_3_ID; + case WebServiceConstants.WEBSERVICE_1_1_ID : + return J2EEVersionConstants.J2EE_1_4_ID; + default : + return J2EEVersionConstants.J2EE_1_4_ID; + } + } + + /* (non-Javadoc) + * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() + */ + protected int getDefaultVersionID() { + return WebServiceConstants.WEBSERVICE_1_1_ID; + } + + + protected void syncVersionOfRootObject() + { + //Do nothing for now since the root object does not have a version. + } + + + +} + diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddAdapterFactory.java new file mode 100644 index 000000000..fd0fda837 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddAdapterFactory.java @@ -0,0 +1,323 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage + * @generated + */ +public class WsddAdapterFactory extends AdapterFactoryImpl +{ + + /** + * The cached model package. + * + * + * @generated + */ + protected static WsddPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public WsddAdapterFactory() { + if (modelPackage == null) { + modelPackage = WsddPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * + * @generated + */ + protected WsddSwitch modelSwitch = + new WsddSwitch() { + public Object caseWebServices(WebServices object) { + return createWebServicesAdapter(); + } + public Object caseWebServiceDescription(WebServiceDescription object) { + return createWebServiceDescriptionAdapter(); + } + public Object casePortComponent(PortComponent object) { + return createPortComponentAdapter(); + } + public Object caseWSDLPort(WSDLPort object) { + return createWSDLPortAdapter(); + } + public Object caseServiceImplBean(ServiceImplBean object) { + return createServiceImplBeanAdapter(); + } + public Object caseServletLink(ServletLink object) { + return createServletLinkAdapter(); + } + public Object caseEJBLink(EJBLink object) { + return createEJBLinkAdapter(); + } + public Object caseHandler(Handler object) { + return createHandlerAdapter(); + } + public Object caseBeanLink(BeanLink object) { + return createBeanLinkAdapter(); + } + public Object caseDescriptionGroup(DescriptionGroup object) { + return createDescriptionGroupAdapter(); + } + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return createCompatibilityDescriptionGroupAdapter(); + } + public Object caseQName(QName object) { + return createQNameAdapter(); + } + public Object defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + public Adapter createAdapter(Notifier target) { + return (Adapter)modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServices Web Services}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServices + * @generated + */ + public Adapter createWebServicesAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServiceDescription Web Service Description}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServiceDescription + * @generated + */ + public Adapter createWebServiceDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.PortComponent Port Component}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.PortComponent + * @generated + */ + public Adapter createPortComponentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WSDLPort WSDL Port}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WSDLPort + * @generated + */ + public Adapter createWSDLPortAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.ServiceImplBean Service Impl Bean}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.ServiceImplBean + * @generated + */ + public Adapter createServiceImplBeanAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.ServletLink Servlet Link}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.ServletLink + * @generated + */ + public Adapter createServletLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.EJBLink EJB Link}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.EJBLink + * @generated + */ + public Adapter createEJBLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.Handler Handler}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.Handler + * @generated + */ + public Adapter createHandlerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.BeanLink Bean Link}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.BeanLink + * @generated + */ + public Adapter createBeanLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup + * @generated + */ + public Adapter createDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup + * @generated + */ + public Adapter createCompatibilityDescriptionGroupAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.jst.j2ee.internal.common.QName + * @generated + */ + public Adapter createQNameAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //WsddAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddSwitch.java new file mode 100644 index 000000000..7c699e251 --- /dev/null +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/internal/wsdd/util/WsddSwitch.java @@ -0,0 +1,338 @@ +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.webservice.internal.wsdd.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; +import org.eclipse.jst.j2ee.common.DescriptionGroup; +import org.eclipse.jst.j2ee.common.QName; +import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; +import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; +import org.eclipse.jst.j2ee.webservice.wsdd.Handler; +import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; +import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; +import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; +import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; +import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; +import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; + + + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage + * @generated + */ +public class WsddSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static WsddPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public WsddSwitch() { + if (modelPackage == null) { + modelPackage = WsddPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + EClass theEClass = theEObject.eClass(); + if (theEClass.eContainer() == modelPackage) { + switch (theEClass.getClassifierID()) { + case WsddPackage.WEB_SERVICES: { + WebServices webServices = (WebServices)theEObject; + Object result = caseWebServices(webServices); + if (result == null) result = caseCompatibilityDescriptionGroup(webServices); + if (result == null) result = caseDescriptionGroup(webServices); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.WEB_SERVICE_DESCRIPTION: { + WebServiceDescription webServiceDescription = (WebServiceDescription)theEObject; + Object result = caseWebServiceDescription(webServiceDescription); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.PORT_COMPONENT: { + PortComponent portComponent = (PortComponent)theEObject; + Object result = casePortComponent(portComponent); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.WSDL_PORT: { + WSDLPort wsdlPort = (WSDLPort)theEObject; + Object result = caseWSDLPort(wsdlPort); + if (result == null) result = caseQName(wsdlPort); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.SERVICE_IMPL_BEAN: { + ServiceImplBean serviceImplBean = (ServiceImplBean)theEObject; + Object result = caseServiceImplBean(serviceImplBean); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.SERVLET_LINK: { + ServletLink servletLink = (ServletLink)theEObject; + Object result = caseServletLink(servletLink); + if (result == null) result = caseBeanLink(servletLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.EJB_LINK: { + EJBLink ejbLink = (EJBLink)theEObject; + Object result = caseEJBLink(ejbLink); + if (result == null) result = caseBeanLink(ejbLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.HANDLER: { + Handler handler = (Handler)theEObject; + Object result = caseHandler(handler); + if (result == null) result = caseCompatibilityDescriptionGroup(handler); + if (result == null) result = caseDescriptionGroup(handler); + if (result == null) result = defaultCase(theEObject); + return result; + } + case WsddPackage.BEAN_LINK: { + BeanLink beanLink = (BeanLink)theEObject; + Object result = caseBeanLink(beanLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + return defaultCase(theEObject); + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Services'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Services'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebServices(WebServices object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Service Description'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Service Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebServiceDescription(WebServiceDescription object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Port Component'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Port Component'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object casePortComponent(PortComponent object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'WSDL Port'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'WSDL Port'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWSDLPort(WSDLPort object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Service Impl Bean'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Service Impl Bean'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServiceImplBean(ServiceImplBean object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Servlet Link'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Servlet Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseServletLink(ServletLink object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EJB Link'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EJB Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEJBLink(EJBLink object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Handler'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Handler'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseHandler(Handler object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Bean Link'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Bean Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseBeanLink(BeanLink object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDescriptionGroup(DescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'QName'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'QName'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQName(QName object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //WsddSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/DescriptionGroupHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/DescriptionGroupHelper.java deleted file mode 100644 index b22f5e732..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/util/DescriptionGroupHelper.java +++ /dev/null @@ -1,1577 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.j2ee.webservice.util; - -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; - - -public class DescriptionGroupHelper -{ - - public static String[] getValues(WebServices webServices, DescriptionGroupItem item) - { - return getValues(webServices, item, false); - } - - public static String[] getValues(WebServices webServices, DescriptionGroupItem item, boolean getLang) - { - J2EEVersionResource res = (J2EEVersionResource)webServices.eResource(); - boolean isJ2EE14=false; - if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) - { - isJ2EE14 = true; - } - - switch (item.getValue()) - { - case DescriptionGroupItem.DESCRIPTION: - return getDescriptions(webServices, isJ2EE14, getLang); - //break; - case DescriptionGroupItem.DISPLAY_NAME: - return getDisplayNames(webServices, isJ2EE14, getLang); - //break; - case DescriptionGroupItem.SMALL_ICON: - return getSmallIcons(webServices, isJ2EE14, getLang); - //break; - case DescriptionGroupItem.LARGE_ICON: - return getLargeIcons(webServices, isJ2EE14, getLang); - //break; - default: - return null; - } - } - - - private static String[] getDescriptions(WebServices webServices, boolean isJ2EE14, boolean lang) - { - - String[] values = null; - if (isJ2EE14) - { - Object[] descriptions = webServices.getDescriptions().toArray(); - values = new String[descriptions.length]; - if (lang) - { - for(int i =0; i * @generated */ - Webservice_clientFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientFactoryImpl(); + Webservice_clientFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientFactoryImpl(); /** * Returns a new object of class 'Service Ref'. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/Webservice_clientPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/Webservice_clientPackage.java index e12a048ec..945381d06 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/Webservice_clientPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/Webservice_clientPackage.java @@ -62,7 +62,7 @@ public interface Webservice_clientPackage extends EPackage{ * * @generated */ - Webservice_clientPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl.init(); + Webservice_clientPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.internal.wsclient.impl.Webservice_clientPackageImpl.init(); /** * The meta object id for the '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl Service Ref}' class. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ComponentScopedRefsImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ComponentScopedRefsImpl.java deleted file mode 100644 index 4cdb5fe0f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ComponentScopedRefsImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model object 'Component Scoped Refs'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ComponentScopedRefsImpl#getComponentName Component Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ComponentScopedRefsImpl#getServiceRefs Service Refs}
  • - *
- *

- * - * @generated - */ -public class ComponentScopedRefsImpl extends EObjectImpl implements ComponentScopedRefs { - /** - * The default value of the '{@link #getComponentName() Component Name}' attribute. - * - * - * @see #getComponentName() - * @generated - * @ordered - */ - protected static final String COMPONENT_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getComponentName() Component Name}' attribute. - * - * - * @see #getComponentName() - * @generated - * @ordered - */ - protected String componentName = COMPONENT_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. - * - * - * @see #getServiceRefs() - * @generated - * @ordered - */ - protected EList serviceRefs = null; - - /** - * - * - * @generated - */ - protected ComponentScopedRefsImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return Webservice_clientPackage.eINSTANCE.getComponentScopedRefs(); - } - - /** - * - * - * @generated - */ - public String getComponentName() { - return componentName; - } - - /** - * - * - * @generated - */ - public void setComponentName(String newComponentName) { - String oldComponentName = componentName; - componentName = newComponentName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME, oldComponentName, componentName)); - } - - /** - * - * - * @generated - */ - public EList getServiceRefs() { - if (serviceRefs == null) { - serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS); - } - return serviceRefs; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: - return getComponentName(); - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: - return getServiceRefs(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: - setComponentName((String)newValue); - return; - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: - setComponentName(COMPONENT_NAME_EDEFAULT); - return; - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: - getServiceRefs().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__COMPONENT_NAME: - return COMPONENT_NAME_EDEFAULT == null ? componentName != null : !COMPONENT_NAME_EDEFAULT.equals(componentName); - case Webservice_clientPackage.COMPONENT_SCOPED_REFS__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (componentName: ");//$NON-NLS-1$ - result.append(componentName); - result.append(')'); - return result.toString(); - } - -} //ComponentScopedRefsImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/HandlerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/HandlerImpl.java deleted file mode 100644 index a818e1d38..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/HandlerImpl.java +++ /dev/null @@ -1,473 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.ParamValue; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model object 'Handler'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getHandlerName Handler Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getSoapRoles Soap Roles}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getPortNames Port Names}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getHandlerClass Handler Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getInitParams Init Params}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.HandlerImpl#getSoapHeaders Soap Headers}
  • - *
- *

- * - * @generated - */ -public class HandlerImpl extends CompatibilityDescriptionGroupImpl implements Handler { - /** - * The default value of the '{@link #getHandlerName() Handler Name}' attribute. - * - * - * @see #getHandlerName() - * @generated - * @ordered - */ - protected static final String HANDLER_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHandlerName() Handler Name}' attribute. - * - * - * @see #getHandlerName() - * @generated - * @ordered - */ - protected String handlerName = HANDLER_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getSoapRoles() Soap Roles}' attribute list. - * - * - * @see #getSoapRoles() - * @generated - * @ordered - */ - protected EList soapRoles = null; - - /** - * The cached value of the '{@link #getPortNames() Port Names}' attribute list. - * - * - * @see #getPortNames() - * @generated - * @ordered - */ - protected EList portNames = null; - - /** - * The cached value of the '{@link #getHandlerClass() Handler Class}' reference. - * - * - * @see #getHandlerClass() - * @generated - * @ordered - */ - protected JavaClass handlerClass = null; - - /** - * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. - * - * - * @see #getInitParams() - * @generated - * @ordered - */ - protected EList initParams = null; - - /** - * The cached value of the '{@link #getSoapHeaders() Soap Headers}' containment reference list. - * - * - * @see #getSoapHeaders() - * @generated - * @ordered - */ - protected EList soapHeaders = null; - - /** - * - * - * @generated - */ - protected HandlerImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return Webservice_clientPackage.eINSTANCE.getHandler(); - } - - /** - * - * - * @generated - */ - public String getHandlerName() { - return handlerName; - } - - /** - * - * - * @generated - */ - public void setHandlerName(String newHandlerName) { - String oldHandlerName = handlerName; - handlerName = newHandlerName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.HANDLER__HANDLER_NAME, oldHandlerName, handlerName)); - } - - /** - * - * - * @generated - */ - public EList getSoapHeaders() { - if (soapHeaders == null) { - soapHeaders = new EObjectContainmentEList(QName.class, this, Webservice_clientPackage.HANDLER__SOAP_HEADERS); - } - return soapHeaders; - } - - /** - * - * - * @generated - */ - public EList getSoapRoles() { - if (soapRoles == null) { - soapRoles = new EDataTypeUniqueEList(String.class, this, Webservice_clientPackage.HANDLER__SOAP_ROLES); - } - return soapRoles; - } - - /** - * - * - * @generated - */ - public EList getPortNames() { - if (portNames == null) { - portNames = new EDataTypeUniqueEList(String.class, this, Webservice_clientPackage.HANDLER__PORT_NAMES); - } - return portNames; - } - - /** - * - * - * @generated - */ - public JavaClass getHandlerClass() { - if (handlerClass != null && handlerClass.eIsProxy()) { - JavaClass oldHandlerClass = handlerClass; - handlerClass = (JavaClass)eResolveProxy((InternalEObject)handlerClass); - if (handlerClass != oldHandlerClass) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); - } - } - return handlerClass; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetHandlerClass() { - return handlerClass; - } - - /** - * - * - * @generated - */ - public void setHandlerClass(JavaClass newHandlerClass) { - JavaClass oldHandlerClass = handlerClass; - handlerClass = newHandlerClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); - } - - /** - * - * - * @generated - */ - public EList getInitParams() { - if (initParams == null) { - initParams = new EObjectContainmentEList(ParamValue.class, this, Webservice_clientPackage.HANDLER__INIT_PARAMS); - } - return initParams; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case Webservice_clientPackage.HANDLER__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.HANDLER__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.HANDLER__INIT_PARAMS: - return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.HANDLER__SOAP_HEADERS: - return ((InternalEList)getSoapHeaders()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.HANDLER__ICONS: - return getIcons(); - case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: - return getDisplayNames(); - case Webservice_clientPackage.HANDLER__DESCRIPTIONS: - return getDescriptions(); - case Webservice_clientPackage.HANDLER__SMALL_ICON: - return getSmallIcon(); - case Webservice_clientPackage.HANDLER__LARGE_ICON: - return getLargeIcon(); - case Webservice_clientPackage.HANDLER__DESCRIPTION: - return getDescription(); - case Webservice_clientPackage.HANDLER__DISPLAY_NAME: - return getDisplayName(); - case Webservice_clientPackage.HANDLER__HANDLER_NAME: - return getHandlerName(); - case Webservice_clientPackage.HANDLER__SOAP_ROLES: - return getSoapRoles(); - case Webservice_clientPackage.HANDLER__PORT_NAMES: - return getPortNames(); - case Webservice_clientPackage.HANDLER__HANDLER_CLASS: - if (resolve) return getHandlerClass(); - return basicGetHandlerClass(); - case Webservice_clientPackage.HANDLER__INIT_PARAMS: - return getInitParams(); - case Webservice_clientPackage.HANDLER__SOAP_HEADERS: - return getSoapHeaders(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.HANDLER__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case Webservice_clientPackage.HANDLER__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case Webservice_clientPackage.HANDLER__DESCRIPTION: - setDescription((String)newValue); - return; - case Webservice_clientPackage.HANDLER__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case Webservice_clientPackage.HANDLER__HANDLER_NAME: - setHandlerName((String)newValue); - return; - case Webservice_clientPackage.HANDLER__SOAP_ROLES: - getSoapRoles().clear(); - getSoapRoles().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__PORT_NAMES: - getPortNames().clear(); - getPortNames().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__HANDLER_CLASS: - setHandlerClass((JavaClass)newValue); - return; - case Webservice_clientPackage.HANDLER__INIT_PARAMS: - getInitParams().clear(); - getInitParams().addAll((Collection)newValue); - return; - case Webservice_clientPackage.HANDLER__SOAP_HEADERS: - getSoapHeaders().clear(); - getSoapHeaders().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.HANDLER__ICONS: - getIcons().clear(); - return; - case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case Webservice_clientPackage.HANDLER__DESCRIPTIONS: - getDescriptions().clear(); - return; - case Webservice_clientPackage.HANDLER__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case Webservice_clientPackage.HANDLER__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case Webservice_clientPackage.HANDLER__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case Webservice_clientPackage.HANDLER__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case Webservice_clientPackage.HANDLER__HANDLER_NAME: - setHandlerName(HANDLER_NAME_EDEFAULT); - return; - case Webservice_clientPackage.HANDLER__SOAP_ROLES: - getSoapRoles().clear(); - return; - case Webservice_clientPackage.HANDLER__PORT_NAMES: - getPortNames().clear(); - return; - case Webservice_clientPackage.HANDLER__HANDLER_CLASS: - setHandlerClass((JavaClass)null); - return; - case Webservice_clientPackage.HANDLER__INIT_PARAMS: - getInitParams().clear(); - return; - case Webservice_clientPackage.HANDLER__SOAP_HEADERS: - getSoapHeaders().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.HANDLER__ICONS: - return icons != null && !icons.isEmpty(); - case Webservice_clientPackage.HANDLER__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case Webservice_clientPackage.HANDLER__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case Webservice_clientPackage.HANDLER__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case Webservice_clientPackage.HANDLER__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case Webservice_clientPackage.HANDLER__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case Webservice_clientPackage.HANDLER__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case Webservice_clientPackage.HANDLER__HANDLER_NAME: - return HANDLER_NAME_EDEFAULT == null ? handlerName != null : !HANDLER_NAME_EDEFAULT.equals(handlerName); - case Webservice_clientPackage.HANDLER__SOAP_ROLES: - return soapRoles != null && !soapRoles.isEmpty(); - case Webservice_clientPackage.HANDLER__PORT_NAMES: - return portNames != null && !portNames.isEmpty(); - case Webservice_clientPackage.HANDLER__HANDLER_CLASS: - return handlerClass != null; - case Webservice_clientPackage.HANDLER__INIT_PARAMS: - return initParams != null && !initParams.isEmpty(); - case Webservice_clientPackage.HANDLER__SOAP_HEADERS: - return soapHeaders != null && !soapHeaders.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (handlerName: ");//$NON-NLS-1$ - result.append(handlerName); - result.append(", soapRoles: ");//$NON-NLS-1$ - result.append(soapRoles); - result.append(", portNames: ");//$NON-NLS-1$ - result.append(portNames); - result.append(')'); - return result.toString(); - } - -} //HandlerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/PortComponentRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/PortComponentRefImpl.java deleted file mode 100644 index f7ed15526..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/PortComponentRefImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model object 'Port Component Ref'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.PortComponentRefImpl#getPortComponentLink Port Component Link}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.PortComponentRefImpl#getServiceEndpointInterface Service Endpoint Interface}
  • - *
- *

- * - * @generated - */ -public class PortComponentRefImpl extends EObjectImpl implements PortComponentRef { - /** - * The default value of the '{@link #getPortComponentLink() Port Component Link}' attribute. - * - * - * @see #getPortComponentLink() - * @generated - * @ordered - */ - protected static final String PORT_COMPONENT_LINK_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPortComponentLink() Port Component Link}' attribute. - * - * - * @see #getPortComponentLink() - * @generated - * @ordered - */ - protected String portComponentLink = PORT_COMPONENT_LINK_EDEFAULT; - - /** - * The cached value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' reference. - * - * - * @see #getServiceEndpointInterface() - * @generated - * @ordered - */ - protected JavaClass serviceEndpointInterface = null; - - /** - * - * - * @generated - */ - protected PortComponentRefImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return Webservice_clientPackage.eINSTANCE.getPortComponentRef(); - } - - /** - * - * - * @generated - */ - public String getPortComponentLink() { - return portComponentLink; - } - - /** - * - * - * @generated - */ - public void setPortComponentLink(String newPortComponentLink) { - String oldPortComponentLink = portComponentLink; - portComponentLink = newPortComponentLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK, oldPortComponentLink, portComponentLink)); - } - - /** - * - * - * @generated - */ - public JavaClass getServiceEndpointInterface() { - if (serviceEndpointInterface != null && serviceEndpointInterface.eIsProxy()) { - JavaClass oldServiceEndpointInterface = serviceEndpointInterface; - serviceEndpointInterface = (JavaClass)eResolveProxy((InternalEObject)serviceEndpointInterface); - if (serviceEndpointInterface != oldServiceEndpointInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); - } - } - return serviceEndpointInterface; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetServiceEndpointInterface() { - return serviceEndpointInterface; - } - - /** - * - * - * @generated - */ - public void setServiceEndpointInterface(JavaClass newServiceEndpointInterface) { - JavaClass oldServiceEndpointInterface = serviceEndpointInterface; - serviceEndpointInterface = newServiceEndpointInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: - return getPortComponentLink(); - case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: - if (resolve) return getServiceEndpointInterface(); - return basicGetServiceEndpointInterface(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: - setPortComponentLink((String)newValue); - return; - case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: - setServiceEndpointInterface((JavaClass)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: - setPortComponentLink(PORT_COMPONENT_LINK_EDEFAULT); - return; - case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: - setServiceEndpointInterface((JavaClass)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.PORT_COMPONENT_REF__PORT_COMPONENT_LINK: - return PORT_COMPONENT_LINK_EDEFAULT == null ? portComponentLink != null : !PORT_COMPONENT_LINK_EDEFAULT.equals(portComponentLink); - case Webservice_clientPackage.PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE: - return serviceEndpointInterface != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (portComponentLink: ");//$NON-NLS-1$ - result.append(portComponentLink); - result.append(')'); - return result.toString(); - } - -} //PortComponentRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ServiceRefImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ServiceRefImpl.java deleted file mode 100644 index 7319c5f6f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/ServiceRefImpl.java +++ /dev/null @@ -1,575 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model object 'Service Ref'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceInterface Service Interface}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceRefName Service Ref Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getWsdlFile Wsdl File}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getJaxrpcMappingFile Jaxrpc Mapping File}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getPortComponentRefs Port Component Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getHandlers Handlers}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.ServiceRefImpl#getServiceQname Service Qname}
  • - *
- *

- * - * @generated - */ -public class ServiceRefImpl extends CompatibilityDescriptionGroupImpl implements ServiceRef { - /** - * The cached value of the '{@link #getServiceInterface() Service Interface}' reference. - * - * - * @see #getServiceInterface() - * @generated - * @ordered - */ - protected JavaClass serviceInterface = null; - - /** - * The default value of the '{@link #getServiceRefName() Service Ref Name}' attribute. - * - * - * @see #getServiceRefName() - * @generated - * @ordered - */ - protected static final String SERVICE_REF_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getServiceRefName() Service Ref Name}' attribute. - * - * - * @see #getServiceRefName() - * @generated - * @ordered - */ - protected String serviceRefName = SERVICE_REF_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getWsdlFile() Wsdl File}' attribute. - * - * - * @see #getWsdlFile() - * @generated - * @ordered - */ - protected static final String WSDL_FILE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getWsdlFile() Wsdl File}' attribute. - * - * - * @see #getWsdlFile() - * @generated - * @ordered - */ - protected String wsdlFile = WSDL_FILE_EDEFAULT; - - /** - * The default value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. - * - * - * @see #getJaxrpcMappingFile() - * @generated - * @ordered - */ - protected static final String JAXRPC_MAPPING_FILE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. - * - * - * @see #getJaxrpcMappingFile() - * @generated - * @ordered - */ - protected String jaxrpcMappingFile = JAXRPC_MAPPING_FILE_EDEFAULT; - - /** - * The cached value of the '{@link #getPortComponentRefs() Port Component Refs}' containment reference list. - * - * - * @see #getPortComponentRefs() - * @generated - * @ordered - */ - protected EList portComponentRefs = null; - - /** - * The cached value of the '{@link #getHandlers() Handlers}' containment reference list. - * - * - * @see #getHandlers() - * @generated - * @ordered - */ - protected EList handlers = null; - - /** - * The cached value of the '{@link #getServiceQname() Service Qname}' containment reference. - * - * - * @see #getServiceQname() - * @generated - * @ordered - */ - protected QName serviceQname = null; - - /** - * - * - * @generated - */ - protected ServiceRefImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return Webservice_clientPackage.eINSTANCE.getServiceRef(); - } - - /** - * - * - * @generated - */ - public String getServiceRefName() { - return serviceRefName; - } - - /** - * - * - * @generated - */ - public void setServiceRefName(String newServiceRefName) { - String oldServiceRefName = serviceRefName; - serviceRefName = newServiceRefName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME, oldServiceRefName, serviceRefName)); - } - - /** - * - * - * @generated - */ - public String getWsdlFile() { - return wsdlFile; - } - - /** - * - * - * @generated - */ - public void setWsdlFile(String newWsdlFile) { - String oldWsdlFile = wsdlFile; - wsdlFile = newWsdlFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__WSDL_FILE, oldWsdlFile, wsdlFile)); - } - - /** - * - * - * @generated - */ - public String getJaxrpcMappingFile() { - return jaxrpcMappingFile; - } - - /** - * - * - * @generated - */ - public void setJaxrpcMappingFile(String newJaxrpcMappingFile) { - String oldJaxrpcMappingFile = jaxrpcMappingFile; - jaxrpcMappingFile = newJaxrpcMappingFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE, oldJaxrpcMappingFile, jaxrpcMappingFile)); - } - - /** - * - * - * @generated - */ - public JavaClass getServiceInterface() { - if (serviceInterface != null && serviceInterface.eIsProxy()) { - JavaClass oldServiceInterface = serviceInterface; - serviceInterface = (JavaClass)eResolveProxy((InternalEObject)serviceInterface); - if (serviceInterface != oldServiceInterface) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE, oldServiceInterface, serviceInterface)); - } - } - return serviceInterface; - } - - /** - * - * - * @generated - */ - public JavaClass basicGetServiceInterface() { - return serviceInterface; - } - - /** - * - * - * @generated - */ - public void setServiceInterface(JavaClass newServiceInterface) { - JavaClass oldServiceInterface = serviceInterface; - serviceInterface = newServiceInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE, oldServiceInterface, serviceInterface)); - } - - /** - * - * - * @generated - */ - public EList getPortComponentRefs() { - if (portComponentRefs == null) { - portComponentRefs = new EObjectContainmentEList(PortComponentRef.class, this, Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS); - } - return portComponentRefs; - } - - /** - * - * - * @generated - */ - public EList getHandlers() { - if (handlers == null) { - handlers = new EObjectContainmentEList(Handler.class, this, Webservice_clientPackage.SERVICE_REF__HANDLERS); - } - return handlers; - } - - /** - * - * - * @generated - */ - public QName getServiceQname() { - return serviceQname; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetServiceQname(QName newServiceQname, NotificationChain msgs) { - QName oldServiceQname = serviceQname; - serviceQname = newServiceQname; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, oldServiceQname, newServiceQname); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setServiceQname(QName newServiceQname) { - if (newServiceQname != serviceQname) { - NotificationChain msgs = null; - if (serviceQname != null) - msgs = ((InternalEObject)serviceQname).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, null, msgs); - if (newServiceQname != null) - msgs = ((InternalEObject)newServiceQname).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, null, msgs); - msgs = basicSetServiceQname(newServiceQname, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME, newServiceQname, newServiceQname)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case Webservice_clientPackage.SERVICE_REF__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: - return ((InternalEList)getPortComponentRefs()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.SERVICE_REF__HANDLERS: - return ((InternalEList)getHandlers()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: - return basicSetServiceQname(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.SERVICE_REF__ICONS: - return getIcons(); - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: - return getDisplayNames(); - case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: - return getDescriptions(); - case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: - return getSmallIcon(); - case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: - return getLargeIcon(); - case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: - return getDescription(); - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: - return getDisplayName(); - case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: - if (resolve) return getServiceInterface(); - return basicGetServiceInterface(); - case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: - return getServiceRefName(); - case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: - return getWsdlFile(); - case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: - return getJaxrpcMappingFile(); - case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: - return getPortComponentRefs(); - case Webservice_clientPackage.SERVICE_REF__HANDLERS: - return getHandlers(); - case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: - return getServiceQname(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.SERVICE_REF__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: - setDescription((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: - setServiceInterface((JavaClass)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: - setServiceRefName((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: - setWsdlFile((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: - setJaxrpcMappingFile((String)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: - getPortComponentRefs().clear(); - getPortComponentRefs().addAll((Collection)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__HANDLERS: - getHandlers().clear(); - getHandlers().addAll((Collection)newValue); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: - setServiceQname((QName)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.SERVICE_REF__ICONS: - getIcons().clear(); - return; - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: - getDescriptions().clear(); - return; - case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: - setServiceInterface((JavaClass)null); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: - setServiceRefName(SERVICE_REF_NAME_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: - setWsdlFile(WSDL_FILE_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: - setJaxrpcMappingFile(JAXRPC_MAPPING_FILE_EDEFAULT); - return; - case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: - getPortComponentRefs().clear(); - return; - case Webservice_clientPackage.SERVICE_REF__HANDLERS: - getHandlers().clear(); - return; - case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: - setServiceQname((QName)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.SERVICE_REF__ICONS: - return icons != null && !icons.isEmpty(); - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case Webservice_clientPackage.SERVICE_REF__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case Webservice_clientPackage.SERVICE_REF__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case Webservice_clientPackage.SERVICE_REF__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case Webservice_clientPackage.SERVICE_REF__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case Webservice_clientPackage.SERVICE_REF__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case Webservice_clientPackage.SERVICE_REF__SERVICE_INTERFACE: - return serviceInterface != null; - case Webservice_clientPackage.SERVICE_REF__SERVICE_REF_NAME: - return SERVICE_REF_NAME_EDEFAULT == null ? serviceRefName != null : !SERVICE_REF_NAME_EDEFAULT.equals(serviceRefName); - case Webservice_clientPackage.SERVICE_REF__WSDL_FILE: - return WSDL_FILE_EDEFAULT == null ? wsdlFile != null : !WSDL_FILE_EDEFAULT.equals(wsdlFile); - case Webservice_clientPackage.SERVICE_REF__JAXRPC_MAPPING_FILE: - return JAXRPC_MAPPING_FILE_EDEFAULT == null ? jaxrpcMappingFile != null : !JAXRPC_MAPPING_FILE_EDEFAULT.equals(jaxrpcMappingFile); - case Webservice_clientPackage.SERVICE_REF__PORT_COMPONENT_REFS: - return portComponentRefs != null && !portComponentRefs.isEmpty(); - case Webservice_clientPackage.SERVICE_REF__HANDLERS: - return handlers != null && !handlers.isEmpty(); - case Webservice_clientPackage.SERVICE_REF__SERVICE_QNAME: - return serviceQname != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (serviceRefName: ");//$NON-NLS-1$ - result.append(serviceRefName); - result.append(", wsdlFile: ");//$NON-NLS-1$ - result.append(wsdlFile); - result.append(", jaxrpcMappingFile: ");//$NON-NLS-1$ - result.append(jaxrpcMappingFile); - result.append(')'); - return result.toString(); - } - -} //ServiceRefImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientImpl.java deleted file mode 100644 index 875be9cd7..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model object 'Web Services Client'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.WebServicesClientImpl#getComponentScopedRefs Component Scoped Refs}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsclient.impl.WebServicesClientImpl#getServiceRefs Service Refs}
  • - *
- *

- * - * @generated - */ -public class WebServicesClientImpl extends EObjectImpl implements WebServicesClient { - /** - * The cached value of the '{@link #getComponentScopedRefs() Component Scoped Refs}' containment reference list. - * - * - * @see #getComponentScopedRefs() - * @generated - * @ordered - */ - protected EList componentScopedRefs = null; - - /** - * The cached value of the '{@link #getServiceRefs() Service Refs}' containment reference list. - * - * - * @see #getServiceRefs() - * @generated - * @ordered - */ - protected EList serviceRefs = null; - - /** - * - * - * @generated - */ - protected WebServicesClientImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return Webservice_clientPackage.eINSTANCE.getWebServicesClient(); - } - - /** - * - * - * @generated - */ - public EList getComponentScopedRefs() { - if (componentScopedRefs == null) { - componentScopedRefs = new EObjectContainmentEList(ComponentScopedRefs.class, this, Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS); - } - return componentScopedRefs; - } - - /** - * - * - * @generated - */ - public EList getServiceRefs() { - if (serviceRefs == null) { - serviceRefs = new EObjectContainmentEList(ServiceRef.class, this, Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS); - } - return serviceRefs; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: - return ((InternalEList)getComponentScopedRefs()).basicRemove(otherEnd, msgs); - case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: - return ((InternalEList)getServiceRefs()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: - return getComponentScopedRefs(); - case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: - return getServiceRefs(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: - getComponentScopedRefs().clear(); - getComponentScopedRefs().addAll((Collection)newValue); - return; - case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: - getServiceRefs().clear(); - getServiceRefs().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: - getComponentScopedRefs().clear(); - return; - case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: - getServiceRefs().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case Webservice_clientPackage.WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS: - return componentScopedRefs != null && !componentScopedRefs.isEmpty(); - case Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS: - return serviceRefs != null && !serviceRefs.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //WebServicesClientImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientResourceFactory.java deleted file mode 100644 index 01a4de98a..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesClientResourceFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Aug 6, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.RendererFactory; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; -import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory; - - -public class WebServicesClientResourceFactory - extends TranslatorResourceFactory { - /** - * Method registerDtds. - */ - public static void registerDtds() { - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0, "j2ee_web_services_client_1_0.dtd"); //$NON-NLS-1$ - J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.WEB_SERVICES_CLIENT_SCHEMA_LOC_1_1, "j2ee_web_services_client_1_1.xsd"); //$NON-NLS-1$ - } - /** - * @param aRendererFactory - */ - public WebServicesClientResourceFactory(RendererFactory aRendererFactory) { - super(aRendererFactory); - } - - protected TranslatorResource createResource(URI uri, Renderer aRenderer) { - return new WebServicesResourceImpl(uri, aRenderer); - } - - /** - * Register myself with the Resource.Factory.Registry - */ - public static void registerWith(RendererFactory aRendererFactory) { - J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.WEB_SERVICES_CLIENT_SHORTNAME, new WebServicesClientResourceFactory(aRendererFactory)); - } - - /** - * register using the default renderer factory. - * @see #registerWith(RendererFactory) - */ - public static void register() { - registerWith(RendererFactory.getDefaultRendererFactory()); - } - - - public static Resource.Factory getRegisteredFactory() { - return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.WEB_SERVICES_CLIENT_DD_URI_OBJ); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesResourceImpl.java deleted file mode 100644 index e9be27be3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/WebServicesResourceImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Aug 6, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.model.translator.webservices.WebServicesTranslator; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesResource; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - -public class WebServicesResourceImpl extends XMLResourceImpl implements WebServicesResource { - - /** - * @param uri - * @param aRenderer - */ - public WebServicesResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - /** - * @param aRenderer - */ - public WebServicesResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /** - * Return the first element in the EList. - */ - public WebServicesClient getWebServicesClient() { - return (WebServicesClient) getRootObject(); - } - - public int getType() { - return WEB_SERVICES_CLIENT_TYPE; - } - - public String getJ2EE_1_2_SystemID() { - return J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0; - } - public String getJ2EE_1_3_SystemID() { - return J2EEConstants.WEB_SERVICES_CLIENT_SYSTEMID_1_0; - } - - public String getJ2EE_1_2_PublicID() { - return J2EEConstants.WEB_SERVICES_CLIENT_PUBLICID_1_0; - } - public String getJ2EE_1_3_PublicID() { - return J2EEConstants.WEB_SERVICES_CLIENT_PUBLICID_1_0; - } - - public String getDoctype() { - switch (getJ2EEVersionID()) { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return J2EEConstants.WEB_SERVICES_CLIENT_DOCTYPE; - default : - return null; - } - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#setDoctypeValues(java.lang.String, java.lang.String) - * This is setting the module version on the resource. - */ - public void setDoctypeValues(String publicId, String systemId) { - int version = WEBSERVICES_1_0_ID; - super.setDoctypeValues(publicId, systemId); - super.setVersionID(version); - } - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (WEBSERVICES_1_0_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - } - syncVersionOfRootObject(); - } - /* - * Based on the J2EE version, this will set the module version - */ - public void setJ2EEVersionID(int id) { - switch (id) { - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - primSetVersionID(WEBSERVICES_1_0_ID); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - primSetVersionID(WEBSERVICES_1_0_ID); - } - syncVersionOfRootObject(); - } - /* Return J2EE version based on module version - */ - public int getJ2EEVersionID() { - switch (getModuleVersionID()) { - case J2EEVersionConstants.WEBSERVICES_1_0_ID : - return J2EEVersionConstants.J2EE_1_3_ID; - default : - return J2EEVersionConstants.J2EE_1_3_ID; - } - } - /** - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return WebServicesTranslator.INSTANCE; - } - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return WEBSERVICES_1_0_ID; - } - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject() - */ - protected void syncVersionOfRootObject() { - //not model for J2EE 1.4 so no operation required. - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientFactoryImpl.java deleted file mode 100644 index 4e588db12..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientFactoryImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class Webservice_clientFactoryImpl extends EFactoryImpl implements Webservice_clientFactory { - /** - * Creates and instance of the factory. - * - * - * @generated - */ - public Webservice_clientFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case Webservice_clientPackage.SERVICE_REF: return createServiceRef(); - case Webservice_clientPackage.PORT_COMPONENT_REF: return createPortComponentRef(); - case Webservice_clientPackage.HANDLER: return createHandler(); - case Webservice_clientPackage.WEB_SERVICES_CLIENT: return createWebServicesClient(); - case Webservice_clientPackage.COMPONENT_SCOPED_REFS: return createComponentScopedRefs(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public ServiceRef createServiceRef() { - ServiceRefImpl serviceRef = new ServiceRefImpl(); - return serviceRef; - } - - /** - * - * - * @generated - */ - public PortComponentRef createPortComponentRef() { - PortComponentRefImpl portComponentRef = new PortComponentRefImpl(); - return portComponentRef; - } - - /** - * - * - * @generated - */ - public Handler createHandler() { - HandlerImpl handler = new HandlerImpl(); - return handler; - } - - /** - * - * - * @generated - */ - public WebServicesClient createWebServicesClient() { - WebServicesClientImpl webServicesClient = new WebServicesClientImpl(); - return webServicesClient; - } - - /** - * - * - * @generated - */ - public ComponentScopedRefs createComponentScopedRefs() { - ComponentScopedRefsImpl componentScopedRefs = new ComponentScopedRefsImpl(); - return componentScopedRefs; - } - - /** - * - * - * @generated - */ - public Webservice_clientPackage getWebservice_clientPackage() { - return (Webservice_clientPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static Webservice_clientPackage getPackage() { - return Webservice_clientPackage.eINSTANCE; - } -} //Webservice_clientFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientPackageImpl.java deleted file mode 100644 index 1f8bdffc7..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/impl/Webservice_clientPackageImpl.java +++ /dev/null @@ -1,531 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.JavaRefPackage; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class Webservice_clientPackageImpl extends EPackageImpl implements Webservice_clientPackage { - /** - * - * - * @generated - */ - private EClass serviceRefEClass = null; - - /** - * - * - * @generated - */ - private EClass portComponentRefEClass = null; - - /** - * - * - * @generated - */ - private EClass handlerEClass = null; - - /** - * - * - * @generated - */ - private EClass webServicesClientEClass = null; - - /** - * - * - * @generated - */ - private EClass componentScopedRefsEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage#eNS_URI - * @see #init() - * @generated - */ - private Webservice_clientPackageImpl() { - super(eNS_URI, Webservice_clientFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static Webservice_clientPackage init() { - if (isInited) return (Webservice_clientPackage)EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI); - - // Obtain or create and register package. - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Webservice_clientPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - - // Step 1: create meta-model objects - theWebservice_clientPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theWebservice_clientPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theWebservice_clientPackage; - } - - /** - * - * - * @generated - */ - public EClass getServiceRef() { - return serviceRefEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getServiceRef_ServiceRefName() { - return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getServiceRef_WsdlFile() { - return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getServiceRef_JaxrpcMappingFile() { - return (EAttribute)serviceRefEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getServiceRef_ServiceInterface() { - return (EReference)serviceRefEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getServiceRef_PortComponentRefs() { - return (EReference)serviceRefEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getServiceRef_Handlers() { - return (EReference)serviceRefEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getServiceRef_ServiceQname() { - return (EReference)serviceRefEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EClass getPortComponentRef() { - return portComponentRefEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponentRef_PortComponentLink() { - return (EAttribute)portComponentRefEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getPortComponentRef_ServiceEndpointInterface() { - return (EReference)portComponentRefEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getHandler() { - return handlerEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getHandler_HandlerName() { - return (EAttribute)handlerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getHandler_SoapHeaders() { - return (EReference)handlerEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getHandler_SoapRoles() { - return (EAttribute)handlerEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getHandler_PortNames() { - return (EAttribute)handlerEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getHandler_HandlerClass() { - return (EReference)handlerEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getHandler_InitParams() { - return (EReference)handlerEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getWebServicesClient() { - return webServicesClientEClass; - } - - /** - * - * - * @generated - */ - public EReference getWebServicesClient_ComponentScopedRefs() { - return (EReference)webServicesClientEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWebServicesClient_ServiceRefs() { - return (EReference)webServicesClientEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getComponentScopedRefs() { - return componentScopedRefsEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getComponentScopedRefs_ComponentName() { - return (EAttribute)componentScopedRefsEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getComponentScopedRefs_ServiceRefs() { - return (EReference)componentScopedRefsEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public Webservice_clientFactory getWebservice_clientFactory() { - return (Webservice_clientFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - serviceRefEClass = createEClass(SERVICE_REF); - createEReference(serviceRefEClass, SERVICE_REF__SERVICE_INTERFACE); - createEAttribute(serviceRefEClass, SERVICE_REF__SERVICE_REF_NAME); - createEAttribute(serviceRefEClass, SERVICE_REF__WSDL_FILE); - createEAttribute(serviceRefEClass, SERVICE_REF__JAXRPC_MAPPING_FILE); - createEReference(serviceRefEClass, SERVICE_REF__PORT_COMPONENT_REFS); - createEReference(serviceRefEClass, SERVICE_REF__HANDLERS); - createEReference(serviceRefEClass, SERVICE_REF__SERVICE_QNAME); - - portComponentRefEClass = createEClass(PORT_COMPONENT_REF); - createEAttribute(portComponentRefEClass, PORT_COMPONENT_REF__PORT_COMPONENT_LINK); - createEReference(portComponentRefEClass, PORT_COMPONENT_REF__SERVICE_ENDPOINT_INTERFACE); - - handlerEClass = createEClass(HANDLER); - createEAttribute(handlerEClass, HANDLER__HANDLER_NAME); - createEAttribute(handlerEClass, HANDLER__SOAP_ROLES); - createEAttribute(handlerEClass, HANDLER__PORT_NAMES); - createEReference(handlerEClass, HANDLER__HANDLER_CLASS); - createEReference(handlerEClass, HANDLER__INIT_PARAMS); - createEReference(handlerEClass, HANDLER__SOAP_HEADERS); - - webServicesClientEClass = createEClass(WEB_SERVICES_CLIENT); - createEReference(webServicesClientEClass, WEB_SERVICES_CLIENT__COMPONENT_SCOPED_REFS); - createEReference(webServicesClientEClass, WEB_SERVICES_CLIENT__SERVICE_REFS); - - componentScopedRefsEClass = createEClass(COMPONENT_SCOPED_REFS); - createEAttribute(componentScopedRefsEClass, COMPONENT_SCOPED_REFS__COMPONENT_NAME); - createEReference(componentScopedRefsEClass, COMPONENT_SCOPED_REFS__SERVICE_REFS); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - JavaRefPackageImpl theJavaRefPackage = (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI); - - // Add supertypes to classes - serviceRefEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - handlerEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(serviceRefEClass, ServiceRef.class, "ServiceRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getServiceRef_ServiceInterface(), theJavaRefPackage.getJavaClass(), null, "serviceInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getServiceRef_ServiceRefName(), ecorePackage.getEString(), "serviceRefName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getServiceRef_WsdlFile(), ecorePackage.getEString(), "wsdlFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getServiceRef_JaxrpcMappingFile(), ecorePackage.getEString(), "jaxrpcMappingFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServiceRef_PortComponentRefs(), this.getPortComponentRef(), null, "portComponentRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServiceRef_Handlers(), this.getHandler(), null, "handlers", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServiceRef_ServiceQname(), theCommonPackage.getQName(), null, "serviceQname", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(portComponentRefEClass, PortComponentRef.class, "PortComponentRef", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getPortComponentRef_PortComponentLink(), ecorePackage.getEString(), "portComponentLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponentRef_ServiceEndpointInterface(), theJavaRefPackage.getJavaClass(), null, "serviceEndpointInterface", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(handlerEClass, Handler.class, "Handler", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getHandler_HandlerName(), ecorePackage.getEString(), "handlerName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getHandler_SoapRoles(), ecorePackage.getEString(), "soapRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getHandler_PortNames(), ecorePackage.getEString(), "portNames", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_HandlerClass(), theJavaRefPackage.getJavaClass(), null, "handlerClass", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_InitParams(), theCommonPackage.getParamValue(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_SoapHeaders(), theCommonPackage.getQName(), null, "soapHeaders", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(webServicesClientEClass, WebServicesClient.class, "WebServicesClient", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getWebServicesClient_ComponentScopedRefs(), this.getComponentScopedRefs(), null, "componentScopedRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebServicesClient_ServiceRefs(), this.getServiceRef(), null, "serviceRefs", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(componentScopedRefsEClass, ComponentScopedRefs.class, "ComponentScopedRefs", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getComponentScopedRefs_ComponentName(), ecorePackage.getEString(), "componentName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getComponentScopedRefs_ServiceRefs(), this.getServiceRef(), null, "serviceRefs", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } -} //Webservice_clientPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientAdapterFactory.java deleted file mode 100644 index 100eebb7d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientAdapterFactory.java +++ /dev/null @@ -1,231 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage - * @generated - */ -public class Webservice_clientAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static Webservice_clientPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public Webservice_clientAdapterFactory() { - if (modelPackage == null) { - modelPackage = Webservice_clientPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected Webservice_clientSwitch modelSwitch = - new Webservice_clientSwitch() { - public Object caseServiceRef(ServiceRef object) { - return createServiceRefAdapter(); - } - public Object casePortComponentRef(PortComponentRef object) { - return createPortComponentRefAdapter(); - } - public Object caseHandler(Handler object) { - return createHandlerAdapter(); - } - public Object caseWebServicesClient(WebServicesClient object) { - return createWebServicesClientAdapter(); - } - public Object caseComponentScopedRefs(ComponentScopedRefs object) { - return createComponentScopedRefsAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.ServiceRef Service Ref}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.ServiceRef - * @generated - */ - public Adapter createServiceRefAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.PortComponentRef Port Component Ref}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.PortComponentRef - * @generated - */ - public Adapter createPortComponentRefAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.Handler Handler}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Handler - * @generated - */ - public Adapter createHandlerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.WebServicesClient Web Services Client}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.WebServicesClient - * @generated - */ - public Adapter createWebServicesClientAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsclient.ComponentScopedRefs Component Scoped Refs}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.ComponentScopedRefs - * @generated - */ - public Adapter createComponentScopedRefsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //Webservice_clientAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientSwitch.java deleted file mode 100644 index 225ec972f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsclient/util/Webservice_clientSwitch.java +++ /dev/null @@ -1,230 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsclient.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.webservice.wsclient.ComponentScopedRefs; -import org.eclipse.jst.j2ee.webservice.wsclient.Handler; -import org.eclipse.jst.j2ee.webservice.wsclient.PortComponentRef; -import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; -import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wsclient.Webservice_clientPackage - * @generated - */ -public class Webservice_clientSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static Webservice_clientPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public Webservice_clientSwitch() { - if (modelPackage == null) { - modelPackage = Webservice_clientPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case Webservice_clientPackage.SERVICE_REF: { - ServiceRef serviceRef = (ServiceRef)theEObject; - Object result = caseServiceRef(serviceRef); - if (result == null) result = caseCompatibilityDescriptionGroup(serviceRef); - if (result == null) result = caseDescriptionGroup(serviceRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Webservice_clientPackage.PORT_COMPONENT_REF: { - PortComponentRef portComponentRef = (PortComponentRef)theEObject; - Object result = casePortComponentRef(portComponentRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Webservice_clientPackage.HANDLER: { - Handler handler = (Handler)theEObject; - Object result = caseHandler(handler); - if (result == null) result = caseCompatibilityDescriptionGroup(handler); - if (result == null) result = caseDescriptionGroup(handler); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Webservice_clientPackage.WEB_SERVICES_CLIENT: { - WebServicesClient webServicesClient = (WebServicesClient)theEObject; - Object result = caseWebServicesClient(webServicesClient); - if (result == null) result = defaultCase(theEObject); - return result; - } - case Webservice_clientPackage.COMPONENT_SCOPED_REFS: { - ComponentScopedRefs componentScopedRefs = (ComponentScopedRefs)theEObject; - Object result = caseComponentScopedRefs(componentScopedRefs); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Service Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Service Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServiceRef(ServiceRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Port Component Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Port Component Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object casePortComponentRef(PortComponentRef object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Handler'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Handler'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseHandler(Handler object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Services Client'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Services Client'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebServicesClient(WebServicesClient object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Component Scoped Refs'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Component Scoped Refs'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseComponentScopedRefs(ComponentScopedRefs object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //Webservice_clientSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonFactory.java index 85ef40044..cd8520cb9 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonFactory.java @@ -27,7 +27,7 @@ public interface WscommonFactory extends EFactory{ * * @generated */ - WscommonFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonFactoryImpl(); + WscommonFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonFactoryImpl(); /** * Returns a new object of class 'Init Param'. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonPackage.java index 076bb4c74..340c31ba9 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/WscommonPackage.java @@ -62,7 +62,7 @@ public interface WscommonPackage extends EPackage{ * * @generated */ - WscommonPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl.init(); + WscommonPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl.init(); /** * The meta object id for the '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl Init Param}' class. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DescriptionTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DescriptionTypeImpl.java deleted file mode 100644 index 653b2967c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DescriptionTypeImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.DescriptionImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'Description Type'. - * - *

- *

- * - * @generated - */ -public class DescriptionTypeImpl extends DescriptionImpl implements DescriptionType -{ - /** - * - * - * @generated - */ - protected DescriptionTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getDescriptionType(); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DESCRIPTION_TYPE__LANG: - return getLang(); - case WscommonPackage.DESCRIPTION_TYPE__VALUE: - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DESCRIPTION_TYPE__LANG: - setLang((String)newValue); - return; - case WscommonPackage.DESCRIPTION_TYPE__VALUE: - setValue((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DESCRIPTION_TYPE__LANG: - setLang(LANG_EDEFAULT); - return; - case WscommonPackage.DESCRIPTION_TYPE__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DESCRIPTION_TYPE__LANG: - return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); - case WscommonPackage.DESCRIPTION_TYPE__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - -} //DescriptionTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DisplayNameTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DisplayNameTypeImpl.java deleted file mode 100644 index 0aec0517e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/DisplayNameTypeImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.DisplayNameImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'Display Name Type'. - * - *

- *

- * - * @generated - */ -public class DisplayNameTypeImpl extends DisplayNameImpl implements DisplayNameType -{ - /** - * - * - * @generated - */ - protected DisplayNameTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getDisplayNameType(); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DISPLAY_NAME_TYPE__LANG: - return getLang(); - case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DISPLAY_NAME_TYPE__LANG: - setLang((String)newValue); - return; - case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: - setValue((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DISPLAY_NAME_TYPE__LANG: - setLang(LANG_EDEFAULT); - return; - case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.DISPLAY_NAME_TYPE__LANG: - return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); - case WscommonPackage.DISPLAY_NAME_TYPE__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - -} //DisplayNameTypeImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/InitParamImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/InitParamImpl.java deleted file mode 100644 index f5d09f1bc..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/InitParamImpl.java +++ /dev/null @@ -1,332 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'Init Param'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getParamName Param Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getParamValue Param Value}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getDescription Description}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.InitParamImpl#getDescriptionTypes Description Types}
  • - *
- *

- * - * @generated - */ -public class InitParamImpl extends EObjectImpl implements InitParam -{ - /** - * The default value of the '{@link #getParamName() Param Name}' attribute. - * - * - * @see #getParamName() - * @generated - * @ordered - */ - protected static final String PARAM_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getParamName() Param Name}' attribute. - * - * - * @see #getParamName() - * @generated - * @ordered - */ - protected String paramName = PARAM_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getParamValue() Param Value}' attribute. - * - * - * @see #getParamValue() - * @generated - * @ordered - */ - protected static final String PARAM_VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getParamValue() Param Value}' attribute. - * - * - * @see #getParamValue() - * @generated - * @ordered - */ - protected String paramValue = PARAM_VALUE_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * The cached value of the '{@link #getDescriptionTypes() Description Types}' containment reference list. - * - * - * @see #getDescriptionTypes() - * @generated - * @ordered - */ - protected EList descriptionTypes = null; - - /** - * - * - * @generated - */ - protected InitParamImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getInitParam(); - } - - /** - * - * - * @generated - */ - public String getParamName() { - return paramName; - } - - /** - * - * - * @generated - */ - public void setParamName(String newParamName) { - String oldParamName = paramName; - paramName = newParamName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__PARAM_NAME, oldParamName, paramName)); - } - - /** - * - * - * @generated - */ - public String getParamValue() { - return paramValue; - } - - /** - * - * - * @generated - */ - public void setParamValue(String newParamValue) { - String oldParamValue = paramValue; - paramValue = newParamValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__PARAM_VALUE, oldParamValue, paramValue)); - } - - /** - * - * - * @generated - */ - public String getDescription() { - return description; - } - - /** - * - * - * @generated - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.INIT_PARAM__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public EList getDescriptionTypes() { - if (descriptionTypes == null) { - descriptionTypes = new EObjectContainmentEList(DescriptionType.class, this, WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES); - } - return descriptionTypes; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: - return ((InternalEList)getDescriptionTypes()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.INIT_PARAM__PARAM_NAME: - return getParamName(); - case WscommonPackage.INIT_PARAM__PARAM_VALUE: - return getParamValue(); - case WscommonPackage.INIT_PARAM__DESCRIPTION: - return getDescription(); - case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: - return getDescriptionTypes(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.INIT_PARAM__PARAM_NAME: - setParamName((String)newValue); - return; - case WscommonPackage.INIT_PARAM__PARAM_VALUE: - setParamValue((String)newValue); - return; - case WscommonPackage.INIT_PARAM__DESCRIPTION: - setDescription((String)newValue); - return; - case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: - getDescriptionTypes().clear(); - getDescriptionTypes().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.INIT_PARAM__PARAM_NAME: - setParamName(PARAM_NAME_EDEFAULT); - return; - case WscommonPackage.INIT_PARAM__PARAM_VALUE: - setParamValue(PARAM_VALUE_EDEFAULT); - return; - case WscommonPackage.INIT_PARAM__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: - getDescriptionTypes().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.INIT_PARAM__PARAM_NAME: - return PARAM_NAME_EDEFAULT == null ? paramName != null : !PARAM_NAME_EDEFAULT.equals(paramName); - case WscommonPackage.INIT_PARAM__PARAM_VALUE: - return PARAM_VALUE_EDEFAULT == null ? paramValue != null : !PARAM_VALUE_EDEFAULT.equals(paramValue); - case WscommonPackage.INIT_PARAM__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WscommonPackage.INIT_PARAM__DESCRIPTION_TYPES: - return descriptionTypes != null && !descriptionTypes.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (paramName: ");//$NON-NLS-1$ - result.append(paramName); - result.append(", paramValue: ");//$NON-NLS-1$ - result.append(paramValue); - result.append(", description: ");//$NON-NLS-1$ - result.append(description); - result.append(')'); - return result.toString(); - } - -} //InitParamImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/PortNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/PortNameImpl.java deleted file mode 100644 index d3dc769bb..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/PortNameImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.PortName; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'Port Name'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.PortNameImpl#getPortName Port Name}
  • - *
- *

- * - * @generated - */ -public class PortNameImpl extends EObjectImpl implements PortName -{ - /** - * The default value of the '{@link #getPortName() Port Name}' attribute. - * - * - * @see #getPortName() - * @generated - * @ordered - */ - protected static final String PORT_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPortName() Port Name}' attribute. - * - * - * @see #getPortName() - * @generated - * @ordered - */ - protected String portName = PORT_NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected PortNameImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getPortName(); - } - - /** - * - * - * @generated - */ - public String getPortName() { - return portName; - } - - /** - * - * - * @generated - */ - public void setPortName(String newPortName) { - String oldPortName = portName; - portName = newPortName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.PORT_NAME__PORT_NAME, oldPortName, portName)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.PORT_NAME__PORT_NAME: - return getPortName(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.PORT_NAME__PORT_NAME: - setPortName((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.PORT_NAME__PORT_NAME: - setPortName(PORT_NAME_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.PORT_NAME__PORT_NAME: - return PORT_NAME_EDEFAULT == null ? portName != null : !PORT_NAME_EDEFAULT.equals(portName); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (portName: ");//$NON-NLS-1$ - result.append(portName); - result.append(')'); - return result.toString(); - } - -} //PortNameImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPHeaderImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPHeaderImpl.java deleted file mode 100644 index d484a5d9b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPHeaderImpl.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'SOAP Header'. - * - *

- *

- * - * @generated - */ -public class SOAPHeaderImpl extends QNameImpl implements SOAPHeader -{ - /** - * - * - * @generated - */ - protected SOAPHeaderImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getSOAPHeader(); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: - return getNamespaceURI(); - case WscommonPackage.SOAP_HEADER__LOCAL_PART: - return getLocalPart(); - case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: - return getCombinedQName(); - case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: - return getInternalPrefixOrNsURI(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: - setNamespaceURI((String)newValue); - return; - case WscommonPackage.SOAP_HEADER__LOCAL_PART: - setLocalPart((String)newValue); - return; - case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: - setCombinedQName((String)newValue); - return; - case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: - setNamespaceURI(NAMESPACE_URI_EDEFAULT); - return; - case WscommonPackage.SOAP_HEADER__LOCAL_PART: - setLocalPart(LOCAL_PART_EDEFAULT); - return; - case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: - setCombinedQName(COMBINED_QNAME_EDEFAULT); - return; - case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_HEADER__NAMESPACE_URI: - return NAMESPACE_URI_EDEFAULT == null ? namespaceURI != null : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); - case WscommonPackage.SOAP_HEADER__LOCAL_PART: - return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); - case WscommonPackage.SOAP_HEADER__COMBINED_QNAME: - return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); - case WscommonPackage.SOAP_HEADER__INTERNAL_PREFIX_OR_NS_URI: - return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); - } - return eDynamicIsSet(eFeature); - } - -} //SOAPHeaderImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPRoleImpl.java deleted file mode 100644 index 0ec31fb6b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/SOAPRoleImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model object 'SOAP Role'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wscommon.impl.SOAPRoleImpl#getSoapRole Soap Role}
  • - *
- *

- * - * @generated - */ -public class SOAPRoleImpl extends EObjectImpl implements SOAPRole -{ - /** - * The default value of the '{@link #getSoapRole() Soap Role}' attribute. - * - * - * @see #getSoapRole() - * @generated - * @ordered - */ - protected static final String SOAP_ROLE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSoapRole() Soap Role}' attribute. - * - * - * @see #getSoapRole() - * @generated - * @ordered - */ - protected String soapRole = SOAP_ROLE_EDEFAULT; - - /** - * - * - * @generated - */ - protected SOAPRoleImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WscommonPackage.eINSTANCE.getSOAPRole(); - } - - /** - * - * - * @generated - */ - public String getSoapRole() { - return soapRole; - } - - /** - * - * - * @generated - */ - public void setSoapRole(String newSoapRole) { - String oldSoapRole = soapRole; - soapRole = newSoapRole; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WscommonPackage.SOAP_ROLE__SOAP_ROLE, oldSoapRole, soapRole)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_ROLE__SOAP_ROLE: - return getSoapRole(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_ROLE__SOAP_ROLE: - setSoapRole((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_ROLE__SOAP_ROLE: - setSoapRole(SOAP_ROLE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WscommonPackage.SOAP_ROLE__SOAP_ROLE: - return SOAP_ROLE_EDEFAULT == null ? soapRole != null : !SOAP_ROLE_EDEFAULT.equals(soapRole); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (soapRole: ");//$NON-NLS-1$ - result.append(soapRole); - result.append(')'); - return result.toString(); - } - -} //SOAPRoleImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonFactoryImpl.java deleted file mode 100644 index e5f1603f8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonFactoryImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.PortName; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class WscommonFactoryImpl extends EFactoryImpl implements WscommonFactory -{ - /** - * Creates and instance of the factory. - * - * - * @generated - */ - public WscommonFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case WscommonPackage.INIT_PARAM: return createInitParam(); - case WscommonPackage.SOAP_HEADER: return createSOAPHeader(); - case WscommonPackage.SOAP_ROLE: return createSOAPRole(); - case WscommonPackage.PORT_NAME: return createPortName(); - case WscommonPackage.DESCRIPTION_TYPE: return createDescriptionType(); - case WscommonPackage.DISPLAY_NAME_TYPE: return createDisplayNameType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public InitParam createInitParam() { - InitParamImpl initParam = new InitParamImpl(); - return initParam; - } - - /** - * - * - * @generated - */ - public SOAPHeader createSOAPHeader() { - SOAPHeaderImpl soapHeader = new SOAPHeaderImpl(); - return soapHeader; - } - - /** - * - * - * @generated - */ - public SOAPRole createSOAPRole() { - SOAPRoleImpl soapRole = new SOAPRoleImpl(); - return soapRole; - } - - /** - * - * - * @generated - */ - public PortName createPortName() { - PortNameImpl portName = new PortNameImpl(); - return portName; - } - - /** - * - * - * @generated - */ - public DescriptionType createDescriptionType() { - DescriptionTypeImpl descriptionType = new DescriptionTypeImpl(); - return descriptionType; - } - - /** - * - * - * @generated - */ - public DisplayNameType createDisplayNameType() { - DisplayNameTypeImpl displayNameType = new DisplayNameTypeImpl(); - return displayNameType; - } - - /** - * - * - * @generated - */ - public WscommonPackage getWscommonPackage() { - return (WscommonPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static WscommonPackage getPackage() { - return WscommonPackage.eINSTANCE; - } -} //WscommonFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonPackageImpl.java deleted file mode 100644 index fd59d3b94..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/impl/WscommonPackageImpl.java +++ /dev/null @@ -1,409 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.PortName; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; - - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class WscommonPackageImpl extends EPackageImpl implements WscommonPackage -{ - /** - * - * - * @generated - */ - private EClass initParamEClass = null; - - /** - * - * - * @generated - */ - private EClass soapHeaderEClass = null; - - /** - * - * - * @generated - */ - private EClass soapRoleEClass = null; - - /** - * - * - * @generated - */ - private EClass portNameEClass = null; - - /** - * - * - * @generated - */ - private EClass descriptionTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass displayNameTypeEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage#eNS_URI - * @see #init() - * @generated - */ - private WscommonPackageImpl() { - super(eNS_URI, WscommonFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static WscommonPackage init() { - if (isInited) return (WscommonPackage)EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI); - - // Obtain or create and register package. - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WscommonPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - - // Step 1: create meta-model objects - theWscommonPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWsddPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theWscommonPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWsddPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theWscommonPackage; - } - - /** - * - * - * @generated - */ - public EClass getInitParam() { - return initParamEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getInitParam_ParamName() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getInitParam_ParamValue() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getInitParam_Description() { - return (EAttribute)initParamEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getInitParam_DescriptionTypes() { - return (EReference)initParamEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getSOAPHeader() { - return soapHeaderEClass; - } - - /** - * - * - * @generated - */ - public EClass getSOAPRole() { - return soapRoleEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSOAPRole_SoapRole() { - return (EAttribute)soapRoleEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getPortName() { - return portNameEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPortName_PortName() { - return (EAttribute)portNameEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getDescriptionType() { - return descriptionTypeEClass; - } - - /** - * - * - * @generated - */ - public EClass getDisplayNameType() { - return displayNameTypeEClass; - } - - /** - * - * - * @generated - */ - public WscommonFactory getWscommonFactory() { - return (WscommonFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - initParamEClass = createEClass(INIT_PARAM); - createEAttribute(initParamEClass, INIT_PARAM__PARAM_NAME); - createEAttribute(initParamEClass, INIT_PARAM__PARAM_VALUE); - createEAttribute(initParamEClass, INIT_PARAM__DESCRIPTION); - createEReference(initParamEClass, INIT_PARAM__DESCRIPTION_TYPES); - - soapHeaderEClass = createEClass(SOAP_HEADER); - - soapRoleEClass = createEClass(SOAP_ROLE); - createEAttribute(soapRoleEClass, SOAP_ROLE__SOAP_ROLE); - - portNameEClass = createEClass(PORT_NAME); - createEAttribute(portNameEClass, PORT_NAME__PORT_NAME); - - descriptionTypeEClass = createEClass(DESCRIPTION_TYPE); - - displayNameTypeEClass = createEClass(DISPLAY_NAME_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - - // Add supertypes to classes - soapHeaderEClass.getESuperTypes().add(theCommonPackage.getQName()); - descriptionTypeEClass.getESuperTypes().add(theCommonPackage.getDescription()); - displayNameTypeEClass.getESuperTypes().add(theCommonPackage.getDisplayName()); - - // Initialize classes and features; add operations and parameters - initEClass(initParamEClass, InitParam.class, "InitParam", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getInitParam_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getInitParam_ParamValue(), ecorePackage.getEString(), "paramValue", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getInitParam_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getInitParam_DescriptionTypes(), this.getDescriptionType(), null, "descriptionTypes", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(soapHeaderEClass, SOAPHeader.class, "SOAPHeader", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - initEClass(soapRoleEClass, SOAPRole.class, "SOAPRole", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getSOAPRole_SoapRole(), ecorePackage.getEString(), "soapRole", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(portNameEClass, PortName.class, "PortName", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getPortName_PortName(), ecorePackage.getEString(), "portName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(descriptionTypeEClass, DescriptionType.class, "DescriptionType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - initEClass(displayNameTypeEClass, DisplayNameType.class, "DisplayNameType", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } -} //WscommonPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonAdapterFactory.java deleted file mode 100644 index 4e3c7cd82..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonAdapterFactory.java +++ /dev/null @@ -1,269 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.PortName; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage - * @generated - */ -public class WscommonAdapterFactory extends AdapterFactoryImpl -{ - - /** - * The cached model package. - * - * - * @generated - */ - protected static WscommonPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public WscommonAdapterFactory() { - if (modelPackage == null) { - modelPackage = WscommonPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected WscommonSwitch modelSwitch = - new WscommonSwitch() { - public Object caseInitParam(InitParam object) { - return createInitParamAdapter(); - } - public Object caseSOAPHeader(SOAPHeader object) { - return createSOAPHeaderAdapter(); - } - public Object caseSOAPRole(SOAPRole object) { - return createSOAPRoleAdapter(); - } - public Object casePortName(PortName object) { - return createPortNameAdapter(); - } - public Object caseDescriptionType(DescriptionType object) { - return createDescriptionTypeAdapter(); - } - public Object caseDisplayNameType(DisplayNameType object) { - return createDisplayNameTypeAdapter(); - } - public Object caseQName(QName object) { - return createQNameAdapter(); - } - public Object caseDescription(Description object) { - return createDescriptionAdapter(); - } - public Object caseDisplayName(DisplayName object) { - return createDisplayNameAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.InitParam Init Param}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.InitParam - * @generated - */ - public Adapter createInitParamAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPHeader SOAP Header}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPHeader - * @generated - */ - public Adapter createSOAPHeaderAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPRole SOAP Role}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.SOAPRole - * @generated - */ - public Adapter createSOAPRoleAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.PortName Port Name}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.PortName - * @generated - */ - public Adapter createPortNameAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.DescriptionType Description Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.DescriptionType - * @generated - */ - public Adapter createDescriptionTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wscommon.DisplayNameType Display Name Type}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.DisplayNameType - * @generated - */ - public Adapter createDisplayNameTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.Description Description}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.Description - * @generated - */ - public Adapter createDescriptionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DisplayName Display Name}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DisplayName - * @generated - */ - public Adapter createDisplayNameAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.QName - * @generated - */ - public Adapter createQNameAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //WscommonAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonSwitch.java deleted file mode 100644 index 9c76175e6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wscommon/util/WscommonSwitch.java +++ /dev/null @@ -1,268 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wscommon.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.PortName; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; - - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wscommon.WscommonPackage - * @generated - */ -public class WscommonSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static WscommonPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public WscommonSwitch() { - if (modelPackage == null) { - modelPackage = WscommonPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case WscommonPackage.INIT_PARAM: { - InitParam initParam = (InitParam)theEObject; - Object result = caseInitParam(initParam); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WscommonPackage.SOAP_HEADER: { - SOAPHeader soapHeader = (SOAPHeader)theEObject; - Object result = caseSOAPHeader(soapHeader); - if (result == null) result = caseQName(soapHeader); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WscommonPackage.SOAP_ROLE: { - SOAPRole soapRole = (SOAPRole)theEObject; - Object result = caseSOAPRole(soapRole); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WscommonPackage.PORT_NAME: { - PortName portName = (PortName)theEObject; - Object result = casePortName(portName); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WscommonPackage.DESCRIPTION_TYPE: { - DescriptionType descriptionType = (DescriptionType)theEObject; - Object result = caseDescriptionType(descriptionType); - if (result == null) result = caseDescription(descriptionType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WscommonPackage.DISPLAY_NAME_TYPE: { - DisplayNameType displayNameType = (DisplayNameType)theEObject; - Object result = caseDisplayNameType(displayNameType); - if (result == null) result = caseDisplayName(displayNameType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Init Param'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Init Param'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseInitParam(InitParam object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'SOAP Header'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'SOAP Header'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSOAPHeader(SOAPHeader object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'SOAP Role'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'SOAP Role'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSOAPRole(SOAPRole object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Port Name'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Port Name'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object casePortName(PortName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionType(DescriptionType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Display Name Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Display Name Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDisplayNameType(DisplayNameType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescription(Description object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Display Name'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Display Name'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDisplayName(DisplayName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'QName'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'QName'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQName(QName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //WscommonSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddFactory.java index 8de697037..273126b9e 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddFactory.java @@ -27,7 +27,7 @@ public interface WsddFactory extends EFactory{ * * @generated */ - WsddFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddFactoryImpl(); + WsddFactory eINSTANCE = new org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddFactoryImpl(); /** * Returns a new object of class 'Web Services'. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddPackage.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddPackage.java index b6dd52d88..73f51fd4f 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddPackage.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddPackage.java @@ -62,7 +62,7 @@ public interface WsddPackage extends EPackage{ * * @generated */ - WsddPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl.init(); + WsddPackage eINSTANCE = org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl.init(); /** * The meta object id for the '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServicesImpl Web Services}' class. diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddResourceFactory.java index f57d8c743..53281f526 100644 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddResourceFactory.java +++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/WsddResourceFactory.java @@ -12,10 +12,10 @@ package org.eclipse.jst.j2ee.webservice.wsdd; import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver; import org.eclipse.jst.j2ee.webservice.WebServiceConstants; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddResourceImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddResourceImpl; import org.eclipse.wst.common.internal.emf.resource.Renderer; import org.eclipse.wst.common.internal.emf.resource.RendererFactory; import org.eclipse.wst.common.internal.emf.resource.TranslatorResource; diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/BeanLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/BeanLinkImpl.java deleted file mode 100644 index fc0695896..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/BeanLinkImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Bean Link'. - * - *

- *

- * - * @generated - */ -public class BeanLinkImpl extends EObjectImpl implements BeanLink -{ - /** - * - * - * @generated - */ - protected BeanLinkImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getBeanLink(); - } - -} //BeanLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/EJBLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/EJBLinkImpl.java deleted file mode 100644 index 08c461f45..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/EJBLinkImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'EJB Link'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.EJBLinkImpl#getEjbLink Ejb Link}
  • - *
- *

- * - * @generated - */ -public class EJBLinkImpl extends BeanLinkImpl implements EJBLink -{ - /** - * The default value of the '{@link #getEjbLink() Ejb Link}' attribute. - * - * - * @see #getEjbLink() - * @generated - * @ordered - */ - protected static final String EJB_LINK_EDEFAULT = null; - - /** - * The cached value of the '{@link #getEjbLink() Ejb Link}' attribute. - * - * - * @see #getEjbLink() - * @generated - * @ordered - */ - protected String ejbLink = EJB_LINK_EDEFAULT; - - /** - * - * - * @generated - */ - protected EJBLinkImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getEJBLink(); - } - - /** - * - * - * @generated - */ - public String getEjbLink() { - return ejbLink; - } - - /** - * - * - * @generated - */ - public void setEjbLink(String newEjbLink) { - String oldEjbLink = ejbLink; - ejbLink = newEjbLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.EJB_LINK__EJB_LINK, oldEjbLink, ejbLink)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.EJB_LINK__EJB_LINK: - return getEjbLink(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.EJB_LINK__EJB_LINK: - setEjbLink((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.EJB_LINK__EJB_LINK: - setEjbLink(EJB_LINK_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.EJB_LINK__EJB_LINK: - return EJB_LINK_EDEFAULT == null ? ejbLink != null : !EJB_LINK_EDEFAULT.equals(ejbLink); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (ejbLink: ");//$NON-NLS-1$ - result.append(ejbLink); - result.append(')'); - return result.toString(); - } - -} //EJBLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/HandlerImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/HandlerImpl.java deleted file mode 100644 index 11a9457ed..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/HandlerImpl.java +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.InitParam; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPHeader; -import org.eclipse.jst.j2ee.webservice.wscommon.SOAPRole; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Handler'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getHandlerName Handler Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getHandlerClass Handler Class}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getInitParams Init Params}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getSoapHeaders Soap Headers}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.HandlerImpl#getSoapRoles Soap Roles}
  • - *
- *

- * - * @generated - */ -public class HandlerImpl extends CompatibilityDescriptionGroupImpl implements Handler -{ - /** - * The default value of the '{@link #getHandlerName() Handler Name}' attribute. - * - * - * @see #getHandlerName() - * @generated - * @ordered - */ - protected static final String HANDLER_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHandlerName() Handler Name}' attribute. - * - * - * @see #getHandlerName() - * @generated - * @ordered - */ - protected String handlerName = HANDLER_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getHandlerClass() Handler Class}' attribute. - * - * - * @see #getHandlerClass() - * @generated - * @ordered - */ - protected static final String HANDLER_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHandlerClass() Handler Class}' attribute. - * - * - * @see #getHandlerClass() - * @generated - * @ordered - */ - protected String handlerClass = HANDLER_CLASS_EDEFAULT; - - /** - * The cached value of the '{@link #getInitParams() Init Params}' containment reference list. - * - * - * @see #getInitParams() - * @generated - * @ordered - */ - protected EList initParams = null; - - /** - * The cached value of the '{@link #getSoapHeaders() Soap Headers}' containment reference list. - * - * - * @see #getSoapHeaders() - * @generated - * @ordered - */ - protected EList soapHeaders = null; - - /** - * The cached value of the '{@link #getSoapRoles() Soap Roles}' containment reference list. - * - * - * @see #getSoapRoles() - * @generated - * @ordered - */ - protected EList soapRoles = null; - - /** - * - * - * @generated - */ - protected HandlerImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getHandler(); - } - - /** - * - * - * @generated - */ - public String getHandlerName() { - return handlerName; - } - - /** - * - * - * @generated - */ - public void setHandlerName(String newHandlerName) { - String oldHandlerName = handlerName; - handlerName = newHandlerName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.HANDLER__HANDLER_NAME, oldHandlerName, handlerName)); - } - - /** - * - * - * @generated - */ - public String getHandlerClass() { - return handlerClass; - } - - /** - * - * - * @generated - */ - public void setHandlerClass(String newHandlerClass) { - String oldHandlerClass = handlerClass; - handlerClass = newHandlerClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.HANDLER__HANDLER_CLASS, oldHandlerClass, handlerClass)); - } - - /** - * - * - * @generated - */ - public EList getInitParams() { - if (initParams == null) { - initParams = new EObjectContainmentEList(InitParam.class, this, WsddPackage.HANDLER__INIT_PARAMS); - } - return initParams; - } - - /** - * - * - * @generated - */ - public EList getSoapHeaders() { - if (soapHeaders == null) { - soapHeaders = new EObjectContainmentEList(SOAPHeader.class, this, WsddPackage.HANDLER__SOAP_HEADERS); - } - return soapHeaders; - } - - /** - * - * - * @generated - */ - public EList getSoapRoles() { - if (soapRoles == null) { - soapRoles = new EObjectContainmentEList(SOAPRole.class, this, WsddPackage.HANDLER__SOAP_ROLES); - } - return soapRoles; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WsddPackage.HANDLER__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case WsddPackage.HANDLER__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case WsddPackage.HANDLER__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WsddPackage.HANDLER__INIT_PARAMS: - return ((InternalEList)getInitParams()).basicRemove(otherEnd, msgs); - case WsddPackage.HANDLER__SOAP_HEADERS: - return ((InternalEList)getSoapHeaders()).basicRemove(otherEnd, msgs); - case WsddPackage.HANDLER__SOAP_ROLES: - return ((InternalEList)getSoapRoles()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.HANDLER__ICONS: - return getIcons(); - case WsddPackage.HANDLER__DISPLAY_NAMES: - return getDisplayNames(); - case WsddPackage.HANDLER__DESCRIPTIONS: - return getDescriptions(); - case WsddPackage.HANDLER__SMALL_ICON: - return getSmallIcon(); - case WsddPackage.HANDLER__LARGE_ICON: - return getLargeIcon(); - case WsddPackage.HANDLER__DESCRIPTION: - return getDescription(); - case WsddPackage.HANDLER__DISPLAY_NAME: - return getDisplayName(); - case WsddPackage.HANDLER__HANDLER_NAME: - return getHandlerName(); - case WsddPackage.HANDLER__HANDLER_CLASS: - return getHandlerClass(); - case WsddPackage.HANDLER__INIT_PARAMS: - return getInitParams(); - case WsddPackage.HANDLER__SOAP_HEADERS: - return getSoapHeaders(); - case WsddPackage.HANDLER__SOAP_ROLES: - return getSoapRoles(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.HANDLER__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case WsddPackage.HANDLER__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case WsddPackage.HANDLER__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WsddPackage.HANDLER__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WsddPackage.HANDLER__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WsddPackage.HANDLER__DESCRIPTION: - setDescription((String)newValue); - return; - case WsddPackage.HANDLER__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WsddPackage.HANDLER__HANDLER_NAME: - setHandlerName((String)newValue); - return; - case WsddPackage.HANDLER__HANDLER_CLASS: - setHandlerClass((String)newValue); - return; - case WsddPackage.HANDLER__INIT_PARAMS: - getInitParams().clear(); - getInitParams().addAll((Collection)newValue); - return; - case WsddPackage.HANDLER__SOAP_HEADERS: - getSoapHeaders().clear(); - getSoapHeaders().addAll((Collection)newValue); - return; - case WsddPackage.HANDLER__SOAP_ROLES: - getSoapRoles().clear(); - getSoapRoles().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.HANDLER__ICONS: - getIcons().clear(); - return; - case WsddPackage.HANDLER__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case WsddPackage.HANDLER__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WsddPackage.HANDLER__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WsddPackage.HANDLER__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WsddPackage.HANDLER__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WsddPackage.HANDLER__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WsddPackage.HANDLER__HANDLER_NAME: - setHandlerName(HANDLER_NAME_EDEFAULT); - return; - case WsddPackage.HANDLER__HANDLER_CLASS: - setHandlerClass(HANDLER_CLASS_EDEFAULT); - return; - case WsddPackage.HANDLER__INIT_PARAMS: - getInitParams().clear(); - return; - case WsddPackage.HANDLER__SOAP_HEADERS: - getSoapHeaders().clear(); - return; - case WsddPackage.HANDLER__SOAP_ROLES: - getSoapRoles().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.HANDLER__ICONS: - return icons != null && !icons.isEmpty(); - case WsddPackage.HANDLER__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case WsddPackage.HANDLER__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WsddPackage.HANDLER__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WsddPackage.HANDLER__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WsddPackage.HANDLER__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WsddPackage.HANDLER__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WsddPackage.HANDLER__HANDLER_NAME: - return HANDLER_NAME_EDEFAULT == null ? handlerName != null : !HANDLER_NAME_EDEFAULT.equals(handlerName); - case WsddPackage.HANDLER__HANDLER_CLASS: - return HANDLER_CLASS_EDEFAULT == null ? handlerClass != null : !HANDLER_CLASS_EDEFAULT.equals(handlerClass); - case WsddPackage.HANDLER__INIT_PARAMS: - return initParams != null && !initParams.isEmpty(); - case WsddPackage.HANDLER__SOAP_HEADERS: - return soapHeaders != null && !soapHeaders.isEmpty(); - case WsddPackage.HANDLER__SOAP_ROLES: - return soapRoles != null && !soapRoles.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (handlerName: ");//$NON-NLS-1$ - result.append(handlerName); - result.append(", handlerClass: ");//$NON-NLS-1$ - result.append(handlerClass); - result.append(')'); - return result.toString(); - } - -} //HandlerImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/PortComponentImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/PortComponentImpl.java deleted file mode 100644 index 1759fa5b2..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/PortComponentImpl.java +++ /dev/null @@ -1,829 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Port Component'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getPortComponentName Port Component Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getServiceEndpointInterface Service Endpoint Interface}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getSmallIcon Small Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getLargeIcon Large Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDescription Description}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDisplayName Display Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getWsdlPort Wsdl Port}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getServiceImplBean Service Impl Bean}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getHandlers Handlers}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDescriptionType Description Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getDisplayNameType Display Name Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.PortComponentImpl#getIconType Icon Type}
  • - *
- *

- * - * @generated - */ -public class PortComponentImpl extends EObjectImpl implements PortComponent -{ - /** - * The default value of the '{@link #getPortComponentName() Port Component Name}' attribute. - * - * - * @see #getPortComponentName() - * @generated - * @ordered - */ - protected static final String PORT_COMPONENT_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPortComponentName() Port Component Name}' attribute. - * - * - * @see #getPortComponentName() - * @generated - * @ordered - */ - protected String portComponentName = PORT_COMPONENT_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' attribute. - * - * - * @see #getServiceEndpointInterface() - * @generated - * @ordered - */ - protected static final String SERVICE_ENDPOINT_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getServiceEndpointInterface() Service Endpoint Interface}' attribute. - * - * - * @see #getServiceEndpointInterface() - * @generated - * @ordered - */ - protected String serviceEndpointInterface = SERVICE_ENDPOINT_INTERFACE_EDEFAULT; - - /** - * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected static final String SMALL_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected String smallIcon = SMALL_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected static final String LARGE_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected String largeIcon = LARGE_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * The default value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected static final String DISPLAY_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected String displayName = DISPLAY_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getWsdlPort() Wsdl Port}' containment reference. - * - * - * @see #getWsdlPort() - * @generated - * @ordered - */ - protected WSDLPort wsdlPort = null; - - /** - * The cached value of the '{@link #getServiceImplBean() Service Impl Bean}' containment reference. - * - * - * @see #getServiceImplBean() - * @generated - * @ordered - */ - protected ServiceImplBean serviceImplBean = null; - - /** - * The cached value of the '{@link #getHandlers() Handlers}' containment reference list. - * - * - * @see #getHandlers() - * @generated - * @ordered - */ - protected EList handlers = null; - - /** - * The cached value of the '{@link #getDescriptionType() Description Type}' containment reference. - * - * - * @see #getDescriptionType() - * @generated - * @ordered - */ - protected DescriptionType descriptionType = null; - - /** - * The cached value of the '{@link #getDisplayNameType() Display Name Type}' containment reference. - * - * - * @see #getDisplayNameType() - * @generated - * @ordered - */ - protected DisplayNameType displayNameType = null; - - /** - * The cached value of the '{@link #getIconType() Icon Type}' containment reference. - * - * - * @see #getIconType() - * @generated - * @ordered - */ - protected IconType iconType = null; - - /** - * - * - * @generated - */ - protected PortComponentImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getPortComponent(); - } - - /** - * - * - * @generated - */ - public String getPortComponentName() { - return portComponentName; - } - - /** - * - * - * @generated - */ - public void setPortComponentName(String newPortComponentName) { - String oldPortComponentName = portComponentName; - portComponentName = newPortComponentName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME, oldPortComponentName, portComponentName)); - } - - /** - * - * - * @generated - */ - public String getServiceEndpointInterface() { - return serviceEndpointInterface; - } - - /** - * - * - * @generated - */ - public void setServiceEndpointInterface(String newServiceEndpointInterface) { - String oldServiceEndpointInterface = serviceEndpointInterface; - serviceEndpointInterface = newServiceEndpointInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE, oldServiceEndpointInterface, serviceEndpointInterface)); - } - - /** - * - * - * @generated - */ - public String getSmallIcon() { - return smallIcon; - } - - /** - * - * - * @generated - */ - public void setSmallIcon(String newSmallIcon) { - String oldSmallIcon = smallIcon; - smallIcon = newSmallIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SMALL_ICON, oldSmallIcon, smallIcon)); - } - - /** - * - * - * @generated - */ - public String getLargeIcon() { - return largeIcon; - } - - /** - * - * - * @generated - */ - public void setLargeIcon(String newLargeIcon) { - String oldLargeIcon = largeIcon; - largeIcon = newLargeIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__LARGE_ICON, oldLargeIcon, largeIcon)); - } - - /** - * - * - * @generated - */ - public String getDescription() { - return description; - } - - /** - * - * - * @generated - */ - public void setDescription(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION, oldDescription, description)); - } - - /** - * - * - * @generated - */ - public String getDisplayName() { - return displayName; - } - - /** - * - * - * @generated - */ - public void setDisplayName(String newDisplayName) { - String oldDisplayName = displayName; - displayName = newDisplayName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME, oldDisplayName, displayName)); - } - - /** - * - * - * @generated - */ - public WSDLPort getWsdlPort() { - return wsdlPort; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetWsdlPort(WSDLPort newWsdlPort, NotificationChain msgs) { - WSDLPort oldWsdlPort = wsdlPort; - wsdlPort = newWsdlPort; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__WSDL_PORT, oldWsdlPort, newWsdlPort); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setWsdlPort(WSDLPort newWsdlPort) { - if (newWsdlPort != wsdlPort) { - NotificationChain msgs = null; - if (wsdlPort != null) - msgs = ((InternalEObject)wsdlPort).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__WSDL_PORT, null, msgs); - if (newWsdlPort != null) - msgs = ((InternalEObject)newWsdlPort).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__WSDL_PORT, null, msgs); - msgs = basicSetWsdlPort(newWsdlPort, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__WSDL_PORT, newWsdlPort, newWsdlPort)); - } - - /** - * - * - * @generated - */ - public ServiceImplBean getServiceImplBean() { - return serviceImplBean; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetServiceImplBean(ServiceImplBean newServiceImplBean, NotificationChain msgs) { - ServiceImplBean oldServiceImplBean = serviceImplBean; - serviceImplBean = newServiceImplBean; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, oldServiceImplBean, newServiceImplBean); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setServiceImplBean(ServiceImplBean newServiceImplBean) { - if (newServiceImplBean != serviceImplBean) { - NotificationChain msgs = null; - if (serviceImplBean != null) - msgs = ((InternalEObject)serviceImplBean).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, null, msgs); - if (newServiceImplBean != null) - msgs = ((InternalEObject)newServiceImplBean).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, null, msgs); - msgs = basicSetServiceImplBean(newServiceImplBean, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN, newServiceImplBean, newServiceImplBean)); - } - - /** - * - * - * @generated - */ - public EList getHandlers() { - if (handlers == null) { - handlers = new EObjectContainmentEList(Handler.class, this, WsddPackage.PORT_COMPONENT__HANDLERS); - } - return handlers; - } - - /** - * - * - * @generated - */ - public DescriptionType getDescriptionType() { - return descriptionType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetDescriptionType(DescriptionType newDescriptionType, NotificationChain msgs) { - DescriptionType oldDescriptionType = descriptionType; - descriptionType = newDescriptionType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, oldDescriptionType, newDescriptionType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setDescriptionType(DescriptionType newDescriptionType) { - if (newDescriptionType != descriptionType) { - NotificationChain msgs = null; - if (descriptionType != null) - msgs = ((InternalEObject)descriptionType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, null, msgs); - if (newDescriptionType != null) - msgs = ((InternalEObject)newDescriptionType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, null, msgs); - msgs = basicSetDescriptionType(newDescriptionType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE, newDescriptionType, newDescriptionType)); - } - - /** - * - * - * @generated - */ - public DisplayNameType getDisplayNameType() { - return displayNameType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetDisplayNameType(DisplayNameType newDisplayNameType, NotificationChain msgs) { - DisplayNameType oldDisplayNameType = displayNameType; - displayNameType = newDisplayNameType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, oldDisplayNameType, newDisplayNameType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setDisplayNameType(DisplayNameType newDisplayNameType) { - if (newDisplayNameType != displayNameType) { - NotificationChain msgs = null; - if (displayNameType != null) - msgs = ((InternalEObject)displayNameType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, null, msgs); - if (newDisplayNameType != null) - msgs = ((InternalEObject)newDisplayNameType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, null, msgs); - msgs = basicSetDisplayNameType(newDisplayNameType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE, newDisplayNameType, newDisplayNameType)); - } - - /** - * - * - * @generated - */ - public IconType getIconType() { - return iconType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetIconType(IconType newIconType, NotificationChain msgs) { - IconType oldIconType = iconType; - iconType = newIconType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__ICON_TYPE, oldIconType, newIconType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setIconType(IconType newIconType) { - if (newIconType != iconType) { - NotificationChain msgs = null; - if (iconType != null) - msgs = ((InternalEObject)iconType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__ICON_TYPE, null, msgs); - if (newIconType != null) - msgs = ((InternalEObject)newIconType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.PORT_COMPONENT__ICON_TYPE, null, msgs); - msgs = basicSetIconType(newIconType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.PORT_COMPONENT__ICON_TYPE, newIconType, newIconType)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WsddPackage.PORT_COMPONENT__WSDL_PORT: - return basicSetWsdlPort(null, msgs); - case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: - return basicSetServiceImplBean(null, msgs); - case WsddPackage.PORT_COMPONENT__HANDLERS: - return ((InternalEList)getHandlers()).basicRemove(otherEnd, msgs); - case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: - return basicSetDescriptionType(null, msgs); - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: - return basicSetDisplayNameType(null, msgs); - case WsddPackage.PORT_COMPONENT__ICON_TYPE: - return basicSetIconType(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: - return getPortComponentName(); - case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: - return getServiceEndpointInterface(); - case WsddPackage.PORT_COMPONENT__SMALL_ICON: - return getSmallIcon(); - case WsddPackage.PORT_COMPONENT__LARGE_ICON: - return getLargeIcon(); - case WsddPackage.PORT_COMPONENT__DESCRIPTION: - return getDescription(); - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: - return getDisplayName(); - case WsddPackage.PORT_COMPONENT__WSDL_PORT: - return getWsdlPort(); - case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: - return getServiceImplBean(); - case WsddPackage.PORT_COMPONENT__HANDLERS: - return getHandlers(); - case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: - return getDescriptionType(); - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: - return getDisplayNameType(); - case WsddPackage.PORT_COMPONENT__ICON_TYPE: - return getIconType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: - setPortComponentName((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: - setServiceEndpointInterface((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__DESCRIPTION: - setDescription((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WsddPackage.PORT_COMPONENT__WSDL_PORT: - setWsdlPort((WSDLPort)newValue); - return; - case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: - setServiceImplBean((ServiceImplBean)newValue); - return; - case WsddPackage.PORT_COMPONENT__HANDLERS: - getHandlers().clear(); - getHandlers().addAll((Collection)newValue); - return; - case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: - setDescriptionType((DescriptionType)newValue); - return; - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: - setDisplayNameType((DisplayNameType)newValue); - return; - case WsddPackage.PORT_COMPONENT__ICON_TYPE: - setIconType((IconType)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: - setPortComponentName(PORT_COMPONENT_NAME_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: - setServiceEndpointInterface(SERVICE_ENDPOINT_INTERFACE_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WsddPackage.PORT_COMPONENT__WSDL_PORT: - setWsdlPort((WSDLPort)null); - return; - case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: - setServiceImplBean((ServiceImplBean)null); - return; - case WsddPackage.PORT_COMPONENT__HANDLERS: - getHandlers().clear(); - return; - case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: - setDescriptionType((DescriptionType)null); - return; - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: - setDisplayNameType((DisplayNameType)null); - return; - case WsddPackage.PORT_COMPONENT__ICON_TYPE: - setIconType((IconType)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.PORT_COMPONENT__PORT_COMPONENT_NAME: - return PORT_COMPONENT_NAME_EDEFAULT == null ? portComponentName != null : !PORT_COMPONENT_NAME_EDEFAULT.equals(portComponentName); - case WsddPackage.PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE: - return SERVICE_ENDPOINT_INTERFACE_EDEFAULT == null ? serviceEndpointInterface != null : !SERVICE_ENDPOINT_INTERFACE_EDEFAULT.equals(serviceEndpointInterface); - case WsddPackage.PORT_COMPONENT__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WsddPackage.PORT_COMPONENT__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WsddPackage.PORT_COMPONENT__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WsddPackage.PORT_COMPONENT__WSDL_PORT: - return wsdlPort != null; - case WsddPackage.PORT_COMPONENT__SERVICE_IMPL_BEAN: - return serviceImplBean != null; - case WsddPackage.PORT_COMPONENT__HANDLERS: - return handlers != null && !handlers.isEmpty(); - case WsddPackage.PORT_COMPONENT__DESCRIPTION_TYPE: - return descriptionType != null; - case WsddPackage.PORT_COMPONENT__DISPLAY_NAME_TYPE: - return displayNameType != null; - case WsddPackage.PORT_COMPONENT__ICON_TYPE: - return iconType != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (portComponentName: ");//$NON-NLS-1$ - result.append(portComponentName); - result.append(", serviceEndpointInterface: ");//$NON-NLS-1$ - result.append(serviceEndpointInterface); - result.append(", smallIcon: ");//$NON-NLS-1$ - result.append(smallIcon); - result.append(", largeIcon: ");//$NON-NLS-1$ - result.append(largeIcon); - result.append(", description: ");//$NON-NLS-1$ - result.append(description); - result.append(", displayName: ");//$NON-NLS-1$ - result.append(displayName); - result.append(')'); - return result.toString(); - } - -} //PortComponentImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServiceImplBeanImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServiceImplBeanImpl.java deleted file mode 100644 index b8c68b5db..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServiceImplBeanImpl.java +++ /dev/null @@ -1,316 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Service Impl Bean'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getEEJBLink EEJB Link}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getEServletLink EServlet Link}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServiceImplBeanImpl#getBeanLink Bean Link}
  • - *
- *

- * - * @generated - */ -public class ServiceImplBeanImpl extends EObjectImpl implements ServiceImplBean -{ - /** - * The cached value of the '{@link #getEEJBLink() EEJB Link}' containment reference. - * - * - * @see #getEEJBLink() - * @generated - * @ordered - */ - protected EJBLink eEJBLink = null; - - /** - * The cached value of the '{@link #getEServletLink() EServlet Link}' containment reference. - * - * - * @see #getEServletLink() - * @generated - * @ordered - */ - protected ServletLink eServletLink = null; - - /** - * The cached value of the '{@link #getBeanLink() Bean Link}' containment reference. - * - * - * @see #getBeanLink() - * @generated - * @ordered - */ - protected BeanLink beanLink = null; - - /** - * - * - * @generated - */ - protected ServiceImplBeanImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getServiceImplBean(); - } - - /** - * - * - * @generated - */ - public EJBLink getEEJBLink() { - return eEJBLink; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetEEJBLink(EJBLink newEEJBLink, NotificationChain msgs) { - EJBLink oldEEJBLink = eEJBLink; - eEJBLink = newEEJBLink; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, oldEEJBLink, newEEJBLink); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setEEJBLink(EJBLink newEEJBLink) { - if (newEEJBLink != eEJBLink) { - NotificationChain msgs = null; - if (eEJBLink != null) - msgs = ((InternalEObject)eEJBLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, null, msgs); - if (newEEJBLink != null) - msgs = ((InternalEObject)newEEJBLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, null, msgs); - msgs = basicSetEEJBLink(newEEJBLink, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK, newEEJBLink, newEEJBLink)); - } - - /** - * - * - * @generated - */ - public ServletLink getEServletLink() { - return eServletLink; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetEServletLink(ServletLink newEServletLink, NotificationChain msgs) { - ServletLink oldEServletLink = eServletLink; - eServletLink = newEServletLink; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, oldEServletLink, newEServletLink); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setEServletLink(ServletLink newEServletLink) { - if (newEServletLink != eServletLink) { - NotificationChain msgs = null; - if (eServletLink != null) - msgs = ((InternalEObject)eServletLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, null, msgs); - if (newEServletLink != null) - msgs = ((InternalEObject)newEServletLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, null, msgs); - msgs = basicSetEServletLink(newEServletLink, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK, newEServletLink, newEServletLink)); - } - - /** - * - * - * @generated - */ - public BeanLink getBeanLink() { - return beanLink; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetBeanLink(BeanLink newBeanLink, NotificationChain msgs) { - BeanLink oldBeanLink = beanLink; - beanLink = newBeanLink; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, oldBeanLink, newBeanLink); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setBeanLink(BeanLink newBeanLink) { - if (newBeanLink != beanLink) { - NotificationChain msgs = null; - if (beanLink != null) - msgs = ((InternalEObject)beanLink).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, null, msgs); - if (newBeanLink != null) - msgs = ((InternalEObject)newBeanLink).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, null, msgs); - msgs = basicSetBeanLink(newBeanLink, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK, newBeanLink, newBeanLink)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: - return basicSetEEJBLink(null, msgs); - case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: - return basicSetEServletLink(null, msgs); - case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: - return basicSetBeanLink(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: - return getEEJBLink(); - case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: - return getEServletLink(); - case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: - return getBeanLink(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: - setEEJBLink((EJBLink)newValue); - return; - case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: - setEServletLink((ServletLink)newValue); - return; - case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: - setBeanLink((BeanLink)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: - setEEJBLink((EJBLink)null); - return; - case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: - setEServletLink((ServletLink)null); - return; - case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: - setBeanLink((BeanLink)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVICE_IMPL_BEAN__EEJB_LINK: - return eEJBLink != null; - case WsddPackage.SERVICE_IMPL_BEAN__ESERVLET_LINK: - return eServletLink != null; - case WsddPackage.SERVICE_IMPL_BEAN__BEAN_LINK: - return beanLink != null; - } - return eDynamicIsSet(eFeature); - } - -} //ServiceImplBeanImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServletLinkImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServletLinkImpl.java deleted file mode 100644 index 4c9b9a0ad..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/ServletLinkImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Servlet Link'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.ServletLinkImpl#getServletLink Servlet Link}
  • - *
- *

- * - * @generated - */ -public class ServletLinkImpl extends BeanLinkImpl implements ServletLink -{ - /** - * The default value of the '{@link #getServletLink() Servlet Link}' attribute. - * - * - * @see #getServletLink() - * @generated - * @ordered - */ - protected static final String SERVLET_LINK_EDEFAULT = null; - - /** - * The cached value of the '{@link #getServletLink() Servlet Link}' attribute. - * - * - * @see #getServletLink() - * @generated - * @ordered - */ - protected String servletLink = SERVLET_LINK_EDEFAULT; - - /** - * - * - * @generated - */ - protected ServletLinkImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getServletLink(); - } - - /** - * - * - * @generated - */ - public String getServletLink() { - return servletLink; - } - - /** - * - * - * @generated - */ - public void setServletLink(String newServletLink) { - String oldServletLink = servletLink; - servletLink = newServletLink; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.SERVLET_LINK__SERVLET_LINK, oldServletLink, servletLink)); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVLET_LINK__SERVLET_LINK: - return getServletLink(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVLET_LINK__SERVLET_LINK: - setServletLink((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVLET_LINK__SERVLET_LINK: - setServletLink(SERVLET_LINK_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.SERVLET_LINK__SERVLET_LINK: - return SERVLET_LINK_EDEFAULT == null ? servletLink != null : !SERVLET_LINK_EDEFAULT.equals(servletLink); - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (servletLink: ");//$NON-NLS-1$ - result.append(servletLink); - result.append(')'); - return result.toString(); - } - -} //ServletLinkImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WSDLPortImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WSDLPortImpl.java deleted file mode 100644 index b9b767b76..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WSDLPortImpl.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'WSDL Port'. - * - *

- *

- * - * @generated - */ -public class WSDLPortImpl extends QNameImpl implements WSDLPort -{ - /** - * - * - * @generated - */ - protected WSDLPortImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getWSDLPort(); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WSDL_PORT__NAMESPACE_URI: - return getNamespaceURI(); - case WsddPackage.WSDL_PORT__LOCAL_PART: - return getLocalPart(); - case WsddPackage.WSDL_PORT__COMBINED_QNAME: - return getCombinedQName(); - case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: - return getInternalPrefixOrNsURI(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WSDL_PORT__NAMESPACE_URI: - setNamespaceURI((String)newValue); - return; - case WsddPackage.WSDL_PORT__LOCAL_PART: - setLocalPart((String)newValue); - return; - case WsddPackage.WSDL_PORT__COMBINED_QNAME: - setCombinedQName((String)newValue); - return; - case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI((String)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WSDL_PORT__NAMESPACE_URI: - setNamespaceURI(NAMESPACE_URI_EDEFAULT); - return; - case WsddPackage.WSDL_PORT__LOCAL_PART: - setLocalPart(LOCAL_PART_EDEFAULT); - return; - case WsddPackage.WSDL_PORT__COMBINED_QNAME: - setCombinedQName(COMBINED_QNAME_EDEFAULT); - return; - case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: - setInternalPrefixOrNsURI(INTERNAL_PREFIX_OR_NS_URI_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WSDL_PORT__NAMESPACE_URI: - return NAMESPACE_URI_EDEFAULT == null ? namespaceURI != null : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI); - case WsddPackage.WSDL_PORT__LOCAL_PART: - return LOCAL_PART_EDEFAULT == null ? localPart != null : !LOCAL_PART_EDEFAULT.equals(localPart); - case WsddPackage.WSDL_PORT__COMBINED_QNAME: - return COMBINED_QNAME_EDEFAULT == null ? combinedQName != null : !COMBINED_QNAME_EDEFAULT.equals(combinedQName); - case WsddPackage.WSDL_PORT__INTERNAL_PREFIX_OR_NS_URI: - return INTERNAL_PREFIX_OR_NS_URI_EDEFAULT == null ? internalPrefixOrNsURI != null : !INTERNAL_PREFIX_OR_NS_URI_EDEFAULT.equals(internalPrefixOrNsURI); - } - return eDynamicIsSet(eFeature); - } - -} //WSDLPortImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServiceDescriptionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServiceDescriptionImpl.java deleted file mode 100644 index d7a025d96..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServiceDescriptionImpl.java +++ /dev/null @@ -1,969 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.CommonFactory; -import org.eclipse.jst.j2ee.common.Description; -import org.eclipse.jst.j2ee.common.DisplayName; -import org.eclipse.jst.j2ee.common.IconType; -import org.eclipse.jst.j2ee.common.J2EEVersionResource; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.webservice.wscommon.DescriptionType; -import org.eclipse.jst.j2ee.webservice.wscommon.DisplayNameType; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Web Service Description'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getJaxrpcMappingFile Jaxrpc Mapping File}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getWebServiceDescriptionName Web Service Description Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getWsdlFile Wsdl File}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getSmallIcon Small Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getLargeIcon Large Icon}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDescription Description}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDisplayName Display Name}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getPortComponents Port Components}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDescriptionType Description Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getDisplayNameType Display Name Type}
  • - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServiceDescriptionImpl#getIconType Icon Type}
  • - *
- *

- * - * @generated - */ -public class WebServiceDescriptionImpl extends EObjectImpl implements WebServiceDescription -{ - /** - * The default value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. - * - * - * @see #getJaxrpcMappingFile() - * @generated - * @ordered - */ - protected static final String JAXRPC_MAPPING_FILE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJaxrpcMappingFile() Jaxrpc Mapping File}' attribute. - * - * - * @see #getJaxrpcMappingFile() - * @generated - * @ordered - */ - protected String jaxrpcMappingFile = JAXRPC_MAPPING_FILE_EDEFAULT; - - /** - * The default value of the '{@link #getWebServiceDescriptionName() Web Service Description Name}' attribute. - * - * - * @see #getWebServiceDescriptionName() - * @generated - * @ordered - */ - protected static final String WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getWebServiceDescriptionName() Web Service Description Name}' attribute. - * - * - * @see #getWebServiceDescriptionName() - * @generated - * @ordered - */ - protected String webServiceDescriptionName = WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getWsdlFile() Wsdl File}' attribute. - * - * - * @see #getWsdlFile() - * @generated - * @ordered - */ - protected static final String WSDL_FILE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getWsdlFile() Wsdl File}' attribute. - * - * - * @see #getWsdlFile() - * @generated - * @ordered - */ - protected String wsdlFile = WSDL_FILE_EDEFAULT; - - /** - * The default value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected static final String SMALL_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSmallIcon() Small Icon}' attribute. - * - * - * @see #getSmallIcon() - * @generated - * @ordered - */ - protected String smallIcon = SMALL_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected static final String LARGE_ICON_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLargeIcon() Large Icon}' attribute. - * - * - * @see #getLargeIcon() - * @generated - * @ordered - */ - protected String largeIcon = LARGE_ICON_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * The default value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected static final String DISPLAY_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayName() Display Name}' attribute. - * - * - * @see #getDisplayName() - * @generated - * @ordered - */ - protected String displayName = DISPLAY_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getPortComponents() Port Components}' containment reference list. - * - * - * @see #getPortComponents() - * @generated - * @ordered - */ - protected EList portComponents = null; - - /** - * The cached value of the '{@link #getDescriptionType() Description Type}' containment reference. - * - * - * @see #getDescriptionType() - * @generated - * @ordered - */ - protected DescriptionType descriptionType = null; - - /** - * The cached value of the '{@link #getDisplayNameType() Display Name Type}' containment reference. - * - * - * @see #getDisplayNameType() - * @generated - * @ordered - */ - protected DisplayNameType displayNameType = null; - - /** - * The cached value of the '{@link #getIconType() Icon Type}' containment reference. - * - * - * @see #getIconType() - * @generated - * @ordered - */ - protected IconType iconType = null; - - /** - * - * - * @generated - */ - protected WebServiceDescriptionImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getWebServiceDescription(); - } - - /** - * - * - * @generated - */ - public String getJaxrpcMappingFile() { - return jaxrpcMappingFile; - } - - /** - * - * - * @generated - */ - public void setJaxrpcMappingFile(String newJaxrpcMappingFile) { - String oldJaxrpcMappingFile = jaxrpcMappingFile; - jaxrpcMappingFile = newJaxrpcMappingFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE, oldJaxrpcMappingFile, jaxrpcMappingFile)); - } - - /** - * - * - * @generated - */ - public String getWebServiceDescriptionName() { - return webServiceDescriptionName; - } - - /** - * - * - * @generated - */ - public void setWebServiceDescriptionName(String newWebServiceDescriptionName) { - String oldWebServiceDescriptionName = webServiceDescriptionName; - webServiceDescriptionName = newWebServiceDescriptionName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME, oldWebServiceDescriptionName, webServiceDescriptionName)); - } - - /** - * - * - * @generated - */ - public String getWsdlFile() { - return wsdlFile; - } - - /** - * - * - * @generated - */ - public void setWsdlFile(String newWsdlFile) { - String oldWsdlFile = wsdlFile; - wsdlFile = newWsdlFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE, oldWsdlFile, wsdlFile)); - } - - /** - * - * - * @generated - */ - public String getSmallIconGen() { - return smallIcon; - } - public String getSmallIcon() { - if(eResource() == null) - return getSmallIconGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getSmallIconGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getIconType() != null) - return getIconType().getSmallIcon(); - } - return null; - } - - /** - * - * - * @generated - */ - public void setSmallIconGen(String newSmallIcon) { - String oldSmallIcon = smallIcon; - smallIcon = newSmallIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON, oldSmallIcon, smallIcon)); - } - - /** - * - * - * @generated - */ - public String getLargeIconGen() { - return largeIcon; - } - public String getLargeIcon() { - if(eResource() == null) - return getLargeIconGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getLargeIconGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getIconType() != null) - return getIconType().getLargeIcon(); - } - return null; - } - - /** - * - * - * @generated - */ - public void setLargeIconGen(String newLargeIcon) { - String oldLargeIcon = largeIcon; - largeIcon = newLargeIcon; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON, oldLargeIcon, largeIcon)); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup#getJ2EEVersionID() - */ - public int getJ2EEVersionID() throws IllegalStateException { - J2EEVersionResource res = (J2EEVersionResource) eResource(); - if (res == null) - throw new IllegalStateException(); - return res.getJ2EEVersionID(); - } - - /** - * - * - * @generated - */ - public String getDescriptionGen() { - return description; - } - - public String getDescription() { - if(eResource() == null) - return getDescriptionGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getDescriptionGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getDescriptionType() != null) - return ((Description)getDescriptionType()).getValue(); - } - return null; - } - - /** - * - * - * @generated - */ - public void setDescriptionGen(String newDescription) { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION, oldDescription, description)); - } - public void setDescription(String newDescription) { - if(eResource() == null) { - setDescriptionGen(newDescription); - internalSetDescriptionType(newDescription); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setDescriptionGen(newDescription); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetDescriptionType(newDescription); - break; - } - } - - /** - * - * - * @generated - */ - public String getDisplayNameGen() { - return displayName; - } - public String getDisplayName() { - if(eResource() == null) - return getDisplayNameGen(); - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - return getDisplayNameGen(); - case J2EEVersionConstants.J2EE_1_4_ID : - default : - if (getDisplayNameType() != null) - return ((DisplayName)getDisplayNameType()).getValue(); - } - return null; - } - - /** - * - * - * @generated - */ - public void setDisplayNameGen(String newDisplayName) { - String oldDisplayName = displayName; - displayName = newDisplayName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME, oldDisplayName, displayName)); - } - public void setDisplayName(String newDisplayName) { - if(eResource() == null) { - setDisplayNameGen(newDisplayName); - internalSetDisplayNameType(newDisplayName); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setDisplayNameGen(newDisplayName); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetDisplayNameType(newDisplayName); - break; - } - } - - /** - * - * - * @generated - */ - public EList getPortComponents() { - if (portComponents == null) { - portComponents = new EObjectContainmentEList(PortComponent.class, this, WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS); - } - return portComponents; - } - - /** - * - * - * @generated - */ - public DescriptionType getDescriptionType() { - return descriptionType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetDescriptionType(DescriptionType newDescriptionType, NotificationChain msgs) { - DescriptionType oldDescriptionType = descriptionType; - descriptionType = newDescriptionType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, oldDescriptionType, newDescriptionType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setDescriptionType(DescriptionType newDescriptionType) { - if (newDescriptionType != descriptionType) { - NotificationChain msgs = null; - if (descriptionType != null) - msgs = ((InternalEObject)descriptionType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, null, msgs); - if (newDescriptionType != null) - msgs = ((InternalEObject)newDescriptionType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, null, msgs); - msgs = basicSetDescriptionType(newDescriptionType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE, newDescriptionType, newDescriptionType)); - } - - /** - * - * - * @generated - */ - public DisplayNameType getDisplayNameType() { - return displayNameType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetDisplayNameType(DisplayNameType newDisplayNameType, NotificationChain msgs) { - DisplayNameType oldDisplayNameType = displayNameType; - displayNameType = newDisplayNameType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, oldDisplayNameType, newDisplayNameType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setDisplayNameType(DisplayNameType newDisplayNameType) { - if (newDisplayNameType != displayNameType) { - NotificationChain msgs = null; - if (displayNameType != null) - msgs = ((InternalEObject)displayNameType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, null, msgs); - if (newDisplayNameType != null) - msgs = ((InternalEObject)newDisplayNameType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, null, msgs); - msgs = basicSetDisplayNameType(newDisplayNameType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE, newDisplayNameType, newDisplayNameType)); - } - - /** - * - * - * @generated - */ - public IconType getIconType() { - return iconType; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetIconType(IconType newIconType, NotificationChain msgs) { - IconType oldIconType = iconType; - iconType = newIconType; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, oldIconType, newIconType); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setIconType(IconType newIconType) { - if (newIconType != iconType) { - NotificationChain msgs = null; - if (iconType != null) - msgs = ((InternalEObject)iconType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, null, msgs); - if (newIconType != null) - msgs = ((InternalEObject)newIconType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, null, msgs); - msgs = basicSetIconType(newIconType, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE, newIconType, newIconType)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: - return ((InternalEList)getPortComponents()).basicRemove(otherEnd, msgs); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: - return basicSetDescriptionType(null, msgs); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: - return basicSetDisplayNameType(null, msgs); - case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: - return basicSetIconType(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: - return getJaxrpcMappingFile(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: - return getWebServiceDescriptionName(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: - return getWsdlFile(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: - return getSmallIcon(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: - return getLargeIcon(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: - return getDescription(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: - return getDisplayName(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: - return getPortComponents(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: - return getDescriptionType(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: - return getDisplayNameType(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: - return getIconType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: - setJaxrpcMappingFile((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: - setWebServiceDescriptionName((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: - setWsdlFile((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: - setDescription((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: - getPortComponents().clear(); - getPortComponents().addAll((Collection)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: - setDescriptionType((DescriptionType)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: - setDisplayNameType((DisplayNameType)newValue); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: - setIconType((IconType)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: - setJaxrpcMappingFile(JAXRPC_MAPPING_FILE_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: - setWebServiceDescriptionName(WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: - setWsdlFile(WSDL_FILE_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: - getPortComponents().clear(); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: - setDescriptionType((DescriptionType)null); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: - setDisplayNameType((DisplayNameType)null); - return; - case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: - setIconType((IconType)null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE: - return JAXRPC_MAPPING_FILE_EDEFAULT == null ? jaxrpcMappingFile != null : !JAXRPC_MAPPING_FILE_EDEFAULT.equals(jaxrpcMappingFile); - case WsddPackage.WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME: - return WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT == null ? webServiceDescriptionName != null : !WEB_SERVICE_DESCRIPTION_NAME_EDEFAULT.equals(webServiceDescriptionName); - case WsddPackage.WEB_SERVICE_DESCRIPTION__WSDL_FILE: - return WSDL_FILE_EDEFAULT == null ? wsdlFile != null : !WSDL_FILE_EDEFAULT.equals(wsdlFile); - case WsddPackage.WEB_SERVICE_DESCRIPTION__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WsddPackage.WEB_SERVICE_DESCRIPTION__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WsddPackage.WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS: - return portComponents != null && !portComponents.isEmpty(); - case WsddPackage.WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE: - return descriptionType != null; - case WsddPackage.WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE: - return displayNameType != null; - case WsddPackage.WEB_SERVICE_DESCRIPTION__ICON_TYPE: - return iconType != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * - * - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (jaxrpcMappingFile: ");//$NON-NLS-1$ - result.append(jaxrpcMappingFile); - result.append(", webServiceDescriptionName: ");//$NON-NLS-1$ - result.append(webServiceDescriptionName); - result.append(", wsdlFile: ");//$NON-NLS-1$ - result.append(wsdlFile); - result.append(", smallIcon: ");//$NON-NLS-1$ - result.append(smallIcon); - result.append(", largeIcon: ");//$NON-NLS-1$ - result.append(largeIcon); - result.append(", description: ");//$NON-NLS-1$ - result.append(description); - result.append(", displayName: ");//$NON-NLS-1$ - result.append(displayName); - result.append(')'); - return result.toString(); - } - - /** - * @param newDescription - */ - protected void internalSetDescriptionType(String newDescription) { - DescriptionType newValue = null; - if(getDescriptionType() != null) { - newValue = getDescriptionType(); - newValue.setValue(newDescription); - } - else { - newValue = WscommonFactory.eINSTANCE.createDescriptionType(); - newValue.setValue(newDescription); - setDescriptionType(newValue); - } - - } - - /** - * @param newDisplayName - */ - protected void internalSetDisplayNameType(String newDisplayName) { - DisplayNameType newValue = null; - if(getDisplayNameType() != null) { - newValue = getDisplayNameType(); - newValue.setValue(newDisplayName); - } - else { - newValue = WscommonFactory.eINSTANCE.createDisplayNameType(); - newValue.setValue(newDisplayName); - setDisplayNameType(newValue); - } - - } - - /** - * @param newLargeIcon - */ - protected void internalSetLargeIconType(String newLargeIcon) { - IconType newValue = null; - if(getIconType() != null) { - newValue = getIconType(); - newValue.setLargeIcon(newLargeIcon); - } - else { - newValue = CommonFactory.eINSTANCE.createIconType(); - newValue.setLargeIcon(newLargeIcon); - setIconType(newValue); - } - - } - - /** - * @param newSmallIcon - */ - protected void internalSetSmallIconType(String newSmallIcon) { - IconType newValue = null; - if(getIconType() != null) { - newValue = getIconType(); - newValue.setSmallIcon(newSmallIcon); - } - else { - newValue = CommonFactory.eINSTANCE.createIconType(); - newValue.setSmallIcon(newSmallIcon); - setIconType(newValue); - } - } - - public void setLargeIcon(String newLargeIcon) { - if(eResource() == null) { - setLargeIconGen(newLargeIcon); - internalSetLargeIconType(newLargeIcon); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setLargeIconGen(newLargeIcon); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetLargeIconType(newLargeIcon); - break; - } - } - - public void setSmallIcon(String newSmallIcon) { - if(eResource() == null) { - setSmallIconGen(newSmallIcon); - internalSetSmallIconType(newSmallIcon); - return; - } - - switch (getJ2EEVersionID()) { - case J2EEVersionConstants.J2EE_1_2_ID : - case J2EEVersionConstants.J2EE_1_3_ID : - setSmallIconGen(newSmallIcon); - break; - case J2EEVersionConstants.J2EE_1_4_ID : - default : - internalSetSmallIconType(newSmallIcon); - break; - } - } - -} //WebServiceDescriptionImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServicesImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServicesImpl.java deleted file mode 100644 index d2600d91e..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WebServicesImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.jst.j2ee.common.impl.CompatibilityDescriptionGroupImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model object 'Web Services'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.jst.j2ee.internal.webservice.wsdd.impl.WebServicesImpl#getWebServiceDescriptions Web Service Descriptions}
  • - *
- *

- * - * @generated - */ -public class WebServicesImpl extends CompatibilityDescriptionGroupImpl implements WebServices -{ - /** - * The cached value of the '{@link #getWebServiceDescriptions() Web Service Descriptions}' containment reference list. - * - * - * @see #getWebServiceDescriptions() - * @generated - * @ordered - */ - protected EList webServiceDescriptions = null; - - /** - * - * - * @generated - */ - protected WebServicesImpl() { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() { - return WsddPackage.eINSTANCE.getWebServices(); - } - - /** - * - */ - public void setDisplayName(String newDisplayName) { - super.setDisplayName(newDisplayName); - } - - /** - * - * - * @generated - */ - public EList getWebServiceDescriptions() { - if (webServiceDescriptions == null) { - webServiceDescriptions = new EObjectContainmentEList(WebServiceDescription.class, this, WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS); - } - return webServiceDescriptions; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case WsddPackage.WEB_SERVICES__ICONS: - return ((InternalEList)getIcons()).basicRemove(otherEnd, msgs); - case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: - return ((InternalEList)getDisplayNames()).basicRemove(otherEnd, msgs); - case WsddPackage.WEB_SERVICES__DESCRIPTIONS: - return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs); - case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: - return ((InternalEList)getWebServiceDescriptions()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICES__ICONS: - return getIcons(); - case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: - return getDisplayNames(); - case WsddPackage.WEB_SERVICES__DESCRIPTIONS: - return getDescriptions(); - case WsddPackage.WEB_SERVICES__SMALL_ICON: - return getSmallIcon(); - case WsddPackage.WEB_SERVICES__LARGE_ICON: - return getLargeIcon(); - case WsddPackage.WEB_SERVICES__DESCRIPTION: - return getDescription(); - case WsddPackage.WEB_SERVICES__DISPLAY_NAME: - return getDisplayName(); - case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: - return getWebServiceDescriptions(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICES__ICONS: - getIcons().clear(); - getIcons().addAll((Collection)newValue); - return; - case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: - getDisplayNames().clear(); - getDisplayNames().addAll((Collection)newValue); - return; - case WsddPackage.WEB_SERVICES__DESCRIPTIONS: - getDescriptions().clear(); - getDescriptions().addAll((Collection)newValue); - return; - case WsddPackage.WEB_SERVICES__SMALL_ICON: - setSmallIcon((String)newValue); - return; - case WsddPackage.WEB_SERVICES__LARGE_ICON: - setLargeIcon((String)newValue); - return; - case WsddPackage.WEB_SERVICES__DESCRIPTION: - setDescription((String)newValue); - return; - case WsddPackage.WEB_SERVICES__DISPLAY_NAME: - setDisplayName((String)newValue); - return; - case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: - getWebServiceDescriptions().clear(); - getWebServiceDescriptions().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICES__ICONS: - getIcons().clear(); - return; - case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: - getDisplayNames().clear(); - return; - case WsddPackage.WEB_SERVICES__DESCRIPTIONS: - getDescriptions().clear(); - return; - case WsddPackage.WEB_SERVICES__SMALL_ICON: - setSmallIcon(SMALL_ICON_EDEFAULT); - return; - case WsddPackage.WEB_SERVICES__LARGE_ICON: - setLargeIcon(LARGE_ICON_EDEFAULT); - return; - case WsddPackage.WEB_SERVICES__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - case WsddPackage.WEB_SERVICES__DISPLAY_NAME: - setDisplayName(DISPLAY_NAME_EDEFAULT); - return; - case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: - getWebServiceDescriptions().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case WsddPackage.WEB_SERVICES__ICONS: - return icons != null && !icons.isEmpty(); - case WsddPackage.WEB_SERVICES__DISPLAY_NAMES: - return displayNames != null && !displayNames.isEmpty(); - case WsddPackage.WEB_SERVICES__DESCRIPTIONS: - return descriptions != null && !descriptions.isEmpty(); - case WsddPackage.WEB_SERVICES__SMALL_ICON: - return SMALL_ICON_EDEFAULT == null ? smallIcon != null : !SMALL_ICON_EDEFAULT.equals(smallIcon); - case WsddPackage.WEB_SERVICES__LARGE_ICON: - return LARGE_ICON_EDEFAULT == null ? largeIcon != null : !LARGE_ICON_EDEFAULT.equals(largeIcon); - case WsddPackage.WEB_SERVICES__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case WsddPackage.WEB_SERVICES__DISPLAY_NAME: - return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); - case WsddPackage.WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS: - return webServiceDescriptions != null && !webServiceDescriptions.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - -} //WebServicesImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddFactoryImpl.java deleted file mode 100644 index cede755cd..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddFactoryImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddFactory; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class WsddFactoryImpl extends EFactoryImpl implements WsddFactory -{ - /** - * Creates and instance of the factory. - * - * - * @generated - */ - public WsddFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case WsddPackage.WEB_SERVICES: return createWebServices(); - case WsddPackage.WEB_SERVICE_DESCRIPTION: return createWebServiceDescription(); - case WsddPackage.PORT_COMPONENT: return createPortComponent(); - case WsddPackage.WSDL_PORT: return createWSDLPort(); - case WsddPackage.SERVICE_IMPL_BEAN: return createServiceImplBean(); - case WsddPackage.SERVLET_LINK: return createServletLink(); - case WsddPackage.EJB_LINK: return createEJBLink(); - case WsddPackage.HANDLER: return createHandler(); - case WsddPackage.BEAN_LINK: return createBeanLink(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");//$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ - public WebServices createWebServices() { - WebServicesImpl webServices = new WebServicesImpl(); - return webServices; - } - - /** - * - * - * @generated - */ - public WebServiceDescription createWebServiceDescription() { - WebServiceDescriptionImpl webServiceDescription = new WebServiceDescriptionImpl(); - return webServiceDescription; - } - - /** - * - * - * @generated - */ - public PortComponent createPortComponent() { - PortComponentImpl portComponent = new PortComponentImpl(); - return portComponent; - } - - /** - * - * - * @generated - */ - public WSDLPort createWSDLPort() { - WSDLPortImpl wsdlPort = new WSDLPortImpl(); - return wsdlPort; - } - - /** - * - * - * @generated - */ - public ServiceImplBean createServiceImplBean() { - ServiceImplBeanImpl serviceImplBean = new ServiceImplBeanImpl(); - return serviceImplBean; - } - - /** - * - * - * @generated - */ - public ServletLink createServletLink() { - ServletLinkImpl servletLink = new ServletLinkImpl(); - return servletLink; - } - - /** - * - * - * @generated - */ - public EJBLink createEJBLink() { - EJBLinkImpl ejbLink = new EJBLinkImpl(); - return ejbLink; - } - - /** - * - * - * @generated - */ - public Handler createHandler() { - HandlerImpl handler = new HandlerImpl(); - return handler; - } - - /** - * - * - * @generated - */ - public BeanLink createBeanLink() { - BeanLinkImpl beanLink = new BeanLinkImpl(); - return beanLink; - } - - /** - * - * - * @generated - */ - public WsddPackage getWsddPackage() { - return (WsddPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static WsddPackage getPackage() { - return WsddPackage.eINSTANCE; - } -} //WsddFactoryImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddPackageImpl.java deleted file mode 100644 index ff0c5f63d..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddPackageImpl.java +++ /dev/null @@ -1,783 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.jem.java.impl.JavaRefPackageImpl; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.client.ClientPackage; -import org.eclipse.jst.j2ee.client.impl.ClientPackageImpl; -import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; -import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbPackageImpl; -import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaPackageImpl; -import org.eclipse.jst.j2ee.jsp.JspPackage; -import org.eclipse.jst.j2ee.jsp.impl.JspPackageImpl; -import org.eclipse.jst.j2ee.taglib.TaglibPackage; -import org.eclipse.jst.j2ee.taglib.impl.TaglibPackageImpl; -import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage; -import org.eclipse.jst.j2ee.webservice.wsclient.impl.Webservice_clientPackageImpl; -import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddFactory; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class WsddPackageImpl extends EPackageImpl implements WsddPackage -{ - /** - * - * - * @generated - */ - private EClass webServicesEClass = null; - - /** - * - * - * @generated - */ - private EClass webServiceDescriptionEClass = null; - - /** - * - * - * @generated - */ - private EClass portComponentEClass = null; - - /** - * - * - * @generated - */ - private EClass wsdlPortEClass = null; - - /** - * - * - * @generated - */ - private EClass serviceImplBeanEClass = null; - - /** - * - * - * @generated - */ - private EClass servletLinkEClass = null; - - /** - * - * - * @generated - */ - private EClass ejbLinkEClass = null; - - /** - * - * - * @generated - */ - private EClass handlerEClass = null; - - /** - * - * - * @generated - */ - private EClass beanLinkEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage#eNS_URI - * @see #init() - * @generated - */ - private WsddPackageImpl() { - super(eNS_URI, WsddFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static WsddPackage init() { - if (isInited) return (WsddPackage)EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI); - - // Obtain or create and register package. - WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new WsddPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - JavaRefPackageImpl.init(); - - // Obtain or create and register interdependencies - EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI) : EjbPackage.eINSTANCE); - ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE); - Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE); - WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE); - ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE); - JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE); - TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE); - - // Step 1: create meta-model objects - theWsddPackage.createPackageContents(); - theEjbPackage.createPackageContents(); - theClientPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - theJcaPackage.createPackageContents(); - theWebservice_clientPackage.createPackageContents(); - theWscommonPackage.createPackageContents(); - theWebapplicationPackage.createPackageContents(); - theApplicationPackage.createPackageContents(); - theJspPackage.createPackageContents(); - theTaglibPackage.createPackageContents(); - - // Step 2: complete initialization - theWsddPackage.initializePackageContents(); - theEjbPackage.initializePackageContents(); - theClientPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - theJcaPackage.initializePackageContents(); - theWebservice_clientPackage.initializePackageContents(); - theWscommonPackage.initializePackageContents(); - theWebapplicationPackage.initializePackageContents(); - theApplicationPackage.initializePackageContents(); - theJspPackage.initializePackageContents(); - theTaglibPackage.initializePackageContents(); - - return theWsddPackage; - } - - /** - * - * - * @generated - */ - public EClass getWebServices() { - return webServicesEClass; - } - - /** - * - * - * @generated - */ - public EReference getWebServices_WebServiceDescriptions() { - return (EReference)webServicesEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getWebServiceDescription() { - return webServiceDescriptionEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_JaxrpcMappingFile() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_WebServiceDescriptionName() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_WsdlFile() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_SmallIcon() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_LargeIcon() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_Description() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getWebServiceDescription_DisplayName() { - return (EAttribute)webServiceDescriptionEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getWebServiceDescription_PortComponents() { - return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EReference getWebServiceDescription_DescriptionType() { - return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EReference getWebServiceDescription_DisplayNameType() { - return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated - */ - public EReference getWebServiceDescription_IconType() { - return (EReference)webServiceDescriptionEClass.getEStructuralFeatures().get(10); - } - - /** - * - * - * @generated - */ - public EClass getPortComponent() { - return portComponentEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_PortComponentName() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_ServiceEndpointInterface() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_SmallIcon() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_LargeIcon() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_Description() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getPortComponent_DisplayName() { - return (EAttribute)portComponentEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_WsdlPort() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_ServiceImplBean() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_Handlers() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_DescriptionType() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_DisplayNameType() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(10); - } - - /** - * - * - * @generated - */ - public EReference getPortComponent_IconType() { - return (EReference)portComponentEClass.getEStructuralFeatures().get(11); - } - - /** - * - * - * @generated - */ - public EClass getWSDLPort() { - return wsdlPortEClass; - } - - /** - * - * - * @generated - */ - public EClass getServiceImplBean() { - return serviceImplBeanEClass; - } - - /** - * - * - * @generated - */ - public EReference getServiceImplBean_EEJBLink() { - return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getServiceImplBean_EServletLink() { - return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getServiceImplBean_BeanLink() { - return (EReference)serviceImplBeanEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getServletLink() { - return servletLinkEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getServletLink_ServletLink() { - return (EAttribute)servletLinkEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getEJBLink() { - return ejbLinkEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getEJBLink_EjbLink() { - return (EAttribute)ejbLinkEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getHandler() { - return handlerEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getHandler_HandlerName() { - return (EAttribute)handlerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getHandler_HandlerClass() { - return (EAttribute)handlerEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getHandler_InitParams() { - return (EReference)handlerEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getHandler_SoapHeaders() { - return (EReference)handlerEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getHandler_SoapRoles() { - return (EReference)handlerEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getBeanLink() { - return beanLinkEClass; - } - - /** - * - * - * @generated - */ - public WsddFactory getWsddFactory() { - return (WsddFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - webServicesEClass = createEClass(WEB_SERVICES); - createEReference(webServicesEClass, WEB_SERVICES__WEB_SERVICE_DESCRIPTIONS); - - webServiceDescriptionEClass = createEClass(WEB_SERVICE_DESCRIPTION); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__JAXRPC_MAPPING_FILE); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__WEB_SERVICE_DESCRIPTION_NAME); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__WSDL_FILE); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__SMALL_ICON); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__LARGE_ICON); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DESCRIPTION); - createEAttribute(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DISPLAY_NAME); - createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__PORT_COMPONENTS); - createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DESCRIPTION_TYPE); - createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__DISPLAY_NAME_TYPE); - createEReference(webServiceDescriptionEClass, WEB_SERVICE_DESCRIPTION__ICON_TYPE); - - portComponentEClass = createEClass(PORT_COMPONENT); - createEAttribute(portComponentEClass, PORT_COMPONENT__PORT_COMPONENT_NAME); - createEAttribute(portComponentEClass, PORT_COMPONENT__SERVICE_ENDPOINT_INTERFACE); - createEAttribute(portComponentEClass, PORT_COMPONENT__SMALL_ICON); - createEAttribute(portComponentEClass, PORT_COMPONENT__LARGE_ICON); - createEAttribute(portComponentEClass, PORT_COMPONENT__DESCRIPTION); - createEAttribute(portComponentEClass, PORT_COMPONENT__DISPLAY_NAME); - createEReference(portComponentEClass, PORT_COMPONENT__WSDL_PORT); - createEReference(portComponentEClass, PORT_COMPONENT__SERVICE_IMPL_BEAN); - createEReference(portComponentEClass, PORT_COMPONENT__HANDLERS); - createEReference(portComponentEClass, PORT_COMPONENT__DESCRIPTION_TYPE); - createEReference(portComponentEClass, PORT_COMPONENT__DISPLAY_NAME_TYPE); - createEReference(portComponentEClass, PORT_COMPONENT__ICON_TYPE); - - wsdlPortEClass = createEClass(WSDL_PORT); - - serviceImplBeanEClass = createEClass(SERVICE_IMPL_BEAN); - createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__EEJB_LINK); - createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__ESERVLET_LINK); - createEReference(serviceImplBeanEClass, SERVICE_IMPL_BEAN__BEAN_LINK); - - servletLinkEClass = createEClass(SERVLET_LINK); - createEAttribute(servletLinkEClass, SERVLET_LINK__SERVLET_LINK); - - ejbLinkEClass = createEClass(EJB_LINK); - createEAttribute(ejbLinkEClass, EJB_LINK__EJB_LINK); - - handlerEClass = createEClass(HANDLER); - createEAttribute(handlerEClass, HANDLER__HANDLER_NAME); - createEAttribute(handlerEClass, HANDLER__HANDLER_CLASS); - createEReference(handlerEClass, HANDLER__INIT_PARAMS); - createEReference(handlerEClass, HANDLER__SOAP_HEADERS); - createEReference(handlerEClass, HANDLER__SOAP_ROLES); - - beanLinkEClass = createEClass(BEAN_LINK); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CommonPackageImpl theCommonPackage = (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); - WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI); - - // Add supertypes to classes - webServicesEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - wsdlPortEClass.getESuperTypes().add(theCommonPackage.getQName()); - servletLinkEClass.getESuperTypes().add(this.getBeanLink()); - ejbLinkEClass.getESuperTypes().add(this.getBeanLink()); - handlerEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup()); - - // Initialize classes and features; add operations and parameters - initEClass(webServicesEClass, WebServices.class, "WebServices", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getWebServices_WebServiceDescriptions(), this.getWebServiceDescription(), null, "webServiceDescriptions", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(webServiceDescriptionEClass, WebServiceDescription.class, "WebServiceDescription", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_JaxrpcMappingFile(), ecorePackage.getEString(), "jaxrpcMappingFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_WebServiceDescriptionName(), ecorePackage.getEString(), "webServiceDescriptionName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_WsdlFile(), ecorePackage.getEString(), "wsdlFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getWebServiceDescription_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebServiceDescription_PortComponents(), this.getPortComponent(), null, "portComponents", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebServiceDescription_DescriptionType(), theWscommonPackage.getDescriptionType(), null, "descriptionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebServiceDescription_DisplayNameType(), theWscommonPackage.getDisplayNameType(), null, "displayNameType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getWebServiceDescription_IconType(), theCommonPackage.getIconType(), null, "iconType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(portComponentEClass, PortComponent.class, "PortComponent", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getPortComponent_PortComponentName(), ecorePackage.getEString(), "portComponentName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getPortComponent_ServiceEndpointInterface(), ecorePackage.getEString(), "serviceEndpointInterface", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getPortComponent_SmallIcon(), ecorePackage.getEString(), "smallIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getPortComponent_LargeIcon(), ecorePackage.getEString(), "largeIcon", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getPortComponent_Description(), ecorePackage.getEString(), "description", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getPortComponent_DisplayName(), ecorePackage.getEString(), "displayName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_WsdlPort(), this.getWSDLPort(), null, "wsdlPort", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_ServiceImplBean(), this.getServiceImplBean(), null, "serviceImplBean", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_Handlers(), this.getHandler(), null, "handlers", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_DescriptionType(), theWscommonPackage.getDescriptionType(), null, "descriptionType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_DisplayNameType(), theWscommonPackage.getDisplayNameType(), null, "displayNameType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getPortComponent_IconType(), theCommonPackage.getIconType(), null, "iconType", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(wsdlPortEClass, WSDLPort.class, "WSDLPort", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - initEClass(serviceImplBeanEClass, ServiceImplBean.class, "ServiceImplBean", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEReference(getServiceImplBean_EEJBLink(), this.getEJBLink(), null, "eEJBLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServiceImplBean_EServletLink(), this.getServletLink(), null, "eServletLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getServiceImplBean_BeanLink(), this.getBeanLink(), null, "beanLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(servletLinkEClass, ServletLink.class, "ServletLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getServletLink_ServletLink(), ecorePackage.getEString(), "servletLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(ejbLinkEClass, EJBLink.class, "EJBLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getEJBLink_EjbLink(), ecorePackage.getEString(), "ejbLink", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(handlerEClass, Handler.class, "Handler", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - initEAttribute(getHandler_HandlerName(), ecorePackage.getEString(), "handlerName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEAttribute(getHandler_HandlerClass(), ecorePackage.getEString(), "handlerClass", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_InitParams(), theWscommonPackage.getInitParam(), null, "initParams", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_SoapHeaders(), theWscommonPackage.getSOAPHeader(), null, "soapHeaders", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - initEReference(getHandler_SoapRoles(), theWscommonPackage.getSOAPRole(), null, "soapRoles", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED);//$NON-NLS-1$ - - initEClass(beanLinkEClass, BeanLink.class, "BeanLink", !IS_ABSTRACT, !IS_INTERFACE);//$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } -} //WsddPackageImpl diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddResourceImpl.java deleted file mode 100644 index d5e623f40..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/impl/WsddResourceImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.impl; - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.model.translator.webservices.WsddTranslator; -import org.eclipse.jst.j2ee.webservice.WebServiceConstants; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddResource; -import org.eclipse.wst.common.internal.emf.resource.Renderer; -import org.eclipse.wst.common.internal.emf.resource.Translator; - -public class WsddResourceImpl extends XMLResourceImpl implements WsddResource -{ - /** - * Constructor for WsddResourceImpl. - */ - public WsddResourceImpl(URI uri, Renderer aRenderer) { - super(uri, aRenderer); - } - - /** - * Constructor for WsddResourceImpl. - * @param uri - */ - public WsddResourceImpl(Renderer aRenderer) { - super(aRenderer); - } - - /** - * Return the first element in the EList. - */ - public WebServices getWebServices() { - return (WebServices) getRootObject(); - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator() - */ - public Translator getRootTranslator() { - return WsddTranslator.INSTANCE; - } - - /** - * @see org.eclipse.jst.j2ee.internal.common.XMLResource#getType() - */ - public int getType() { - return WEB_SERVICE_TYPE; - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype() - */ - public String getDoctype() - { - switch (getJ2EEVersionID()) - { - case (J2EE_1_2_ID) : - case (J2EE_1_3_ID) : - return WebServiceConstants.WEBSERVICE_DOCTYPE; - default : - return null; - } - - - } - - public boolean isWebService1_0() - { - return (getModuleVersionID()==WebServiceConstants.WEBSERVICE_1_0_ID); - } - - public boolean isWebService1_1() - { - return (getModuleVersionID()==WebServiceConstants.WEBSERVICE_1_1_ID); - } - - /* - * This directly sets the module version id - */ - public void setModuleVersionID(int id) { - super.setVersionID(id); - switch (id) { - case (WebServiceConstants.WEBSERVICE_1_1_ID) : - super.setDoctypeValues(null, null); - break; - case (WebServiceConstants.WEBSERVICE_1_0_ID) : - super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - break; - } - } - /* - * Based on the J2EE version, this will set the module version - */ - public void setJ2EEVersionID(int id) - { - switch (id) { - case (J2EE_1_4_ID) : - primSetDoctypeValues(null, null); - primSetVersionID(WebServiceConstants.WEBSERVICE_1_1_ID); - break; - case (J2EE_1_3_ID) : - primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID()); - primSetVersionID(WebServiceConstants.WEBSERVICE_1_0_ID); - break; - case (J2EE_1_2_ID) : - primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID()); - primSetVersionID(WebServiceConstants.WEBSERVICE_1_0_ID); - } - - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID() - */ - public String getJ2EE_1_2_PublicID() { - return WebServiceConstants.WEBSERVICE_PUBLICID; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID() - */ - public String getJ2EE_1_2_SystemID() { - return WebServiceConstants.WEBSERVICE_SYSTEMID; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID() - */ - public String getJ2EE_1_3_PublicID() { - return WebServiceConstants.WEBSERVICE_PUBLICID; - } - - /* (non-Javadoc) - * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID() - */ - public String getJ2EE_1_3_SystemID() { - return WebServiceConstants.WEBSERVICE_SYSTEMID; - } - - /* Return J2EE version based on module version - */ - public int getJ2EEVersionID() { - switch (getModuleVersionID()) { - case WebServiceConstants.WEBSERVICE_1_0_ID: - return J2EEVersionConstants.J2EE_1_3_ID; - case WebServiceConstants.WEBSERVICE_1_1_ID : - return J2EEVersionConstants.J2EE_1_4_ID; - default : - return J2EEVersionConstants.J2EE_1_4_ID; - } - } - - /* (non-Javadoc) - * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID() - */ - protected int getDefaultVersionID() { - return WebServiceConstants.WEBSERVICE_1_1_ID; - } - - - protected void syncVersionOfRootObject() - { - //Do nothing for now since the root object does not have a version. - } - - - -} - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddAdapterFactory.java deleted file mode 100644 index bc6227592..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddAdapterFactory.java +++ /dev/null @@ -1,323 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage - * @generated - */ -public class WsddAdapterFactory extends AdapterFactoryImpl -{ - - /** - * The cached model package. - * - * - * @generated - */ - protected static WsddPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public WsddAdapterFactory() { - if (modelPackage == null) { - modelPackage = WsddPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * - * @generated - */ - protected WsddSwitch modelSwitch = - new WsddSwitch() { - public Object caseWebServices(WebServices object) { - return createWebServicesAdapter(); - } - public Object caseWebServiceDescription(WebServiceDescription object) { - return createWebServiceDescriptionAdapter(); - } - public Object casePortComponent(PortComponent object) { - return createPortComponentAdapter(); - } - public Object caseWSDLPort(WSDLPort object) { - return createWSDLPortAdapter(); - } - public Object caseServiceImplBean(ServiceImplBean object) { - return createServiceImplBeanAdapter(); - } - public Object caseServletLink(ServletLink object) { - return createServletLinkAdapter(); - } - public Object caseEJBLink(EJBLink object) { - return createEJBLinkAdapter(); - } - public Object caseHandler(Handler object) { - return createHandlerAdapter(); - } - public Object caseBeanLink(BeanLink object) { - return createBeanLinkAdapter(); - } - public Object caseDescriptionGroup(DescriptionGroup object) { - return createDescriptionGroupAdapter(); - } - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return createCompatibilityDescriptionGroupAdapter(); - } - public Object caseQName(QName object) { - return createQNameAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServices Web Services}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServices - * @generated - */ - public Adapter createWebServicesAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServiceDescription Web Service Description}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WebServiceDescription - * @generated - */ - public Adapter createWebServiceDescriptionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.PortComponent Port Component}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.PortComponent - * @generated - */ - public Adapter createPortComponentAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.WSDLPort WSDL Port}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WSDLPort - * @generated - */ - public Adapter createWSDLPortAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.ServiceImplBean Service Impl Bean}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.ServiceImplBean - * @generated - */ - public Adapter createServiceImplBeanAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.ServletLink Servlet Link}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.ServletLink - * @generated - */ - public Adapter createServletLinkAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.EJBLink EJB Link}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.EJBLink - * @generated - */ - public Adapter createEJBLinkAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.Handler Handler}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.Handler - * @generated - */ - public Adapter createHandlerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.webservice.wsdd.BeanLink Bean Link}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.BeanLink - * @generated - */ - public Adapter createBeanLinkAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.DescriptionGroup Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.DescriptionGroup - * @generated - */ - public Adapter createDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup Compatibility Description Group}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.CompatibilityDescriptionGroup - * @generated - */ - public Adapter createCompatibilityDescriptionGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.internal.common.QName QName}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.jst.j2ee.internal.common.QName - * @generated - */ - public Adapter createQNameAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //WsddAdapterFactory diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddSwitch.java deleted file mode 100644 index e8d021f82..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/webservice/wsdd/util/WsddSwitch.java +++ /dev/null @@ -1,338 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.webservice.wsdd.util; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup; -import org.eclipse.jst.j2ee.common.DescriptionGroup; -import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink; -import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink; -import org.eclipse.jst.j2ee.webservice.wsdd.Handler; -import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; -import org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean; -import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink; -import org.eclipse.jst.j2ee.webservice.wsdd.WSDLPort; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServiceDescription; -import org.eclipse.jst.j2ee.webservice.wsdd.WebServices; -import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; - - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.jst.j2ee.internal.webservice.wsdd.WsddPackage - * @generated - */ -public class WsddSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static WsddPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public WsddSwitch() { - if (modelPackage == null) { - modelPackage = WsddPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case WsddPackage.WEB_SERVICES: { - WebServices webServices = (WebServices)theEObject; - Object result = caseWebServices(webServices); - if (result == null) result = caseCompatibilityDescriptionGroup(webServices); - if (result == null) result = caseDescriptionGroup(webServices); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.WEB_SERVICE_DESCRIPTION: { - WebServiceDescription webServiceDescription = (WebServiceDescription)theEObject; - Object result = caseWebServiceDescription(webServiceDescription); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.PORT_COMPONENT: { - PortComponent portComponent = (PortComponent)theEObject; - Object result = casePortComponent(portComponent); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.WSDL_PORT: { - WSDLPort wsdlPort = (WSDLPort)theEObject; - Object result = caseWSDLPort(wsdlPort); - if (result == null) result = caseQName(wsdlPort); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.SERVICE_IMPL_BEAN: { - ServiceImplBean serviceImplBean = (ServiceImplBean)theEObject; - Object result = caseServiceImplBean(serviceImplBean); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.SERVLET_LINK: { - ServletLink servletLink = (ServletLink)theEObject; - Object result = caseServletLink(servletLink); - if (result == null) result = caseBeanLink(servletLink); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.EJB_LINK: { - EJBLink ejbLink = (EJBLink)theEObject; - Object result = caseEJBLink(ejbLink); - if (result == null) result = caseBeanLink(ejbLink); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.HANDLER: { - Handler handler = (Handler)theEObject; - Object result = caseHandler(handler); - if (result == null) result = caseCompatibilityDescriptionGroup(handler); - if (result == null) result = caseDescriptionGroup(handler); - if (result == null) result = defaultCase(theEObject); - return result; - } - case WsddPackage.BEAN_LINK: { - BeanLink beanLink = (BeanLink)theEObject; - Object result = caseBeanLink(beanLink); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Services'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Services'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebServices(WebServices object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Service Description'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Service Description'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebServiceDescription(WebServiceDescription object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Port Component'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Port Component'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object casePortComponent(PortComponent object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'WSDL Port'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'WSDL Port'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWSDLPort(WSDLPort object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Service Impl Bean'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Service Impl Bean'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServiceImplBean(ServiceImplBean object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Servlet Link'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Servlet Link'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseServletLink(ServletLink object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EJB Link'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EJB Link'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEJBLink(EJBLink object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Handler'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Handler'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseHandler(Handler object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Bean Link'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Bean Link'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseBeanLink(BeanLink object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDescriptionGroup(DescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Compatibility Description Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Compatibility Description Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'QName'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'QName'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQName(QName object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //WsddSwitch diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapPackageImpl.java index 94c2e2901..10a192cbd 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapPackageImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapPackageImpl.java @@ -16,7 +16,9 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.impl.WscommonPackageImpl; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.impl.WsddPackageImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.ClassType; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.ConstructorParameterOrder; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.ElementName; @@ -54,9 +56,7 @@ import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLReturnValueMapping; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLServiceName; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.XMLElementName; import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage; -import org.eclipse.jst.j2ee.webservice.wscommon.impl.WscommonPackageImpl; import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage; -import org.eclipse.jst.j2ee.webservice.wsdd.impl.WsddPackageImpl; /** diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapResourceImpl.java index bf0555c51..bc3f53ee1 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapResourceImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/JaxrpcmapResourceImpl.java @@ -12,8 +12,8 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.common.util.URI; -import org.eclipse.jst.j2ee.common.impl.XMLResourceImpl; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl; import org.eclipse.jst.j2ee.internal.model.translator.webservices.JaxrpcmapTranslator; import org.eclipse.jst.j2ee.webservice.WebServiceConstants; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JavaWSDLMapping; diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/RootTypeQnameImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/RootTypeQnameImpl.java index 5731dcce1..c60a76f8e 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/RootTypeQnameImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/RootTypeQnameImpl.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.RootTypeQname; diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLBindingImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLBindingImpl.java index 1a119481b..9548e7c58 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLBindingImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLBindingImpl.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLBinding; diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLMessageImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLMessageImpl.java index c4f1a07f7..a923d0de3 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLMessageImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLMessageImpl.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLMessage; diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLPortTypeImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLPortTypeImpl.java index 3f144d3d8..126c2056e 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLPortTypeImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLPortTypeImpl.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLPortType; diff --git a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLServiceNameImpl.java b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLServiceNameImpl.java index 393975daf..76b940aa4 100644 --- a/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLServiceNameImpl.java +++ b/plugins/org.eclipse.jst.j2ee.core/webservices/org/eclipse/jst/j2ee/webservice/jaxrpcmap/impl/WSDLServiceNameImpl.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.webservice.jaxrpcmap.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jst.j2ee.common.impl.QNameImpl; +import org.eclipse.jst.j2ee.internal.common.impl.QNameImpl; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.WSDLServiceName; diff --git a/plugins/org.eclipse.jst.j2ee.jca.ui/plugin.xml b/plugins/org.eclipse.jst.j2ee.jca.ui/plugin.xml index fe6c88b8c..7dd9f303d 100644 --- a/plugins/org.eclipse.jst.j2ee.jca.ui/plugin.xml +++ b/plugins/org.eclipse.jst.j2ee.jca.ui/plugin.xml @@ -161,13 +161,13 @@ + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -203,19 +203,19 @@ + name="org.eclipse.jst.j2ee.internal.jca.impl.ConnectorImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> + name="org.eclipse.jst.j2ee.internal.jca.impl.ResourceAdapterImpl"> @@ -245,10 +245,10 @@ + name="org.eclipse.jst.j2ee.internal.jca.impl.ConnectorImpl"> + name="org.eclipse.jst.j2ee.internal.jca.impl.ResourceAdapterImpl"> @@ -260,10 +260,10 @@ + name="org.eclipse.jst.j2ee.internal.jca.impl.ConnectorImpl"> + name="org.eclipse.jst.j2ee.internal.jca.impl.ResourceAdapterImpl"> diff --git a/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaEditPlugin.java b/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaEditPlugin.java index 6c86a35c5..1dc4aa2f1 100644 --- a/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaEditPlugin.java +++ b/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaEditPlugin.java @@ -19,9 +19,9 @@ import java.text.MessageFormat; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.Plugin; +import org.eclipse.jst.j2ee.internal.jca.impl.JcaFactoryImpl; import org.eclipse.jst.j2ee.jca.JcaFactory; import org.eclipse.jst.j2ee.jca.JcaPackage; -import org.eclipse.jst.j2ee.jca.impl.JcaFactoryImpl; /** diff --git a/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaItemProviderAdapterFactory.java index 3c66fe13b..b014c3eb9 100644 --- a/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.jca/jcaedit/org/eclipse/jst/j2ee/internal/jca/providers/JcaItemProviderAdapterFactory.java @@ -30,7 +30,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.jca.util.JcaAdapterFactory; +import org.eclipse.jst.j2ee.internal.jca.util.JcaAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java index f667c7247..0733b000e 100644 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java @@ -17,7 +17,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.jst.j2ee.common.util.CommonUtil; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; import org.eclipse.swt.graphics.Image; import org.eclipse.wst.common.internal.emfworkbench.integration.DynamicAdapterFactory; import org.eclipse.wst.common.navigator.views.ICommonLabelProvider; diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java index c158985a1..47cce5697 100644 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java +++ b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java @@ -12,8 +12,8 @@ package org.eclipse.jst.j2ee.navigator.internal; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; -import org.eclipse.jst.j2ee.common.util.CommonUtil; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; public class J2EEViewerSorter extends ViewerSorter { diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java index eb20bd987..fa2242bae 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java @@ -34,7 +34,7 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.window.Window; import org.eclipse.jst.j2ee.application.Application; import org.eclipse.jst.j2ee.applicationclient.creation.ApplicationClientNatureRuntime; -import org.eclipse.jst.j2ee.common.util.CommonUtil; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; import org.eclipse.jst.j2ee.internal.delete.DeleteModuleOperation; import org.eclipse.jst.j2ee.internal.delete.DeleteOptions; import org.eclipse.jst.j2ee.internal.dialogs.DeleteEARDialog; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java index 7f9198ce0..3809cb3cc 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java @@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.window.Window; import org.eclipse.jst.j2ee.application.Application; import org.eclipse.jst.j2ee.applicationclient.creation.ApplicationClientNatureRuntime; -import org.eclipse.jst.j2ee.common.util.CommonUtil; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameDialog; import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants; import org.eclipse.jst.j2ee.internal.dialogs.RenameModuleDialog; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java index 762b9477e..85c97e5f5 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java @@ -17,7 +17,7 @@ import org.eclipse.emf.common.command.StrictCompoundCommand; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.edit.command.AddCommand; import org.eclipse.emf.edit.command.PasteFromClipboardCommand; -import org.eclipse.jst.j2ee.common.util.IDUtility; +import org.eclipse.jst.j2ee.internal.common.util.IDUtility; import org.eclipse.jst.j2ee.internal.provider.J2EEUIEditingDomain; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java index 0588dc288..c95056b67 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java @@ -27,7 +27,7 @@ import org.eclipse.jst.j2ee.ejb.CMPAttribute; import org.eclipse.jst.j2ee.ejb.EjbMethodElementComparator; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.MethodElement; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import org.eclipse.swt.widgets.TreeItem; import org.eclipse.wst.common.frameworks.internal.ui.DisplayUtility; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java index eff5c569f..7f0d86917 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java @@ -22,7 +22,7 @@ import org.eclipse.jst.j2ee.ejb.CMPAttribute; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.ExcludeList; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; public class ExcludeListContentProvider extends AbstractMethodsContentProvider { diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java index 9c79b624e..042a4332e 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java @@ -20,7 +20,7 @@ import org.eclipse.jst.j2ee.ejb.CMPAttribute; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; public class MethodPermissionsContentProvider extends AbstractMethodsContentProvider { diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java index 90f2a7a6a..37510ae23 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java @@ -19,7 +19,7 @@ import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; public class MethodTransactionContentProvider extends AbstractMethodsContentProvider { diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java index 4c17d25bf..7e507cc5a 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java @@ -12,8 +12,8 @@ package org.eclipse.jst.j2ee.internal.plugin; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; -import org.eclipse.jst.j2ee.common.util.CommonUtil; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; public class J2EEViewerSorter extends ViewerSorter { diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java index a5fc42c3d..bb9a51f72 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java @@ -17,8 +17,8 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; import org.eclipse.jst.j2ee.common.CommonPackage; -import org.eclipse.jst.j2ee.common.util.CommonUtil; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import org.eclipse.jst.j2ee.internal.ejb.provider.AbstractMethodsContentProvider; import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper; import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java index 61203d1f3..9df5e6094 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java @@ -24,7 +24,7 @@ import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.jst.j2ee.application.Application; import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationFactoryImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationFactoryImpl; import org.eclipse.jst.j2ee.internal.application.provider.ApplicationItemProvider; import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel; import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime; diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java index 4fae98d60..3682b6962 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java @@ -16,7 +16,7 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jst.j2ee.ejb.ExcludeList; import org.eclipse.jst.j2ee.ejb.MethodPermission; import org.eclipse.jst.j2ee.ejb.MethodTransaction; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import org.eclipse.jst.j2ee.internal.ejb.provider.AbstractMethodsContentProvider; import org.eclipse.jst.j2ee.internal.ejb.provider.ExcludeListContentProvider; import org.eclipse.jst.j2ee.internal.ejb.provider.MethodPermissionsContentProvider; diff --git a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml b/plugins/org.eclipse.jst.j2ee.ui/plugin.xml index 405c3a22c..08b57e379 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml +++ b/plugins/org.eclipse.jst.j2ee.ui/plugin.xml @@ -714,13 +714,13 @@ + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -776,16 +776,16 @@ + name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -808,13 +808,13 @@ + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -842,13 +842,13 @@ + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -876,7 +876,7 @@ + name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl"> @@ -911,7 +911,7 @@ + name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl"> diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveFilterOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveFilterOperation.java index 544f1b995..68c411fbe 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveFilterOperation.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveFilterOperation.java @@ -24,11 +24,11 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jem.java.JavaClass; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationFactoryImpl; import org.eclipse.jst.j2ee.webapplication.Filter; import org.eclipse.jst.j2ee.webapplication.FilterMapping; import org.eclipse.jst.j2ee.webapplication.WebApp; import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationFactoryImpl; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveServletOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveServletOperation.java index 71aac7410..86d7a775c 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveServletOperation.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/RemoveServletOperation.java @@ -25,12 +25,12 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jem.java.JavaClass; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebapplicationFactoryImpl; import org.eclipse.jst.j2ee.webapplication.FilterMapping; import org.eclipse.jst.j2ee.webapplication.Servlet; import org.eclipse.jst.j2ee.webapplication.ServletMapping; import org.eclipse.jst.j2ee.webapplication.WebApp; import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; -import org.eclipse.jst.j2ee.webapplication.impl.WebapplicationFactoryImpl; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java index d37e908cc..d92f27820 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java @@ -39,8 +39,8 @@ import org.eclipse.jst.j2ee.internal.plugin.J2EEPluginResourceHandler; import org.eclipse.jst.j2ee.internal.web.operations.WebContentResourceChangeListener; import org.eclipse.jst.j2ee.internal.web.taglib.TaglibRegistryManager; import org.eclipse.jst.j2ee.internal.web.util.WebEditAdapterFactory; +import org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppResourceFactory; import org.eclipse.jst.j2ee.web.taglib.ITaglibRegistryManager; -import org.eclipse.jst.j2ee.webapplication.impl.WebAppResourceFactory; import org.eclipse.wst.common.frameworks.internal.WTPPlugin; import org.eclipse.wst.common.modulecore.ArtifactEditModel; import org.eclipse.wst.common.modulecore.internal.builder.DeployableModuleBuilderFactoryRegistry; diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java index e5fbb40a4..a32048f30 100644 --- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java @@ -26,7 +26,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.jsp.util.JspAdapterFactory; +import org.eclipse.jst.j2ee.internal.jsp.util.JspAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java index e4c23f9ce..eac67b72e 100644 --- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java @@ -30,7 +30,7 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.jst.j2ee.common.internal.provider.ListenerItemProvider; -import org.eclipse.jst.j2ee.webapplication.util.WebapplicationAdapterFactory; +import org.eclipse.jst.j2ee.internal.webapplication.util.WebapplicationAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/adapter/AdapterQNameElement.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/adapter/AdapterQNameElement.java index d30ea7ac2..21e672e3d 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/adapter/AdapterQNameElement.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/adapter/AdapterQNameElement.java @@ -25,7 +25,7 @@ import org.eclipse.jst.j2ee.common.QName; import org.eclipse.jst.j2ee.internal.webservice.command.CommandAddElement; import org.eclipse.jst.j2ee.internal.webservice.command.CommandRemoveElement; import org.eclipse.jst.j2ee.internal.webservice.editmodel.EditModel; -import org.eclipse.jst.j2ee.webservice.util.QNameHelper; +import org.eclipse.jst.j2ee.internal.webservice.util.QNameHelper; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/command/CommandModifyNSURI.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/command/CommandModifyNSURI.java index 566374fa5..b83c7095f 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/command/CommandModifyNSURI.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/command/CommandModifyNSURI.java @@ -16,7 +16,7 @@ import org.eclipse.emf.common.command.Command; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.QName; -import org.eclipse.jst.j2ee.webservice.util.QNameHelper; +import org.eclipse.jst.j2ee.internal.webservice.util.QNameHelper; public class CommandModifyNSURI extends AbstractCommand { private QName eObject_; diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/constants/ATKUIConstants.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/constants/ATKUIConstants.java index d656c2a04..b370fb250 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/constants/ATKUIConstants.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/constants/ATKUIConstants.java @@ -12,7 +12,7 @@ package org.eclipse.jst.j2ee.internal.webservice.constants; import org.eclipse.jem.java.JavaClass; import org.eclipse.jem.java.JavaRefFactory; import org.eclipse.jst.j2ee.internal.webservice.plugin.WebServicePlugin; -import org.eclipse.jst.j2ee.webservice.util.QNameHelper; +import org.eclipse.jst.j2ee.internal.webservice.util.QNameHelper; import org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef; import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory; import org.eclipse.jst.j2ee.webservice.wsdd.PortComponent; diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/editmodel/AbstractEditModelOwner.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/editmodel/AbstractEditModelOwner.java index 1049d981d..b350e24ac 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/editmodel/AbstractEditModelOwner.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/editmodel/AbstractEditModelOwner.java @@ -18,7 +18,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext; import com.ibm.wtp.emf.workbench.EMFWorkbenchContextBase; diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/Webservice_clientItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/Webservice_clientItemProviderAdapterFactory.java index 7b56f77f1..dbcf3902a 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/Webservice_clientItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/Webservice_clientItemProviderAdapterFactory.java @@ -26,7 +26,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.webservice.wsclient.util.Webservice_clientAdapterFactory; +import org.eclipse.jst.j2ee.webservice.internal.wsclient.util.Webservice_clientAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WscommonItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WscommonItemProviderAdapterFactory.java index ef50ec6e9..1bfece180 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WscommonItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WscommonItemProviderAdapterFactory.java @@ -27,7 +27,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.webservice.wscommon.util.WscommonAdapterFactory; +import org.eclipse.jst.j2ee.webservice.internal.wscommon.util.WscommonAdapterFactory; diff --git a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WsddItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WsddItemProviderAdapterFactory.java index 44f975861..a5f50a20a 100644 --- a/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WsddItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/provider/WsddItemProviderAdapterFactory.java @@ -27,7 +27,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.jst.j2ee.internal.wsdd.provider.HandlerItemProvider; -import org.eclipse.jst.j2ee.webservice.wsdd.util.WsddAdapterFactory; +import org.eclipse.jst.j2ee.webservice.internal.wsdd.util.WsddAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java index a612b4229..e824196b8 100644 --- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java @@ -30,7 +30,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.application.util.ApplicationAdapterFactory; +import org.eclipse.jst.j2ee.internal.application.util.ApplicationAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java index 3aa5487a4..6d049077c 100644 --- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java @@ -31,7 +31,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.client.util.ClientAdapterFactory; +import org.eclipse.jst.j2ee.internal.client.util.ClientAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARProjectLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARProjectLoadStrategyImpl.java index 92f8e0973..ad1495d16 100644 --- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARProjectLoadStrategyImpl.java +++ b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARProjectLoadStrategyImpl.java @@ -25,7 +25,6 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource.Factory.Registry; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage; import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile; @@ -35,6 +34,7 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureExce import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveOptions; import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategy; import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel; import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime; import org.eclipse.jst.j2ee.internal.earcreation.modulemap.UtilityJARMapping; diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java index 29764a467..787cc22e3 100644 --- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java +++ b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java @@ -30,12 +30,12 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.URIConverter; import org.eclipse.emf.ecore.resource.Resource.Factory.Registry; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.File; import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ArchiveRuntimeException; import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException; import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper; import com.ibm.wtp.emf.workbench.ProjectUtilities; diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CMPJavaChangeSynchronizationAdapter.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CMPJavaChangeSynchronizationAdapter.java index 05613323d..365deece4 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CMPJavaChangeSynchronizationAdapter.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CMPJavaChangeSynchronizationAdapter.java @@ -33,7 +33,7 @@ import org.eclipse.jst.j2ee.ejb.CMPAttribute; import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.EjbPackage; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import com.ibm.wtp.emf.workbench.ProjectUtilities; import com.ibm.wtp.emf.workbench.nature.EMFNature; diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/J2EEModifierHelperCreator.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/J2EEModifierHelperCreator.java index 957c8cc09..4ba500817 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/J2EEModifierHelperCreator.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/J2EEModifierHelperCreator.java @@ -23,7 +23,7 @@ import org.eclipse.jst.j2ee.ejb.EjbPackage; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.MethodElement; import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import org.eclipse.wst.common.emf.utilities.EtoolsCopyUtility; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/RemoveSecurityRoleOperation.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/RemoveSecurityRoleOperation.java index 4720c64a7..58a86671e 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/RemoveSecurityRoleOperation.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/RemoveSecurityRoleOperation.java @@ -27,7 +27,7 @@ import org.eclipse.jst.j2ee.common.SecurityRole; import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.ejb.MethodPermission; -import org.eclipse.jst.j2ee.ejb.impl.EjbFactoryImpl; +import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapterFactory.java index 4b9eed932..9636208b3 100644 --- a/plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapterFactory.java @@ -31,7 +31,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITableItemLabelProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.j2ee.common.util.CommonAdapterFactory; +import org.eclipse.jst.j2ee.internal.common.util.CommonAdapterFactory; /** diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/AddArchiveProjectToEAROperation.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/AddArchiveProjectToEAROperation.java index c390901ff..e67cf9d09 100644 --- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/AddArchiveProjectToEAROperation.java +++ b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/AddArchiveProjectToEAROperation.java @@ -35,7 +35,7 @@ import org.eclipse.emf.common.command.CompoundCommand; import org.eclipse.jst.j2ee.application.Application; import org.eclipse.jst.j2ee.application.ApplicationResource; import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.impl.ApplicationResourceImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationResourceImpl; import org.eclipse.jst.j2ee.internal.archive.operations.EJBArchiveOpsResourceHandler; import org.eclipse.jst.j2ee.internal.earcreation.AddModuleToEARProjectCommand; import org.eclipse.jst.j2ee.internal.earcreation.AddUtilityJARMapCommand; diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java index e1f8e42e3..e21f537aa 100644 --- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java +++ b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java @@ -18,8 +18,8 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.emf.ecore.impl.EcorePackageImpl; import org.eclipse.jem.java.impl.JavaRefPackageImpl; import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationPackageImpl; -import org.eclipse.jst.j2ee.common.impl.CommonPackageImpl; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationPackageImpl; +import org.eclipse.jst.j2ee.internal.common.impl.CommonPackageImpl; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEModuleWorkbenchURIConverterImpl.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEModuleWorkbenchURIConverterImpl.java index 241abf461..00be6f0c7 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEModuleWorkbenchURIConverterImpl.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEModuleWorkbenchURIConverterImpl.java @@ -34,14 +34,14 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.URIConverterImpl; import org.eclipse.jst.j2ee.applicationclient.creation.ApplicationClientNatureRuntime; -import org.eclipse.jst.j2ee.common.impl.J2EEResouceFactorySaxRegistry; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory; import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveTypeDiscriminator; import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.AppClient12ImportStrategyImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.EjbJar11ImportStrategyImpl; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResouceFactorySaxRegistry; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import com.ibm.wtp.emf.workbench.ProjectResourceSet; import com.ibm.wtp.emf.workbench.ProjectUtilities; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EENature.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EENature.java index 5721a047c..7ae25471a 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EENature.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EENature.java @@ -20,12 +20,12 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.jst.j2ee.applicationclient.creation.IApplicationClientNatureConstants; import org.eclipse.jst.j2ee.common.XMLResource; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants; import org.eclipse.jst.j2ee.internal.J2EEEditModel; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants; import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceCreationOperation.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceCreationOperation.java index a3d815bb0..d96e96a1d 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceCreationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceCreationOperation.java @@ -24,7 +24,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.emf.ecore.EObject; import org.eclipse.jst.j2ee.application.operations.AddUtilityProjectToEARDataModel; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.common.CommonFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.Description; @@ -34,6 +33,7 @@ import org.eclipse.jst.j2ee.common.EjbRefType; import org.eclipse.jst.j2ee.common.XMLResource; import org.eclipse.jst.j2ee.ejb.EJBJar; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.internal.common.operations.JARDependencyDataModel; import org.eclipse.jst.j2ee.internal.common.operations.JARDependencyOperation; import org.eclipse.jst.j2ee.internal.earcreation.AddUtilityJARMapCommand; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceDataModel.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceDataModel.java index 02619e578..8100def4d 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceDataModel.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/EJBReferenceDataModel.java @@ -12,11 +12,11 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IStatus; import org.eclipse.emf.ecore.EObject; import org.eclipse.jst.j2ee.application.Module; -import org.eclipse.jst.j2ee.application.impl.ApplicationImpl; import org.eclipse.jst.j2ee.applicationclient.creation.IApplicationClientNatureConstants; import org.eclipse.jst.j2ee.client.ApplicationClient; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl; import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime; import org.eclipse.jst.j2ee.internal.project.IEJBNatureConstants; import org.eclipse.jst.j2ee.internal.project.IWebNatureConstants; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/MessageDestReferenceCreationOperation.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/MessageDestReferenceCreationOperation.java index e1d8b738d..11f83c568 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/MessageDestReferenceCreationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/MessageDestReferenceCreationOperation.java @@ -16,7 +16,6 @@ package org.eclipse.jst.j2ee.internal.reference; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.common.CommonFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.Description; @@ -29,6 +28,7 @@ import org.eclipse.jst.j2ee.ejb.EjbFactory; import org.eclipse.jst.j2ee.ejb.EjbPackage; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.ejb.MessageDriven; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceEnvironmentReferenceCreationOperation.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceEnvironmentReferenceCreationOperation.java index 28c3c8858..72c2f6ae3 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceEnvironmentReferenceCreationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceEnvironmentReferenceCreationOperation.java @@ -10,13 +10,13 @@ package org.eclipse.jst.j2ee.internal.reference; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.common.CommonFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.Description; import org.eclipse.jst.j2ee.common.ResourceEnvRef; import org.eclipse.jst.j2ee.common.XMLResource; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceReferenceCreationOperation.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceReferenceCreationOperation.java index c48faf71b..7a8386062 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceReferenceCreationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ResourceReferenceCreationOperation.java @@ -10,7 +10,6 @@ package org.eclipse.jst.j2ee.internal.reference; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.common.CommonFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.Description; @@ -19,6 +18,7 @@ import org.eclipse.jst.j2ee.common.ResSharingScopeType; import org.eclipse.jst.j2ee.common.ResourceRef; import org.eclipse.jst.j2ee.common.XMLResource; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; import org.eclipse.wst.common.internal.emfworkbench.integration.ModifierHelper; import org.eclipse.wst.common.internal.emfworkbench.operation.ModelModifierOperation; diff --git a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ServiceReferenceCreationOperation.java b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ServiceReferenceCreationOperation.java index 1057de5a1..10b3e8252 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ServiceReferenceCreationOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/reference/ServiceReferenceCreationOperation.java @@ -13,7 +13,6 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.jem.java.JavaClass; import org.eclipse.jem.java.JavaRefFactory; import org.eclipse.jst.j2ee.client.ApplicationClient; -import org.eclipse.jst.j2ee.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.common.CommonFactory; import org.eclipse.jst.j2ee.common.CommonPackage; import org.eclipse.jst.j2ee.common.Description; @@ -22,6 +21,7 @@ import org.eclipse.jst.j2ee.common.XMLResource; import org.eclipse.jst.j2ee.ejb.EnterpriseBean; import org.eclipse.jst.j2ee.internal.J2EEEditModel; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; +import org.eclipse.jst.j2ee.internal.client.impl.ClientFactoryImpl; import org.eclipse.jst.j2ee.internal.webservices.WebServiceClientGenerator; import org.eclipse.jst.j2ee.internal.webservices.WebServicesClientDataRegistry; import org.eclipse.jst.j2ee.internal.webservices.WebServicesManager; diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java index 2a13ca1f4..6d297a868 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java @@ -46,9 +46,9 @@ import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.internal.core.JavaModel; import org.eclipse.jst.j2ee.application.ApplicationFactory; import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.application.impl.ApplicationFactoryImpl; -import org.eclipse.jst.j2ee.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveInit; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationFactoryImpl; +import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.internal.deployables.JavaDeployableModuleBuilderFactory; import org.eclipse.jst.j2ee.internal.modulecore.util.EarEditAdapterFactory; import org.eclipse.jst.j2ee.internal.validation.ResourceUtil; diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/EarHelper.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/EarHelper.java index 91a8bbe61..f83c62571 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/EarHelper.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/EarHelper.java @@ -14,9 +14,9 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.application.impl.ApplicationImpl; import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants; +import org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl; import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime; import org.eclipse.jst.j2ee.model.internal.validation.EarValidator; diff --git a/plugins/org.eclipse.jst.servlet.ui/plugin.xml b/plugins/org.eclipse.jst.servlet.ui/plugin.xml index 6821cc4d3..114db21d0 100644 --- a/plugins/org.eclipse.jst.servlet.ui/plugin.xml +++ b/plugins/org.eclipse.jst.servlet.ui/plugin.xml @@ -195,10 +195,10 @@ + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> @@ -237,19 +237,19 @@ + name="org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl"> + name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl"> @@ -277,7 +277,7 @@ + name="org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppImpl"> @@ -293,7 +293,7 @@ + name="org.eclipse.jst.j2ee.internal.webapplication.impl.WebAppImpl"> -- cgit v1.2.3