Author: richard.opalka(a)jboss.com
Date: 2009-08-05 06:10:36 -0400 (Wed, 05 Aug 2009)
New Revision: 10490
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
Log:
[JBWS-2332] ensuring code style
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -70,7 +70,7 @@
File location = null;
try
{
- location = (File) getMbeanServer().getAttribute(on, attributeName);
+ location = (File)getMbeanServer().getAttribute(on, attributeName);
}
catch (final JMException e)
{
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -35,19 +35,19 @@
*/
public final class WSAspectizedDeployersFactory
{
-
+
/** Real deployers registry. */
private final DeployersImpl delegee;
-
+
/** Our deployers regitry. */
- private final Map< DeploymentAspect, Deployer > deployersRegistry = new
HashMap< DeploymentAspect, Deployer >();
-
+ private final Map<DeploymentAspect, Deployer> deployersRegistry = new
HashMap<DeploymentAspect, Deployer>();
+
/**
* Constructor.
*
* @param realDeployers real deployers registry
*/
- public WSAspectizedDeployersFactory( final DeployersImpl realDeployers )
+ public WSAspectizedDeployersFactory(final DeployersImpl realDeployers)
{
this.delegee = realDeployers;
}
@@ -57,25 +57,25 @@
*
* @param aspect to create real WS aspectized deployer for
*/
- public void addDeployer( final DeploymentAspect aspect )
+ public void addDeployer(final DeploymentAspect aspect)
{
- final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer( aspect );
-
- this.delegee.addDeployer( wsAspectizedDeployer );
- this.deployersRegistry.put( aspect, wsAspectizedDeployer );
+ final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer(aspect);
+
+ this.delegee.addDeployer(wsAspectizedDeployer);
+ this.deployersRegistry.put(aspect, wsAspectizedDeployer);
}
-
+
/**
* MC uncallback method. It will be called each time DeploymentAspect bean will be
removed.
*
* @param aspect to remove real WS aspectized deployer for
*/
- public void removeDeployer( final DeploymentAspect aspect )
+ public void removeDeployer(final DeploymentAspect aspect)
{
- final Deployer wsAspectizedDeployer = this.deployersRegistry.get( aspect );
+ final Deployer wsAspectizedDeployer = this.deployersRegistry.get(aspect);
- this.deployersRegistry.remove( aspect );
- this.delegee.removeDeployer( wsAspectizedDeployer );
+ this.deployersRegistry.remove(aspect);
+ this.delegee.removeDeployer(wsAspectizedDeployer);
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -52,40 +52,40 @@
*
* @param aspect deployment aspect
*/
- public WSDeploymentAspectDeployer( final DeploymentAspect aspect )
+ public WSDeploymentAspectDeployer(final DeploymentAspect aspect)
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( Deployment.class );
- if ( aspect.isLast() )
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(Deployment.class);
+ if (aspect.isLast())
{
- this.addInput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
}
-
+
// propagate DA requirements and map them to deployer inputs
- final Set< String > inputs = aspect.getRequiresAsSet();
- for ( String input : inputs )
+ final Set<String> inputs = aspect.getRequiresAsSet();
+ for (String input : inputs)
{
- this.addInput( WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input );
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input);
}
-
+
// outputs
- this.addOutput( JBossWebMetaData.class );
- if ( !aspect.isLast() )
+ this.addOutput(JBossWebMetaData.class);
+ if (!aspect.isLast())
{
- this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
}
// propagate DA provides and map them to deployer outputs
- final Set< String > outputs = aspect.getProvidesAsSet();
- for ( String output : outputs )
+ final Set<String> outputs = aspect.getProvidesAsSet();
+ for (String output : outputs)
{
- this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output
);
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output);
}
- this.setRelativeOrder( aspect.getRelativeOrder() );
+ this.setRelativeOrder(aspect.getRelativeOrder());
this.aspect = aspect;
}
@@ -97,13 +97,13 @@
* @throws DeploymentException on deployment failure
*/
@Override
- public void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ public void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( ASHelper.isWebServiceDeployment( unit ) )
+ if (ASHelper.isWebServiceDeployment(unit))
{
- log.debug( this.aspect.getClass() + " deploy: " + unit.getName() );
- final Deployment dep = ASHelper.getRequiredAttachment( unit, Deployment.class
);
- this.aspect.start( dep );
+ log.debug(this.aspect.getClass() + " deploy: " + unit.getName());
+ final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+ this.aspect.start(dep);
}
}
@@ -114,16 +114,16 @@
* @param unit deployment unit
*/
@Override
- public void internalUndeploy( final DeploymentUnit unit )
+ public void internalUndeploy(final DeploymentUnit unit)
{
- if ( ASHelper.isWebServiceDeployment( unit ) )
+ if (ASHelper.isWebServiceDeployment(unit))
{
- log.debug( this.aspect.getClass() + " undeploy: " + unit.getName() );
- final Deployment dep = ASHelper.getRequiredAttachment( unit, Deployment.class
);
- this.aspect.stop( dep );
+ log.debug(this.aspect.getClass() + " undeploy: " + unit.getName());
+ final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+ this.aspect.stop(dep);
}
}
-
+
/**
* Displays also WS deployment aspect being wrapped.
*
@@ -133,7 +133,7 @@
public String toString()
{
final StringBuilder sb = new StringBuilder();
- sb.append( super.toString() ).append( '(' ).append( this.aspect ).append(
')' );
+
sb.append(super.toString()).append('(').append(this.aspect).append(')');
return sb.toString();
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -62,7 +62,7 @@
*/
public final class WSDeploymentDeployer extends AbstractRealDeployer
{
-
+
/** WSDL and XSD files filter. */
private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
/** Deployment model factory. */
@@ -74,18 +74,18 @@
public WSDeploymentDeployer()
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( DeploymentType.class );
-
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(DeploymentType.class);
+
// outputs
- this.addOutput( JBossWebMetaData.class );
- this.addOutput( Deployment.class );
+ this.addOutput(JBossWebMetaData.class);
+ this.addOutput(Deployment.class);
// deployment factory
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- this.deploymentModelFactory = spiProvider.getSPI( DeploymentModelFactory.class );
+ this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
}
/**
@@ -95,23 +95,23 @@
* @throws DeploymentException if error occurs
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( ASHelper.isJaxwsJseDeployment( unit ) )
+ if (ASHelper.isJaxwsJseDeployment(unit))
{
- this.newJaxwsJseDeployment( unit );
+ this.newJaxwsJseDeployment(unit);
}
- else if ( ASHelper.isJaxwsEjbDeployment( unit ) )
+ else if (ASHelper.isJaxwsEjbDeployment(unit))
{
- this.newJaxwsEjbDeployment( unit );
+ this.newJaxwsEjbDeployment(unit);
}
- else if ( ASHelper.isJaxrpcJseDeployment( unit ) )
+ else if (ASHelper.isJaxrpcJseDeployment(unit))
{
- this.newJaxrpcJseDeployment( unit );
+ this.newJaxrpcJseDeployment(unit);
}
- else if ( ASHelper.isJaxrpcEjbDeployment( unit ) )
+ else if (ASHelper.isJaxrpcEjbDeployment(unit))
{
- this.newJaxrpcEjbDeployment( unit );
+ this.newJaxrpcEjbDeployment(unit);
}
}
@@ -120,102 +120,102 @@
*
* @param unit deployment unit
*/
- private void newJaxrpcEjbDeployment( final DeploymentUnit unit )
+ private void newJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- final JBossMetaData jbmd = this.getAndPropagateAttachment( JBossMetaData.class,
unit, dep );
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(
WebservicesMetaData.class, unit, dep );
- this.getAndPropagateAttachment( WebServiceDeployment.class, unit, dep );
-
- for ( WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions() )
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class,
unit, dep);
+ final WebservicesMetaData wsMetaData =
this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
- for ( PortComponentMetaData pcmd : wsd.getPortComponents() )
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
final String ejbName = pcmd.getEjbLink();
- final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(
ejbName );
+ final JBossEnterpriseBeanMetaData beanMetaData =
jbmd.getEnterpriseBean(ejbName);
final String ejbClass = beanMetaData.getEjbClass();
- this.createEndpoint( ejbClass, ejbName, dep );
+ this.createEndpoint(ejbClass, ejbName, dep);
}
}
-
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXWS EJB3 deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxwsEjbDeployment( final DeploymentUnit unit )
+ private void newJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- this.getAndPropagateAttachment( WebServiceDeployment.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
- final Iterator< WebServiceDeclaration > ejbIterator = ASHelper.getJaxwsEjbs(
unit ).iterator();
- while ( ejbIterator.hasNext() )
+ final Iterator<WebServiceDeclaration> ejbIterator =
ASHelper.getJaxwsEjbs(unit).iterator();
+ while (ejbIterator.hasNext())
{
final WebServiceDeclaration container = ejbIterator.next();
final String ejbName = container.getComponentName();
final String ejbClass = container.getComponentClassName();
- final Endpoint ep = this.createEndpoint( ejbClass, ejbName, dep );
- ep.setProperty( InvocationHandlerEJB3.CONTAINER_NAME,
container.getContainerName() );
+ final Endpoint ep = this.createEndpoint(ejbClass, ejbName, dep);
+ ep.setProperty(InvocationHandlerEJB3.CONTAINER_NAME,
container.getContainerName());
}
-
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXRPC JSE deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxrpcJseDeployment( final DeploymentUnit unit )
+ private void newJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(
JBossWebMetaData.class, unit, dep );
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(
WebservicesMetaData.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ final JBossWebMetaData webMetaData =
this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+ final WebservicesMetaData wsMetaData =
this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
- for ( WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions() )
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
- for ( PortComponentMetaData pcmd : wsd.getPortComponents() )
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
final String servletName = pcmd.getServletLink();
- final ServletMetaData servletMD = ASHelper.getServletForName( webMetaData,
servletName );
- final String servletClass = ASHelper.getEndpointName( servletMD );
+ final ServletMetaData servletMD = ASHelper.getServletForName(webMetaData,
servletName);
+ final String servletClass = ASHelper.getEndpointName(servletMD);
- this.createEndpoint( servletClass, servletName, dep );
+ this.createEndpoint(servletClass, servletName, dep);
}
}
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXWS JSE deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxwsJseDeployment( final DeploymentUnit unit )
+ private void newJaxwsJseDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- this.getAndPropagateAttachment( JBossWebMetaData.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
- final List< ServletMetaData > servlets = ASHelper.getJaxwsServlets( unit );
- for ( ServletMetaData servlet : servlets )
+ final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
+ for (ServletMetaData servlet : servlets)
{
final String servletName = servlet.getName();
- final String servletClass = ASHelper.getEndpointName( servlet );
+ final String servletClass = ASHelper.getEndpointName(servlet);
- this.createEndpoint( servletClass, servletName, dep );
+ this.createEndpoint(servletClass, servletName, dep);
}
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
/**
@@ -224,43 +224,41 @@
* @param unit deployment unit
* @return archive deployment
*/
- private ArchiveDeployment newDeployment( final DeploymentUnit unit )
+ private ArchiveDeployment newDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = ( ArchiveDeployment ) this.deploymentModelFactory.
- newDeployment( unit.getSimpleName(), unit.getClassLoader() );
+ final ArchiveDeployment dep =
(ArchiveDeployment)this.deploymentModelFactory.newDeployment(unit.getSimpleName(),
unit.getClassLoader());
- if ( unit instanceof VFSDeploymentUnit )
+ if (unit instanceof VFSDeploymentUnit)
{
- final VFSDeploymentUnit vfsUnit = ( VFSDeploymentUnit ) unit;
- final List< VirtualFile > virtualFiles = vfsUnit.getMetaDataFiles(
WSDeploymentDeployer.WS_FILE_FILTER );
- final Set< UnifiedVirtualFile > uVirtualFiles = new HashSet<
UnifiedVirtualFile >();
- for ( VirtualFile vf : virtualFiles )
+ final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
+ final List<VirtualFile> virtualFiles =
vfsUnit.getMetaDataFiles(WSDeploymentDeployer.WS_FILE_FILTER);
+ final Set<UnifiedVirtualFile> uVirtualFiles = new
HashSet<UnifiedVirtualFile>();
+ for (VirtualFile vf : virtualFiles)
{
// Adding the roots of the virtual files.
try
{
- uVirtualFiles.add( new VirtualFileAdaptor( vf.getVFS().getRoot() ) );
+ uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
}
- catch ( IOException ioe )
+ catch (IOException ioe)
{
- throw new WSFDeploymentException( ioe );
+ throw new WSFDeploymentException(ioe);
}
}
- dep.setMetadataFiles( new LinkedList<UnifiedVirtualFile>( uVirtualFiles )
);
+ dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
}
- if ( unit.getParent() != null )
+ if (unit.getParent() != null)
{
final DeploymentUnit parentUnit = unit.getParent();
- final ArchiveDeployment parentDep = ( ArchiveDeployment )
this.deploymentModelFactory.
- newDeployment( parentUnit.getSimpleName(), parentUnit.getClassLoader() );
- dep.setParent( parentDep );
+ final ArchiveDeployment parentDep =
(ArchiveDeployment)this.deploymentModelFactory.newDeployment(parentUnit.getSimpleName(),
parentUnit.getClassLoader());
+ dep.setParent(parentDep);
}
- dep.setRootFile( new VirtualFileAdaptor( ( ( VFSDeploymentUnit ) unit ).getRoot() )
);
- dep.setRuntimeClassLoader( unit.getClassLoader() );
- final DeploymentType deploymentType = ASHelper.getRequiredAttachment( unit,
DeploymentType.class );
- dep.setType( deploymentType );
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRuntimeClassLoader(unit.getClassLoader());
+ final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit,
DeploymentType.class);
+ dep.setType(deploymentType);
return dep;
}
@@ -273,25 +271,25 @@
* @param dep deployment
* @return WS endpoint
*/
- private Endpoint createEndpoint( final String endpointClass, final String
endpointName, final Deployment dep )
+ private Endpoint createEndpoint(final String endpointClass, final String endpointName,
final Deployment dep)
{
- if ( endpointName == null )
+ if (endpointName == null)
{
- throw new NullPointerException( "Null endpoint name" );
+ throw new NullPointerException("Null endpoint name");
}
- if ( endpointClass == null )
+ if (endpointClass == null)
{
- throw new NullPointerException( "Null endpoint class" );
+ throw new NullPointerException("Null endpoint class");
}
-
- final Endpoint endpoint = this.deploymentModelFactory.newEndpoint( endpointClass
);
- endpoint.setShortName( endpointName );
- dep.getService().addEndpoint( endpoint );
-
+
+ final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+ endpoint.setShortName(endpointName);
+ dep.getService().addEndpoint(endpoint);
+
return endpoint;
}
-
+
/**
* Gets specified attachment from deployment unit.
* Checks it's not null and then propagates it to <b>dep</b>
@@ -303,20 +301,17 @@
* @param dep deployment
* @return attachment value if found in unit
*/
- private <A> A getAndPropagateAttachment
- (
- final Class< A > attachment, final DeploymentUnit unit, final Deployment dep
- )
+ private <A> A getAndPropagateAttachment(final Class<A> attachment, final
DeploymentUnit unit, final Deployment dep)
{
- final A attachmentValue = ASHelper.getOptionalAttachment( unit, attachment );
-
- if ( attachmentValue != null )
+ final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
+
+ if (attachmentValue != null)
{
- dep.addAttachment( attachment , attachmentValue );
+ dep.addAttachment(attachment, attachmentValue);
return attachmentValue;
}
- throw new IllegalStateException( "Deployment unit does not contain " +
attachment );
+ throw new IllegalStateException("Deployment unit does not contain " +
attachment);
}
-
+
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -31,7 +31,7 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class WSDescriptorDeployer extends ObjectModelFactoryDeployer<
WebservicesMetaData >
+public final class WSDescriptorDeployer extends
ObjectModelFactoryDeployer<WebservicesMetaData>
{
/**
@@ -39,7 +39,7 @@
*/
public WSDescriptorDeployer()
{
- super( WebservicesMetaData.class );
+ super(WebservicesMetaData.class);
}
/**
@@ -49,9 +49,9 @@
* @return object model factory
*/
@Override
- protected ObjectModelFactory getObjectModelFactory( final WebservicesMetaData root )
+ protected ObjectModelFactory getObjectModelFactory(final WebservicesMetaData root)
{
- return new WebservicesFactory( null );
+ return new WebservicesFactory(null);
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -58,15 +58,15 @@
public WSEJBAdapterDeployer()
{
super();
-
+
// inputs
- this.addInput( MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME );
- this.addInput( EjbDeployment.class );
- this.addInput( Ejb3Deployment.class );
- this.addInput( WebservicesMetaData.class );
+ this.addInput(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ this.addInput(EjbDeployment.class);
+ this.addInput(Ejb3Deployment.class);
+ this.addInput(WebservicesMetaData.class);
// outputs
- this.addOutput( WebServiceDeployment.class );
+ this.addOutput(WebServiceDeployment.class);
}
/**
@@ -76,36 +76,32 @@
* @throws DeploymentException exception
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- final JBossMetaData mergedMD = ( JBossMetaData ) unit.getAttachment(
- MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
- );
- final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment( unit,
Ejb3Deployment.class );
+ final JBossMetaData mergedMD =
(JBossMetaData)unit.getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment(unit,
Ejb3Deployment.class);
- if ( mergedMD != null )
+ if (mergedMD != null)
{
- final WebServiceDeploymentAdapter wsDeploymentAdapter = new
WebServiceDeploymentAdapter();
- final Iterator< JBossEnterpriseBeanMetaData > ejbIterator =
mergedMD.getEnterpriseBeans().iterator();
+ final WebServiceDeploymentAdapter wsDeploymentAdapter = new
WebServiceDeploymentAdapter();
+ final Iterator<JBossEnterpriseBeanMetaData> ejbIterator =
mergedMD.getEnterpriseBeans().iterator();
- while ( ejbIterator.hasNext() )
+ while (ejbIterator.hasNext())
{
final JBossEnterpriseBeanMetaData ejbMD = ejbIterator.next();
- final EJBContainer ejbContainer = this.getContainer( ejb3Deployment, ejbMD
);
-
- if ( ejbMD.getEjbClass() != null )
+ final EJBContainer ejbContainer = this.getContainer(ejb3Deployment, ejbMD);
+
+ if (ejbMD.getEjbClass() != null)
{
- wsDeploymentAdapter.getServiceEndpoints().add(
- new WebServiceDeclarationAdapter( ejbMD, ejbContainer,
unit.getClassLoader() )
- );
+ wsDeploymentAdapter.getServiceEndpoints().add(new
WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
}
else
{
- log.warn( "Ingoring ejb deployment with null classname: " +
ejbMD );
+ log.warn("Ingoring ejb deployment with null classname: " +
ejbMD);
}
}
- unit.addAttachment( WebServiceDeployment.class, wsDeploymentAdapter );
+ unit.addAttachment(WebServiceDeployment.class, wsDeploymentAdapter);
}
}
@@ -117,22 +113,21 @@
* @return EJB container or null if not EJB3 stateless bean
* @throws DeploymentException if some error occurs
*/
- private EJBContainer getContainer( final Ejb3Deployment ejb3Deployment, final
JBossEnterpriseBeanMetaData ejbMD )
- throws DeploymentException
+ private EJBContainer getContainer(final Ejb3Deployment ejb3Deployment, final
JBossEnterpriseBeanMetaData ejbMD) throws DeploymentException
{
- if ( ( ejb3Deployment != null ) && ( !ejbMD.isEntity() ) )
+ if ((ejb3Deployment != null) && (!ejbMD.isEntity()))
{
try
{
- final ObjectName objName = new ObjectName( ejbMD.determineContainerName() );
- return ( EJBContainer ) ejb3Deployment.getContainer( objName );
+ final ObjectName objName = new ObjectName(ejbMD.determineContainerName());
+ return (EJBContainer)ejb3Deployment.getContainer(objName);
}
- catch ( MalformedObjectNameException e )
+ catch (MalformedObjectNameException e)
{
- throw new DeploymentException( e );
+ throw new DeploymentException(e);
}
}
-
+
return null;
}
@@ -148,7 +143,7 @@
/** EJB container. */
private final EJBContainer ejbContainer;
/** Class loader. */
- private final ClassLoader loader;
+ private final ClassLoader loader;
/**
* Constructor.
@@ -157,20 +152,15 @@
* @param ejbContainer EJB container
* @param loader class loader
*/
- private WebServiceDeclarationAdapter
- (
- final JBossEnterpriseBeanMetaData ejbMetaData,
- final EJBContainer ejbContainer,
- final ClassLoader loader
- )
+ private WebServiceDeclarationAdapter(final JBossEnterpriseBeanMetaData ejbMetaData,
final EJBContainer ejbContainer, final ClassLoader loader)
{
super();
-
+
this.ejbMetaData = ejbMetaData;
this.ejbContainer = ejbContainer;
this.loader = loader;
}
-
+
/**
* Returns EJB container name.
*
@@ -218,18 +208,18 @@
* @param <T> annotation class type
* @return requested annotation or null if not found
*/
- public < T extends Annotation > T getAnnotation( final Class<T>
annotationType )
+ public <T extends Annotation> T getAnnotation(final Class<T>
annotationType)
{
- final boolean haveEjbContainer = this.ejbContainer != null;
+ final boolean haveEjbContainer = this.ejbContainer != null;
- if ( haveEjbContainer )
+ if (haveEjbContainer)
{
- return this.ejbContainer.getAnnotation( annotationType );
+ return this.ejbContainer.getAnnotation(annotationType);
}
else
{
- final Class< ? > bean = this.getComponentClass();
- return ( T ) bean.getAnnotation( annotationType );
+ final Class<?> bean = this.getComponentClass();
+ return (T)bean.getAnnotation(annotationType);
}
}
@@ -238,16 +228,15 @@
*
* @return ejb class instance
*/
- private Class< ? > getComponentClass()
+ private Class<?> getComponentClass()
{
try
{
- return this.loader.loadClass( this.getComponentClassName() );
+ return this.loader.loadClass(this.getComponentClassName());
}
- catch ( ClassNotFoundException cnfe )
+ catch (ClassNotFoundException cnfe)
{
- throw new RuntimeException( "Failed to load component class: " +
- this.getComponentClassName() + " from loader: " + this.loader
);
+ throw new RuntimeException("Failed to load component class: " +
this.getComponentClassName() + " from loader: " + this.loader);
}
}
@@ -259,9 +248,9 @@
*/
private static final class WebServiceDeploymentAdapter implements
WebServiceDeployment
{
-
+
/** List of endpoints. */
- private final List< WebServiceDeclaration > endpoints = new ArrayList<
WebServiceDeclaration >();
+ private final List<WebServiceDeclaration> endpoints = new
ArrayList<WebServiceDeclaration>();
/**
* Constructor.
@@ -270,15 +259,15 @@
{
super();
}
-
+
/**
* Returns endpoints list.
*
* @return endpoints list
*/
- public List< WebServiceDeclaration > getServiceEndpoints()
+ public List<WebServiceDeclaration> getServiceEndpoints()
{
- return this.endpoints;
+ return this.endpoints;
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -45,15 +45,15 @@
public WSTypeDeployer()
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( WebservicesMetaData.class );
- this.addInput( WebServiceDeployment.class );
-
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(WebservicesMetaData.class);
+ this.addInput(WebServiceDeployment.class);
+
// outputs
- this.addOutput( DeploymentType.class );
- this.addOutput( JBossWebMetaData.class );
+ this.addOutput(DeploymentType.class);
+ this.addOutput(JBossWebMetaData.class);
}
/**
@@ -63,72 +63,72 @@
* @throws DeploymentException on failure
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( this.isJaxwsJseDeployment( unit ) )
+ if (this.isJaxwsJseDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXWS_JSE );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JSE);
}
- else if ( this.isJaxwsEjbDeployment( unit ) )
+ else if (this.isJaxwsEjbDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXWS_EJB3 );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_EJB3);
}
- else if ( this.isJaxrpcJseDeployment( unit ) )
+ else if (this.isJaxrpcJseDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXRPC_JSE );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_JSE);
}
- else if ( this.isJaxrpcEjbDeployment( unit ) )
+ else if (this.isJaxrpcEjbDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXRPC_EJB21 );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
}
}
-
+
/**
* Returns true if JAXRPC EJB deployment is detected.
*
* @param unit deployment unit
* @return true if JAXRPC EJB, false otherwise
*/
- private boolean isJaxrpcEjbDeployment( final DeploymentUnit unit )
+ private boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final boolean hasWebservicesMD = ASHelper.hasAttachment( unit,
WebservicesMetaData.class );
- final boolean hasJBossMD = unit.getAllMetaData( JBossMetaData.class ).size() >
0;
-
+ final boolean hasWebservicesMD = ASHelper.hasAttachment(unit,
WebservicesMetaData.class);
+ final boolean hasJBossMD = unit.getAllMetaData(JBossMetaData.class).size() > 0;
+
return hasWebservicesMD && hasJBossMD;
}
-
+
/**
* Returns true if JAXRPC JSE deployment is detected.
*
* @param unit deployment unit
* @return true if JAXRPC JSE, false otherwise
*/
- private boolean isJaxrpcJseDeployment( final DeploymentUnit unit )
+ private boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final boolean hasWebservicesMD = ASHelper.hasAttachment( unit,
WebservicesMetaData.class );
- final boolean hasJBossWebMD = ASHelper.hasAttachment( unit, JBossWebMetaData.class
);
+ final boolean hasWebservicesMD = ASHelper.hasAttachment(unit,
WebservicesMetaData.class);
+ final boolean hasJBossWebMD = ASHelper.hasAttachment(unit,
JBossWebMetaData.class);
- if ( hasWebservicesMD && hasJBossWebMD )
+ if (hasWebservicesMD && hasJBossWebMD)
{
- return ASHelper.getJaxrpcServlets( unit ).size() > 0;
+ return ASHelper.getJaxrpcServlets(unit).size() > 0;
}
return false;
}
-
+
/**
* Returns true if JAXWS EJB deployment is detected.
*
* @param unit deployment unit
* @return true if JAXWS EJB, false otherwise
*/
- private boolean isJaxwsEjbDeployment( final DeploymentUnit unit )
+ private boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final boolean hasWSDeployment = ASHelper.hasAttachment( unit,
WebServiceDeployment.class );
+ final boolean hasWSDeployment = ASHelper.hasAttachment(unit,
WebServiceDeployment.class);
- if ( hasWSDeployment )
+ if (hasWSDeployment)
{
- return ASHelper.getJaxwsEjbs( unit ).size() > 0;
+ return ASHelper.getJaxwsEjbs(unit).size() > 0;
}
return false;
@@ -140,13 +140,13 @@
* @param unit deployment unit
* @return true if JAXWS JSE, false otherwise
*/
- private boolean isJaxwsJseDeployment( final DeploymentUnit unit )
+ private boolean isJaxwsJseDeployment(final DeploymentUnit unit)
{
- final boolean hasJBossWebMD = ASHelper.hasAttachment( unit, JBossWebMetaData.class
);
+ final boolean hasJBossWebMD = ASHelper.hasAttachment(unit,
JBossWebMetaData.class);
- if ( hasJBossWebMD )
+ if (hasJBossWebMD)
{
- return ASHelper.getJaxwsServlets( unit ).size() > 0;
+ return ASHelper.getJaxwsServlets(unit).size() > 0;
}
return false;
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -33,7 +33,7 @@
*/
public final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
{
-
+
/** The tree walking attributes. */
private VisitorAttributes attributes;
@@ -42,7 +42,7 @@
*/
public WSVirtualFileFilter()
{
- this( VisitorAttributes.RECURSE_LEAVES_ONLY );
+ this(VisitorAttributes.RECURSE_LEAVES_ONLY);
}
/**
@@ -50,7 +50,7 @@
*
* @param attributes visit attributes
*/
- public WSVirtualFileFilter( final VisitorAttributes attributes )
+ public WSVirtualFileFilter(final VisitorAttributes attributes)
{
this.attributes = attributes;
}
@@ -71,18 +71,18 @@
* @param file to analyze
* @return true if expected file extension, false otherwise
*/
- public boolean accepts( final VirtualFile file )
+ public boolean accepts(final VirtualFile file)
{
- if ( file == null )
+ if (file == null)
{
return false;
}
final String fileName = file.getName().toLowerCase();
- final boolean hasWsdlSuffix = fileName.endsWith( ".wsdl" );
- final boolean hasXsdSuffix = fileName.endsWith( ".xsd" );
- final boolean hasXmlSuffix = fileName.endsWith( ".xml" );
-
+ final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
+ final boolean hasXsdSuffix = fileName.endsWith(".xsd");
+ final boolean hasXmlSuffix = fileName.endsWith(".xml");
+
return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -88,7 +88,7 @@
protected String resolveMethod(final Method method)
{
final EJB ejbAnnotation = method.getAnnotation(EJB.class);
- final Class<?> type = method.getParameterTypes()[0];
+ final Class<?> type = method.getParameterTypes()[0];
final EjbReference reference = getEjbReference(ejbAnnotation, type);
return this.delegate.resolveEjb(unit, reference);
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -65,7 +65,7 @@
public final class InjectionMetaDataDeploymentAspect extends DeploymentAspect
{
- private static final ReferenceResolver RESOURCE_REFERENCE_RESOLVER = new
ResourceReferenceResolver();
+ private static final ReferenceResolver RESOURCE_REFERENCE_RESOLVER = new
ResourceReferenceResolver();
private static final String EJB3_JNDI_PREFIX = "java:env/";
private EjbReferenceResolver ejbReferenceResolver;
@@ -74,16 +74,16 @@
{
super.start(dep);
- DeploymentUnit unit = WSHelper.getRequiredAttachment( dep, DeploymentUnit.class );
- JBossWebMetaData webMD = WSHelper.getRequiredAttachment( dep,
JBossWebMetaData.class );
+ DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+ JBossWebMetaData webMD = WSHelper.getRequiredAttachment(dep,
JBossWebMetaData.class);
List<InjectionMetaData> injectionMD = new
LinkedList<InjectionMetaData>();
Map<Class<? extends Annotation>, ReferenceResolver> resolvers =
createResolvers(unit);
try
{
-
- if ( WSHelper.isJaxwsJseDeployment( dep ) )
+
+ if (WSHelper.isJaxwsJseDeployment(dep))
{
injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
for (Endpoint endpoint : dep.getService().getEndpoints())
@@ -92,10 +92,10 @@
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
- else if ( WSHelper.isJaxwsEjbDeployment( dep ) )
+ else if (WSHelper.isJaxwsEjbDeployment(dep))
{
- WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(
unit, WebServiceDeployment.class );
- JBossMetaData jbossMD = ASHelper.getRequiredAttachment( unit,
JBossMetaData.class );
+ WebServiceDeployment webServiceDeployment =
ASHelper.getRequiredAttachment(unit, WebServiceDeployment.class);
+ JBossMetaData jbossMD = ASHelper.getRequiredAttachment(unit,
JBossMetaData.class);
JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
Iterator<WebServiceDeclaration> it =
webServiceDeployment.getServiceEndpoints().iterator();
@@ -106,7 +106,7 @@
{
final Context ctx =
(Context)container.getContext().lookup(EJB3_JNDI_PREFIX);
String ejbName = container.getComponentName();
- EnvironmentEntriesMetaData ejbEnvEntries =
jebMDs.get(ejbName).getEnvironmentEntries();
+ EnvironmentEntriesMetaData ejbEnvEntries =
jebMDs.get(ejbName).getEnvironmentEntries();
injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD,
resolvers, ctx);
@@ -174,7 +174,7 @@
Set<ResourceInjectionTargetMetaData> injectionTargets =
eeMD.getInjectionTargets();
if ((injectionTargets != null) && (injectionTargets.size() > 0))
{
- for (Iterator<ResourceInjectionTargetMetaData> j =
injectionTargets.iterator(); j.hasNext(); )
+ for (Iterator<ResourceInjectionTargetMetaData> j =
injectionTargets.iterator(); j.hasNext();)
{
ResourceInjectionTargetMetaData ritMD = j.next();
targetClass = ritMD.getInjectionTargetClass();
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -83,7 +83,7 @@
{
String ejbName = ep.getShortName();
Deployment dep = ep.getService().getDeployment();
- EJBArchiveMetaData apMetaData = WSHelper.getRequiredAttachment( dep,
EJBArchiveMetaData.class );
+ EJBArchiveMetaData apMetaData = WSHelper.getRequiredAttachment(dep,
EJBArchiveMetaData.class);
EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -47,7 +47,6 @@
private KernelController houston;
private ServiceEndpointContainer serviceEndpointContainer;
-
InvocationHandlerEJB3()
{
houston = KernelLocator.getKernel().getController();
@@ -61,20 +60,20 @@
public void init(Endpoint ep)
{
containerName = (String)ep.getProperty(InvocationHandlerEJB3.CONTAINER_NAME);
- assert containerName!=null : "Target container name not set";
+ assert containerName != null : "Target container name not set";
}
private ServiceEndpointContainer lazyInitializeInvocationTarget()
{
- if(null==this.serviceEndpointContainer)
+ if (null == this.serviceEndpointContainer)
{
ControllerContext context = houston.getInstalledContext(containerName);
if (context == null)
throw new WebServiceException("Cannot find service endpoint target:
" + containerName);
assert (context.getTarget() instanceof ServiceEndpointContainer) :
"Invocation target mismatch";
- this.serviceEndpointContainer = (ServiceEndpointContainer) context.getTarget();
+ this.serviceEndpointContainer = (ServiceEndpointContainer)context.getTarget();
}
return this.serviceEndpointContainer;
@@ -85,12 +84,12 @@
try
{
ServiceEndpointContainer invocationTarget = lazyInitializeInvocationTarget();
-
+
Class beanClass = invocationTarget.getServiceImplementationClass();
Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
Object[] args = wsInv.getArgs();
InvocationContextCallback invProps = new EJB3InvocationContextCallback(wsInv);
-
+
Object retObj = invocationTarget.invokeEndpoint(method, args, invProps);
wsInv.setReturnValue(retObj);
@@ -112,7 +111,7 @@
public <T> T get(Class<T> propertyType)
{
- return wsInv.getInvocationContext().getAttachment(propertyType);
+ return wsInv.getInvocationContext().getAttachment(propertyType);
}
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -35,7 +35,7 @@
{
InvocationHandler handler = null;
- switch(type)
+ switch (type)
{
case JAXRPC_JSE:
handler = new InvocationHandlerJAXRPC();
@@ -57,8 +57,8 @@
break;
}
- if(null == handler)
- throw new IllegalArgumentException("Unable to resolve
spi.invocation.InvocationHandler for type " +type);
+ if (null == handler)
+ throw new IllegalArgumentException("Unable to resolve
spi.invocation.InvocationHandler for type " + type);
return handler;
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -48,7 +48,7 @@
{
return SecurityAssociation.getPrincipal();
}
-
+
public void setPrincipal(Principal pricipal)
{
SecurityAssociation.setPrincipal(pricipal);
@@ -94,5 +94,4 @@
});
}
-
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -37,7 +37,7 @@
*/
public final class ContainerMetaDataDeploymentAspect extends DeploymentAspect
{
-
+
/** JSE meta data builder. */
private MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
@@ -54,32 +54,32 @@
{
super();
}
-
+
/**
* Build container independent meta data.
*
* @param dep webservice deployment
*/
@Override
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final DeploymentUnit unit = WSHelper.getRequiredAttachment( dep,
DeploymentUnit.class );
-
- if ( ASHelper.isJseDeployment( unit ) )
+ final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep,
DeploymentUnit.class);
+
+ if (ASHelper.isJseDeployment(unit))
{
- final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create( dep, unit
);
- dep.addAttachment( JSEArchiveMetaData.class, jseMetaData );
+ final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep,
unit);
+ dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
}
- else if ( ASHelper.isJaxwsEjbDeployment( unit ) )
+ else if (ASHelper.isJaxwsEjbDeployment(unit))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create( dep,
unit );
- dep.addAttachment( EJBArchiveMetaData.class, ejbMetaData );
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep,
unit);
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
- else if ( ASHelper.isJaxrpcEjbDeployment( unit ) )
+ else if (ASHelper.isJaxrpcEjbDeployment(unit))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create( dep,
unit );
- dep.addAttachment( EJBArchiveMetaData.class, ejbMetaData );
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep,
unit);
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
}
-
+
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -58,14 +58,14 @@
EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
{
- JBossMetaData jbossMetaData = ASHelper.getRequiredAttachment( unit,
JBossMetaData.class );
+ JBossMetaData jbossMetaData = ASHelper.getRequiredAttachment(unit,
JBossMetaData.class);
dep.addAttachment(JBossMetaData.class, jbossMetaData);
-
+
EJBArchiveMetaData ejbMetaData = new EJBArchiveMetaData();
buildEnterpriseBeansMetaData(ejbMetaData, jbossMetaData);
buildWebservicesMetaData(ejbMetaData, jbossMetaData);
ejbMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
-
+
return ejbMetaData;
}
@@ -89,7 +89,7 @@
{
String contextRoot = webservices.getContextRoot();
ejbMetaData.setWebServiceContextRoot(contextRoot);
-
+
ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
WebserviceDescriptionsMetaData wsDescriptions =
webservices.getWebserviceDescriptions();
@@ -110,8 +110,7 @@
private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData
wsMetaData)
{
- return new PublishLocationAdapter()
- {
+ return new PublishLocationAdapter() {
public String getWsdlPublishLocationByName(String name)
{
String wsdlPublishLocation = null;
@@ -133,7 +132,7 @@
{
targetBean = new SLSBMetaData();
JBossSessionBeanMetaData jbossSessionBean =
(JBossSessionBeanMetaData)jbossBeansMetaData;
-
+
targetBean.setEjbName(jbossSessionBean.getEjbName());
targetBean.setEjbClass(jbossSessionBean.getEjbClass());
targetBean.setServiceEndpointInterface(jbossSessionBean.getServiceEndpoint());
@@ -141,7 +140,7 @@
targetBean.setLocalHome(jbossSessionBean.getLocalHome());
targetBean.setJndiName(jbossSessionBean.determineJndiName());
targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
-
+
PortComponent pcmd = jbossSessionBean.getPortComponent();
if (pcmd != null)
{
@@ -158,7 +157,7 @@
{
targetBean = new MDBMetaData();
JBossMessageDrivenBeanMetaData jbossMessageBean =
(JBossMessageDrivenBeanMetaData)jbossBeansMetaData;
-
+
targetBean.setEjbName(jbossMessageBean.getEjbName());
targetBean.setEjbClass(jbossMessageBean.getEjbClass());
targetBean.setLocalJndiName(jbossBeansMetaData.getLocalJndiName());
@@ -167,7 +166,7 @@
if (targetBean != null)
ejbBeans.add(targetBean);
-
+
return targetBean;
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -53,13 +53,13 @@
private static Logger log = Logger.getLogger(MetaDataBuilderEJB3.class);
EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
- {
+ {
EJBArchiveMetaData umd = new EJBArchiveMetaData();
- WebServiceDeployment webServiceDeployment = WSHelper.getRequiredAttachment( dep,
WebServiceDeployment.class );
+ WebServiceDeployment webServiceDeployment = WSHelper.getRequiredAttachment(dep,
WebServiceDeployment.class);
buildEnterpriseBeansMetaData(umd, webServiceDeployment);
- JBossMetaData jbMetaData = ASHelper.getRequiredAttachment( unit,
JBossMetaData.class );
+ JBossMetaData jbMetaData = ASHelper.getRequiredAttachment(unit,
JBossMetaData.class);
buildWebservicesMetaData(umd, jbMetaData);
return umd;
@@ -104,7 +104,7 @@
EJBMetaData ejbMetaData = null;
- if(mdbMetaData!=null)
+ if (mdbMetaData != null)
{
ejbMetaData = new MDBMetaData();
@@ -113,7 +113,7 @@
{
String destination = getActivationProperty("destination",
props);
if (destination != null)
- {
+ {
((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
}
}
@@ -138,20 +138,20 @@
smd.setSecureWSDLAccess(pcMetaData.secureWSDLAccess());
ejbMetaData.setSecurityMetaData(smd);
}
-
+
ejbMetaDataList.add(ejbMetaData);
}
}
-
+
jarMetaData.setEnterpriseBeans(ejbMetaDataList);
}
private String getActivationProperty(String name, ActivationConfigProperty[] props)
{
String result = null;
- for(ActivationConfigProperty p : props)
+ for (ActivationConfigProperty p : props)
{
- if(p.propertyName().equals(name))
+ if (p.propertyName().equals(name))
{
result = p.propertyValue();
break;
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -58,30 +58,30 @@
{
private static Logger log = Logger.getLogger(MetaDataBuilderJSE.class);
-
+
JSEArchiveMetaData create(Deployment dep, DeploymentUnit unit)
{
String contextRoot = null;
-
- JBossWebMetaData jbossWebMetaData = ASHelper.getRequiredAttachment( unit,
JBossWebMetaData.class );
+ JBossWebMetaData jbossWebMetaData = ASHelper.getRequiredAttachment(unit,
JBossWebMetaData.class);
+
if (unit.getParent() != null)
{
- JBossAppMetaData appmd = ASHelper.getOptionalAttachment( unit.getParent(),
JBossAppMetaData.class );
+ JBossAppMetaData appmd = ASHelper.getOptionalAttachment(unit.getParent(),
JBossAppMetaData.class);
if (appmd != null)
{
ModuleMetaData module = appmd.getModule(dep.getSimpleName());
if (module != null)
{
- WebModuleMetaData web = (WebModuleMetaData) module.getValue();
+ WebModuleMetaData web = (WebModuleMetaData)module.getValue();
contextRoot = web.getContextRoot();
}
}
}
-
+
if (contextRoot == null)
contextRoot = jbossWebMetaData.getContextRoot();
-
+
JSEArchiveMetaData umd = new JSEArchiveMetaData();
umd.setContextRoot(contextRoot);
umd.setServletMappings(getServletMappings(jbossWebMetaData));
@@ -91,7 +91,7 @@
umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
setConfigNameAndFile(umd, jbossWebMetaData);
-
+
return umd;
}
@@ -99,7 +99,7 @@
{
String configName = null;
String configFile = null;
-
+
WebserviceDescriptionsMetaData wsDescriptions =
jbossWebMetaData.getWebserviceDescriptions();
if (wsDescriptions != null && wsDescriptions.size() > 1)
log.warn("Multiple <webservice-description> elements not
supported");
@@ -122,15 +122,14 @@
configFile = ctxParam.getParamValue();
}
}
-
+
umd.setConfigName(configName);
umd.setConfigFile(configFile);
}
private PublishLocationAdapter getPublishLocationAdpater(final JBossWebMetaData wmd)
{
- return new PublishLocationAdapter()
- {
+ return new PublishLocationAdapter() {
public String getWsdlPublishLocationByName(String name)
{
WebserviceDescriptionsMetaData wsdmd = wmd.getWebserviceDescriptions();
@@ -175,7 +174,7 @@
List<ServletMappingMetaData> smappings = wmd.getServletMappings();
if (smappings != null)
{
- for(ServletMappingMetaData mapping : smappings)
+ for (ServletMappingMetaData mapping : smappings)
{
// FIXME - Add support for multiple mappings
mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
@@ -195,7 +194,7 @@
// Skip JSPs
if (servlet.getServletClass() == null || servlet.getServletClass().length()
== 0)
continue;
-
+
mappings.put(servlet.getName(), servlet.getServletClass());
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -49,7 +49,7 @@
{
super();
}
-
+
/**
* JBAS-5935: The dynamic web application generated by the JBossWS
* does not go through the war security deployer. Hence the JACC
@@ -58,23 +58,21 @@
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep,
JBossWebMetaData.class );
-
+ final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep,
JBossWebMetaData.class);
+
try
{
- final PolicyConfigurationFactory policyConfigurationFactory =
- PolicyConfigurationFactory.getPolicyConfigurationFactory();
- final PolicyConfiguration policyConfiguration =
- policyConfigurationFactory.getPolicyConfiguration( dep.getSimpleName(), false
);
+ final PolicyConfigurationFactory policyConfigurationFactory =
PolicyConfigurationFactory.getPolicyConfigurationFactory();
+ final PolicyConfiguration policyConfiguration =
policyConfigurationFactory.getPolicyConfiguration(dep.getSimpleName(), false);
- WebPermissionMapping.createPermissions( jbossWebMD, policyConfiguration );
+ WebPermissionMapping.createPermissions(jbossWebMD, policyConfiguration);
policyConfiguration.commit();
}
- catch ( Exception e )
+ catch (Exception e)
{
- throw new RuntimeException( "Exception generating JACC perms: ", e );
+ throw new RuntimeException("Exception generating JACC perms: ", e);
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -57,13 +57,13 @@
* @param securityDomain security domain to be prefixed
* @return security domain prefixed with jaas JNDI prefix
*/
- protected String appendJaasPrefix( final String securityDomain )
+ protected String appendJaasPrefix(final String securityDomain)
{
- if ( securityDomain != null )
+ if (securityDomain != null)
{
- final boolean hasJaasPrefix = securityDomain.startsWith(
AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX );
+ final boolean hasJaasPrefix =
securityDomain.startsWith(AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX);
- if ( !hasJaasPrefix )
+ if (!hasJaasPrefix)
{
return AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX +
securityDomain;
}
@@ -72,13 +72,12 @@
return securityDomain;
}
-
- public final String getAuthMethod( final Endpoint endpoint )
+ public final String getAuthMethod(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
String beanAuthMethod = null;
-
+
WebContext anWebContext =
(WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -86,7 +85,7 @@
beanAuthMethod = anWebContext.authMethod();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep,
EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep,
EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -96,16 +95,16 @@
beanAuthMethod = smd.getAuthMethod();
}
}
-
+
return beanAuthMethod;
}
- public final boolean isSecureWsdlAccess( final Endpoint endpoint )
+ public final boolean isSecureWsdlAccess(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
boolean secureWSDLAccess = false;
-
+
WebContext anWebContext =
(WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -113,7 +112,7 @@
secureWSDLAccess = anWebContext.secureWSDLAccess();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep,
EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep,
EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -123,16 +122,16 @@
secureWSDLAccess = smd.getSecureWSDLAccess();
}
}
-
+
return secureWSDLAccess;
}
-
- public final String getTransportGuarantee( final Endpoint endpoint )
+
+ public final String getTransportGuarantee(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
String transportGuarantee = null;
-
+
WebContext anWebContext =
(WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -140,7 +139,7 @@
transportGuarantee = anWebContext.transportGuarantee();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep,
EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep,
EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -150,7 +149,7 @@
transportGuarantee = smd.getTransportGuarantee();
}
}
-
+
return transportGuarantee;
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -40,7 +40,7 @@
* @param dep webservice deployment
* @return security domain associated with EJB deployment
*/
- String getSecurityDomain( Deployment dep );
+ String getSecurityDomain(Deployment dep);
/**
* Obtaining security roles from EJB deployment.
@@ -48,12 +48,12 @@
* @param dep webservice deployment
* @return security roles associated with EJB deployment
*/
- SecurityRolesMetaData getSecurityRoles( Deployment dep );
+ SecurityRolesMetaData getSecurityRoles(Deployment dep);
- boolean isSecureWsdlAccess( Endpoint endpoint );
+ boolean isSecureWsdlAccess(Endpoint endpoint);
- String getAuthMethod( Endpoint endpoint );
-
- String getTransportGuarantee( Endpoint endpoint );
+ String getAuthMethod(Endpoint endpoint);
+ String getTransportGuarantee(Endpoint endpoint);
+
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -51,11 +51,11 @@
* @param dep webservice deployment
* @return security domain associated with EJB 21 deployment
*/
- public String getSecurityDomain( final Deployment dep )
+ public String getSecurityDomain(final Deployment dep)
{
- final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment( dep,
EJBArchiveMetaData.class );
+ final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment(dep,
EJBArchiveMetaData.class);
- return super.appendJaasPrefix( ejbMetaData.getSecurityDomain() );
+ return super.appendJaasPrefix(ejbMetaData.getSecurityDomain());
}
/**
@@ -64,12 +64,12 @@
* @param dep webservice deployment
* @return security roles associated with EJB 21 deployment
*/
- public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
{
- final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep,
JBossMetaData.class );
+ final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep,
JBossMetaData.class);
final IAssemblyDescriptorMetaData assemblyDescriptorMD =
jbossWebMD.getAssemblyDescriptor();
- return ( assemblyDescriptorMD != null ) ? assemblyDescriptorMD.getSecurityRoles() :
null;
+ return (assemblyDescriptorMD != null) ? assemblyDescriptorMD.getSecurityRoles() :
null;
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -56,21 +56,21 @@
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
- public String getSecurityDomain( final Deployment dep )
+ public String getSecurityDomain(final Deployment dep)
{
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep,
WebServiceDeployment.class );
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep,
WebServiceDeployment.class);
String securityDomain = null;
- final Iterator< WebServiceDeclaration > ejbContainers =
wsDeployment.getServiceEndpoints().iterator();
+ final Iterator<WebServiceDeclaration> ejbContainers =
wsDeployment.getServiceEndpoints().iterator();
- while ( ejbContainers.hasNext() )
+ while (ejbContainers.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(
SecurityDomain.class );
+ final SecurityDomain nextSecurityDomain =
ejbContainer.getAnnotation(SecurityDomain.class);
- securityDomain = this.getDomain( securityDomain, nextSecurityDomain );
+ securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
}
- return super.appendJaasPrefix( securityDomain );
+ return super.appendJaasPrefix(securityDomain);
}
/**
@@ -79,26 +79,26 @@
* @param dep webservice deployment
* @return security roles associated with EJB 21 deployment
*/
- public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
{
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep,
WebServiceDeployment.class );
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep,
WebServiceDeployment.class);
final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
- final Iterator< WebServiceDeclaration > ejbContainers =
wsDeployment.getServiceEndpoints().iterator();
+ final Iterator<WebServiceDeclaration> ejbContainers =
wsDeployment.getServiceEndpoints().iterator();
- while ( ejbContainers.hasNext() )
+ while (ejbContainers.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final RolesAllowed allowedRoles = ejbContainer.getAnnotation( RolesAllowed.class
);
+ final RolesAllowed allowedRoles =
ejbContainer.getAnnotation(RolesAllowed.class);
final boolean hasAllowedRoles = allowedRoles != null;
- if ( hasAllowedRoles )
+ if (hasAllowedRoles)
{
- for ( final String roleName : allowedRoles.value() )
+ for (final String roleName : allowedRoles.value())
{
final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
- securityRoleMD.setRoleName( roleName );
- securityRolesMD.add( securityRoleMD );
+ securityRoleMD.setRoleName(roleName);
+ securityRolesMD.add(securityRoleMD);
}
}
}
@@ -114,19 +114,19 @@
* @return security domain value
* @throws IllegalStateException if domains have different values
*/
- private String getDomain( final String oldSecurityDomain, final SecurityDomain
nextSecurityDomain )
+ private String getDomain(final String oldSecurityDomain, final SecurityDomain
nextSecurityDomain)
{
- if ( nextSecurityDomain == null )
+ if (nextSecurityDomain == null)
{
return oldSecurityDomain;
}
- if ( oldSecurityDomain == null )
+ if (oldSecurityDomain == null)
{
return nextSecurityDomain.value();
}
- this.ensureSameDomains( oldSecurityDomain, nextSecurityDomain.value() );
+ this.ensureSameDomains(oldSecurityDomain, nextSecurityDomain.value());
return oldSecurityDomain;
}
@@ -138,18 +138,14 @@
* @param newSecurityDomain next security domain
* @throws IllegalStateException if domains have different values
*/
- private void ensureSameDomains( final String oldSecurityDomain, final String
newSecurityDomain )
+ private void ensureSameDomains(final String oldSecurityDomain, final String
newSecurityDomain)
{
- final boolean domainsDiffer = !oldSecurityDomain.equals( newSecurityDomain );
+ final boolean domainsDiffer = !oldSecurityDomain.equals(newSecurityDomain);
- if ( domainsDiffer )
+ if (domainsDiffer)
{
- throw new IllegalStateException
- (
- "Multiple security domains not supported. " +
- "First domain: '" + oldSecurityDomain + "' " +
- "second domain: '" + newSecurityDomain + "'"
- );
+ throw new IllegalStateException("Multiple security domains not supported.
" + "First domain: '" + oldSecurityDomain + "' " +
"second domain: '"
+ + newSecurityDomain + "'");
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -55,7 +55,7 @@
*/
public final class WebMetaDataCreatingDeploymentAspect extends DeploymentAspect
{
-
+
/** EJB 21 security meta data builder. */
private SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new
SecurityMetaDataAccessorEJB21();
@@ -69,23 +69,23 @@
{
super();
}
-
+
/**
* Creates web meta data for EJB deployments.
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final boolean isEjbDeployment = WSHelper.isEjbDeployment( dep );
-
- if ( isEjbDeployment )
+ final boolean isEjbDeployment = WSHelper.isEjbDeployment(dep);
+
+ if (isEjbDeployment)
{
- final DeploymentUnit unit = WSHelper.getRequiredAttachment( dep,
DeploymentUnit.class );
- final JBossWebMetaData jbossWebMD = this.createWebMetaData( dep );
+ final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep,
DeploymentUnit.class);
+ final JBossWebMetaData jbossWebMD = this.createWebMetaData(dep);
- dep.addAttachment( JBossWebMetaData.class, jbossWebMD );
- unit.addAttachment( JBossWebMetaData.class, jbossWebMD );
+ dep.addAttachment(JBossWebMetaData.class, jbossWebMD);
+ unit.addAttachment(JBossWebMetaData.class, jbossWebMD);
}
}
@@ -95,20 +95,20 @@
* @param dep webservice deployment
* @return web meta data for EJB deployment
*/
- private JBossWebMetaData createWebMetaData( final Deployment dep )
+ private JBossWebMetaData createWebMetaData(final Deployment dep)
{
final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
- this.createWebAppDescriptor( dep, jbossWebMD );
- this.createJBossWebAppDescriptor( dep, jbossWebMD );
-
+ this.createWebAppDescriptor(dep, jbossWebMD);
+ this.createJBossWebAppDescriptor(dep, jbossWebMD);
+
return jbossWebMD;
}
- private void createWebAppDescriptor( final Deployment dep, final JBossWebMetaData
jbossWebMD )
+ private void createWebAppDescriptor(final Deployment dep, final JBossWebMetaData
jbossWebMD)
{
- this.createServlets( dep, jbossWebMD );
- this.createServletMappings( dep, jbossWebMD );
+ this.createServlets(dep, jbossWebMD);
+ this.createServletMappings(dep, jbossWebMD);
String authMethod = null;
@@ -117,10 +117,10 @@
{
String ejbName = ep.getShortName();
- final SecurityMetaDataAccessorEJB ejbMDAccessor =
this.getEjbSecurityMetaDataAccessor( dep );
- Boolean secureWSDLAccess = ejbMDAccessor.isSecureWsdlAccess( ep );
- String transportGuarantee = ejbMDAccessor.getTransportGuarantee( ep );
- String beanAuthMethod = ejbMDAccessor.getAuthMethod( ep );
+ final SecurityMetaDataAccessorEJB ejbMDAccessor =
this.getEjbSecurityMetaDataAccessor(dep);
+ Boolean secureWSDLAccess = ejbMDAccessor.isSecureWsdlAccess(ep);
+ String transportGuarantee = ejbMDAccessor.getTransportGuarantee(ep);
+ String beanAuthMethod = ejbMDAccessor.getAuthMethod(ep);
if (beanAuthMethod != null || transportGuarantee != null)
{
@@ -146,7 +146,7 @@
}
SecurityConstraintMetaData securityConstraint = new
SecurityConstraintMetaData();
securityContraints.add(securityConstraint);
-
+
WebResourceCollectionsMetaData resourceCollections =
securityConstraint.getResourceCollections();
if (resourceCollections == null)
{
@@ -155,7 +155,7 @@
}
WebResourceCollectionMetaData resourceCollection = new
WebResourceCollectionMetaData();
resourceCollections.add(resourceCollection);
-
+
resourceCollection.setWebResourceName(ejbName);
resourceCollection.setUrlPatterns(Arrays.asList(new String[] {
ep.getURLPattern() }));
ArrayList<String> httpMethods = new ArrayList<String>();
@@ -217,18 +217,18 @@
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
- private void createJBossWebAppDescriptor( final Deployment dep, final JBossWebMetaData
jbossWebMD )
+ private void createJBossWebAppDescriptor(final Deployment dep, final JBossWebMetaData
jbossWebMD)
{
// Set security domain
- this.setSecurityDomain( jbossWebMD, dep );
+ this.setSecurityDomain(jbossWebMD, dep);
// Set context root
final String contextRoot = dep.getService().getContextRoot();
- jbossWebMD.setContextRoot( contextRoot );
+ jbossWebMD.setContextRoot(contextRoot);
// Set virtual hosts
final List<String> virtualHosts = dep.getService().getVirtualHosts();
- jbossWebMD.setVirtualHosts( virtualHosts );
+ jbossWebMD.setVirtualHosts(virtualHosts);
}
/**
@@ -237,13 +237,13 @@
* @param dep webservice EJB deployment
* @return security builder for EJB deployment
*/
- private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor( final Deployment
dep )
+ private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor(final Deployment
dep)
{
- final boolean isJaxws = WSHelper.isJaxwsDeployment( dep );
-
+ final boolean isJaxws = WSHelper.isJaxwsDeployment(dep);
+
return isJaxws ? this.ejb3SecurityAccessor : this.ejb21SecurityAccessor;
}
-
+
/**
* Creates servlets part of web.xml descriptor.
*
@@ -257,17 +257,17 @@
* @param dep webservice deployemnt
* @param jbossWebMD jboss web meta data
*/
- private void createServlets( final Deployment dep, final JBossWebMetaData jbossWebMD
)
+ private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final JBossServletsMetaData servlets = this.getServlets( jbossWebMD );
+ final JBossServletsMetaData servlets = this.getServlets(jbossWebMD);
- for ( final Endpoint endpoint : dep.getService().getEndpoints() )
+ for (final Endpoint endpoint : dep.getService().getEndpoints())
{
final JBossServletMetaData servlet = new JBossServletMetaData();
- servlet.setServletName( endpoint.getShortName() );
- servlet.setServletClass( endpoint.getTargetBeanName() );
+ servlet.setServletName(endpoint.getShortName());
+ servlet.setServletClass(endpoint.getTargetBeanName());
- servlets.add( servlet );
+ servlets.add(servlet);
}
}
@@ -284,17 +284,17 @@
* @param dep webservice deployemnt
* @param jbossWebMD jboss web meta data
*/
- private void createServletMappings( final Deployment dep, final JBossWebMetaData
jbossWebMD )
+ private void createServletMappings(final Deployment dep, final JBossWebMetaData
jbossWebMD)
{
- final List< ServletMappingMetaData > servletMappings =
this.getServletMappings( jbossWebMD );
+ final List<ServletMappingMetaData> servletMappings =
this.getServletMappings(jbossWebMD);
- for ( final Endpoint ep : dep.getService().getEndpoints() )
+ for (final Endpoint ep : dep.getService().getEndpoints())
{
final ServletMappingMetaData servletMapping = new ServletMappingMetaData();
- servletMapping.setServletName( ep.getShortName() );
- servletMapping.setUrlPatterns( Arrays.asList( new String[] { ep.getURLPattern()
} ) ); // TODO:
+ servletMapping.setServletName(ep.getShortName());
+ servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern()
})); // TODO:
- servletMappings.add( servletMapping );
+ servletMappings.add(servletMapping);
}
}
@@ -306,13 +306,13 @@
* @param jbossWebMD jboss web meta data
* @return servlets meta data
*/
- private JBossServletsMetaData getServlets( final JBossWebMetaData jbossWebMD )
+ private JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
{
JBossServletsMetaData servlets = jbossWebMD.getServlets();
- if ( servlets == null )
+ if (servlets == null)
{
servlets = new JBossServletsMetaData();
- jbossWebMD.setServlets( servlets );
+ jbossWebMD.setServlets(servlets);
}
return servlets;
@@ -326,13 +326,13 @@
* @param jbossWebMD jboss web meta data
* @return servlet mappings meta data
*/
- private List< ServletMappingMetaData > getServletMappings( final
JBossWebMetaData jbossWebMD )
+ private List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData
jbossWebMD)
{
- List< ServletMappingMetaData > servletMappings =
jbossWebMD.getServletMappings();
- if ( servletMappings == null )
+ List<ServletMappingMetaData> servletMappings =
jbossWebMD.getServletMappings();
+ if (servletMappings == null)
{
- servletMappings = new ArrayList< ServletMappingMetaData >();
- jbossWebMD.setServletMappings( servletMappings );
+ servletMappings = new ArrayList<ServletMappingMetaData>();
+ jbossWebMD.setServletMappings(servletMappings);
}
return servletMappings;
@@ -344,13 +344,13 @@
* @param jbossWebMD jboss web meta data
* @param dep webservice deployment
*/
- public final void setSecurityDomain( final JBossWebMetaData jbossWebMD, final
Deployment dep )
+ public final void setSecurityDomain(final JBossWebMetaData jbossWebMD, final
Deployment dep)
{
- final String securityDomain = this.getEjbSecurityMetaDataAccessor( dep
).getSecurityDomain( dep ); // TODO: review (javadoc)
+ final String securityDomain =
this.getEjbSecurityMetaDataAccessor(dep).getSecurityDomain(dep); // TODO: review
(javadoc)
- if ( securityDomain != null )
+ if (securityDomain != null)
{
- jbossWebMD.setSecurityDomain( securityDomain );
+ jbossWebMD.setSecurityDomain(securityDomain);
}
}
@@ -360,13 +360,13 @@
* @param jbossWebMD jboss web meta data
* @param dep webservice deployment
*/
- public final void setSecurityRoles( final JBossWebMetaData jbossWebMD, final
Deployment dep )
+ public final void setSecurityRoles(final JBossWebMetaData jbossWebMD, final Deployment
dep)
{
- final SecurityRolesMetaData securityRolesMD = this.getEjbSecurityMetaDataAccessor(
dep ).getSecurityRoles( dep ); // TODO: review (javadoc)
+ final SecurityRolesMetaData securityRolesMD =
this.getEjbSecurityMetaDataAccessor(dep).getSecurityRoles(dep); // TODO: review (javadoc)
- if ( securityRolesMD != null )
+ if (securityRolesMD != null)
{
- jbossWebMD.setSecurityRoles( securityRolesMD );
+ jbossWebMD.setSecurityRoles(securityRolesMD);
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -60,12 +60,12 @@
*
* @param dep webservice deployment
*/
- public void modify( final Deployment dep )
+ public void modify(final Deployment dep)
{
- final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep,
JBossWebMetaData.class );
+ final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep,
JBossWebMetaData.class);
- this.propagateContextProps( dep, jbossWebMD );
- this.configureEndpoints( dep, jbossWebMD );
+ this.propagateContextProps(dep, jbossWebMD);
+ this.configureEndpoints(dep, jbossWebMD);
}
/**
@@ -74,20 +74,19 @@
* @param dep webservice deployment
* @param jbossWebMD web meta data
*/
- @SuppressWarnings( "unchecked" )
- private void propagateContextProps( final Deployment dep, final JBossWebMetaData
jbossWebMD )
+ @SuppressWarnings("unchecked")
+ private void propagateContextProps(final Deployment dep, final JBossWebMetaData
jbossWebMD)
{
- final Map< String, String > stackContextParams = ( Map< String, String
> )
- dep.getProperty( WSConstants.STACK_CONTEXT_PARAMS );
+ final Map<String, String> stackContextParams = (Map<String,
String>)dep.getProperty(WSConstants.STACK_CONTEXT_PARAMS);
- if ( stackContextParams != null )
+ if (stackContextParams != null)
{
- final List< ParamValueMetaData > contextParams = this.getContextParams(
jbossWebMD );
+ final List<ParamValueMetaData> contextParams =
this.getContextParams(jbossWebMD);
- for ( Map.Entry< String, String > entry : stackContextParams.entrySet() )
+ for (Map.Entry<String, String> entry : stackContextParams.entrySet())
{
- final ParamValueMetaData newParam = this.newParameter( entry.getKey(),
entry.getValue() );
- contextParams.add( newParam );
+ final ParamValueMetaData newParam = this.newParameter(entry.getKey(),
entry.getValue());
+ contextParams.add(newParam);
}
}
}
@@ -98,28 +97,27 @@
* @param dep webservice deployment
* @param jbossWebMD web meta data
*/
- private void configureEndpoints( final Deployment dep, final JBossWebMetaData
jbossWebMD )
+ private void configureEndpoints(final Deployment dep, final JBossWebMetaData
jbossWebMD)
{
- final Iterator< JBossServletMetaData > servlets =
jbossWebMD.getServlets().iterator();
+ final Iterator<JBossServletMetaData> servlets =
jbossWebMD.getServlets().iterator();
- while ( servlets.hasNext() )
+ while (servlets.hasNext())
{
final ServletMetaData servletMD = servlets.next();
final ClassLoader loader = dep.getInitialClassLoader();
- final boolean isWebserviceEndpoint = ASHelper.getEndpointClass( servletMD,
loader ) != null;
+ final boolean isWebserviceEndpoint = ASHelper.getEndpointClass(servletMD,
loader) != null;
- if ( isWebserviceEndpoint )
+ if (isWebserviceEndpoint)
{
// set transport servlet
- servletMD.setServletClass( this.getTransportClassName( dep ) );
+ servletMD.setServletClass(this.getTransportClassName(dep));
// configure webservice endpoint
final String endpointClassName = servletMD.getServletClass();
- final List< ParamValueMetaData > initParams =
this.getServletInitParams( servletMD );
- final ParamValueMetaData endpointParam = this.newParameter(
- Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName );
+ final List<ParamValueMetaData> initParams =
this.getServletInitParams(servletMD);
+ final ParamValueMetaData endpointParam =
this.newParameter(Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName);
- initParams.add( endpointParam );
+ initParams.add(endpointParam);
}
}
}
@@ -131,13 +129,13 @@
* @return stack specific transport class name
* @throws IllegalStateException if transport class name is not found in deployment
properties map
*/
- private String getTransportClassName( final Deployment dep )
+ private String getTransportClassName(final Deployment dep)
{
- final String transportClassName = ( String ) dep.getProperty(
WSConstants.STACK_TRANSPORT_CLASS );
+ final String transportClassName =
(String)dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
- if ( transportClassName == null )
+ if (transportClassName == null)
{
- throw new IllegalStateException( "Cannot obtain deployment property: "
+ WSConstants.STACK_TRANSPORT_CLASS );
+ throw new IllegalStateException("Cannot obtain deployment property: "
+ WSConstants.STACK_TRANSPORT_CLASS);
}
return transportClassName;
@@ -150,11 +148,11 @@
* @param value the value
* @return new parameter
*/
- private ParamValueMetaData newParameter( final String key, final String value )
+ private ParamValueMetaData newParameter(final String key, final String value)
{
final ParamValueMetaData paramMD = new ParamValueMetaData();
- paramMD.setParamName( key );
- paramMD.setParamValue( value );
+ paramMD.setParamName(key);
+ paramMD.setParamValue(value);
return paramMD;
}
@@ -165,14 +163,14 @@
* @param servletMD servlet meta data
* @return servlet init params list
*/
- private List< ParamValueMetaData > getServletInitParams( final ServletMetaData
servletMD )
+ private List<ParamValueMetaData> getServletInitParams(final ServletMetaData
servletMD)
{
- List< ParamValueMetaData > initParams = servletMD.getInitParam();
+ List<ParamValueMetaData> initParams = servletMD.getInitParam();
- if ( initParams == null )
+ if (initParams == null)
{
- initParams = new ArrayList< ParamValueMetaData >();
- servletMD.setInitParam( initParams );
+ initParams = new ArrayList<ParamValueMetaData>();
+ servletMD.setInitParam(initParams);
}
return initParams;
@@ -184,14 +182,14 @@
* @param jbossWebMD web meta data
* @return context params list
*/
- private List< ParamValueMetaData > getContextParams( final JBossWebMetaData
jbossWebMD )
+ private List<ParamValueMetaData> getContextParams(final JBossWebMetaData
jbossWebMD)
{
- List< ParamValueMetaData > contextParams = jbossWebMD.getContextParams();
+ List<ParamValueMetaData> contextParams = jbossWebMD.getContextParams();
- if ( contextParams == null )
+ if (contextParams == null)
{
- contextParams = new ArrayList< ParamValueMetaData >();
- jbossWebMD.setContextParams( contextParams );
+ contextParams = new ArrayList<ParamValueMetaData>();
+ jbossWebMD.setContextParams(contextParams);
}
return contextParams;
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -49,9 +49,9 @@
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- this.webMetaDataModifier.modify( dep );
+ this.webMetaDataModifier.modify(dep);
}
}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-05
09:50:33 UTC (rev 10489)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-05
10:10:36 UTC (rev 10490)
@@ -47,7 +47,7 @@
{
/** Logger. */
- private static final Logger LOG = Logger.getLogger( ASHelper.class );
+ private static final Logger LOG = Logger.getLogger(ASHelper.class);
/**
* Forbidden constructor.
@@ -63,9 +63,9 @@
* @param unit deployment unit
* @return true if JAXWS JSE, JAXRPC JSE, JAXWS EJB or JAXRPC EJB deployment, false
otherwise.
*/
- public static boolean isWebServiceDeployment( final DeploymentUnit unit )
+ public static boolean isWebServiceDeployment(final DeploymentUnit unit)
{
- return ASHelper.getOptionalAttachment( unit, DeploymentType.class ) != null;
+ return ASHelper.getOptionalAttachment(unit, DeploymentType.class) != null;
}
/**
@@ -74,11 +74,11 @@
* @param unit deployment unit
* @return true if JAXRPC EJB deployment, false otherwise
*/
- public static boolean isJaxrpcEjbDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit,
DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit,
DeploymentType.class);
- return DeploymentType.JAXRPC_EJB21.equals( deploymentType );
+ return DeploymentType.JAXRPC_EJB21.equals(deploymentType);
}
/**
@@ -87,11 +87,11 @@
* @param unit deployment unit
* @return true if JAXRPC JSE deployment, false otherwise
*/
- public static boolean isJaxrpcJseDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit,
DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit,
DeploymentType.class);
- return DeploymentType.JAXRPC_JSE.equals( deploymentType );
+ return DeploymentType.JAXRPC_JSE.equals(deploymentType);
}
/**
@@ -100,11 +100,11 @@
* @param unit deployment unit
* @return true if JAXWS EJB deployment, false otherwise
*/
- public static boolean isJaxwsEjbDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit,
DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit,
DeploymentType.class);
- return DeploymentType.JAXWS_EJB3.equals( deploymentType );
+ return DeploymentType.JAXWS_EJB3.equals(deploymentType);
}
/**
@@ -113,11 +113,11 @@
* @param unit deployment unit
* @return true if JAXWS JSE deployment, false otherwise
*/
- public static boolean isJaxwsJseDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsJseDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit,
DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit,
DeploymentType.class);
- return DeploymentType.JAXWS_JSE.equals( deploymentType );
+ return DeploymentType.JAXWS_JSE.equals(deploymentType);
}
/**
@@ -126,10 +126,10 @@
* @param unit deployment unit
* @return true if either JAXWS JSE or JAXRPC JSE deployment, false otherwise.
*/
- public static boolean isJseDeployment( final DeploymentUnit unit )
+ public static boolean isJseDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment( unit );
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment( unit );
+ final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
+ final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
return isJaxwsJse || isJaxrpcJse;
}
@@ -140,10 +140,10 @@
* @param unit deployment unit
* @return true if either JAXWS EJB or JAXRPC EJB deployment, false otherwise
*/
- public static boolean isEjbDeployment( final DeploymentUnit unit )
+ public static boolean isEjbDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment( unit );
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment( unit );
+ final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+ final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
return isJaxwsEjb || isJaxrpcEjb;
}
@@ -154,10 +154,10 @@
* @param unit deployment unit
* @return true if either JAXWS EJB or JAXWS JSE deployment, false otherwise
*/
- public static boolean isJaxwsDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment( unit );
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment( unit );
+ final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+ final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
return isJaxwsEjb || isJaxwsJse;
}
@@ -168,10 +168,10 @@
* @param unit deployment unit
* @return true if either JAXRPC EJB or JAXRPC JSE deployment, false otherwise
*/
- public static boolean isJaxrpcDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcDeployment(final DeploymentUnit unit)
{
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment( unit );
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment( unit );
+ final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
+ final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
return isJaxrpcEjb || isJaxrpcJse;
}
@@ -182,9 +182,9 @@
* @param unit deployment unit
* @return list of JAXWS servlets meta data
*/
- public static List< ServletMetaData > getJaxwsServlets( final DeploymentUnit
unit )
+ public static List<ServletMetaData> getJaxwsServlets(final DeploymentUnit unit)
{
- return ASHelper.getWebServiceServlets( unit, true );
+ return ASHelper.getWebServiceServlets(unit, true);
}
/**
@@ -193,9 +193,9 @@
* @param unit deployment unit
* @return list of JAXRPC servlets meta data
*/
- public static List< ServletMetaData > getJaxrpcServlets( final DeploymentUnit
unit )
+ public static List<ServletMetaData> getJaxrpcServlets(final DeploymentUnit
unit)
{
- return ASHelper.getWebServiceServlets( unit, false );
+ return ASHelper.getWebServiceServlets(unit, false);
}
/**
@@ -204,18 +204,18 @@
* @param unit deployment unit
* @return list of JAXWS EJBs meta data
*/
- public static List< WebServiceDeclaration > getJaxwsEjbs( final DeploymentUnit
unit )
+ public static List<WebServiceDeclaration> getJaxwsEjbs(final DeploymentUnit
unit)
{
- final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment( unit,
WebServiceDeployment.class );
- final List< WebServiceDeclaration > endpoints = new ArrayList<
WebServiceDeclaration >();
+ final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment(unit,
WebServiceDeployment.class);
+ final List<WebServiceDeclaration> endpoints = new
ArrayList<WebServiceDeclaration>();
- final Iterator< WebServiceDeclaration > ejbIterator =
wsDeployment.getServiceEndpoints().iterator();
- while ( ejbIterator.hasNext() )
+ final Iterator<WebServiceDeclaration> ejbIterator =
wsDeployment.getServiceEndpoints().iterator();
+ while (ejbIterator.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbIterator.next();
- if ( ASHelper.isWebServiceBean( ejbContainer ) )
+ if (ASHelper.isWebServiceBean(ejbContainer))
{
- endpoints.add( ejbContainer );
+ endpoints.add(ejbContainer);
}
}
@@ -228,10 +228,10 @@
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
- public static boolean isWebServiceBean( final WebServiceDeclaration
ejbContainerAdapter )
+ public static boolean isWebServiceBean(final WebServiceDeclaration
ejbContainerAdapter)
{
- final boolean isWebService = ejbContainerAdapter.getAnnotation( WebService.class )
!= null;
- final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(
WebServiceProvider.class ) != null;
+ final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) !=
null;
+ final boolean isWebServiceProvider =
ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
return isWebService || isWebServiceProvider;
}
@@ -242,7 +242,7 @@
* @param servletMD servlet meta data
* @return endpoint class name
*/
- public static String getEndpointName( final ServletMetaData servletMD )
+ public static String getEndpointName(final ServletMetaData servletMD)
{
final String endpointClass = servletMD.getServletClass();
@@ -256,17 +256,17 @@
* @param servletName servlet name
* @return servlet meta data
*/
- public static ServletMetaData getServletForName( final JBossWebMetaData jbossWebMD,
final String servletName )
+ public static ServletMetaData getServletForName(final JBossWebMetaData jbossWebMD,
final String servletName)
{
- for ( JBossServletMetaData servlet : jbossWebMD.getServlets() )
+ for (JBossServletMetaData servlet : jbossWebMD.getServlets())
{
- if ( servlet.getName().equals( servletName ) )
+ if (servlet.getName().equals(servletName))
{
return servlet;
}
}
- throw new IllegalStateException( "Cannot find servlet for link: " +
servletName );
+ throw new IllegalStateException("Cannot find servlet for link: " +
servletName);
}
/**
@@ -276,26 +276,26 @@
* @param loader class loader
* @return webservice endpoint class or null
*/
- public static Class< ? > getEndpointClass( final ServletMetaData servletMD,
final ClassLoader loader )
+ public static Class<?> getEndpointClass(final ServletMetaData servletMD, final
ClassLoader loader)
{
- final String endpointClassName = ASHelper.getEndpointName( servletMD );
- final boolean notJSP = endpointClassName != null &&
endpointClassName.length() > 0;
+ final String endpointClassName = ASHelper.getEndpointName(servletMD);
+ final boolean notJSP = endpointClassName != null &&
endpointClassName.length() > 0;
- if ( notJSP )
+ if (notJSP)
{
try
{
- final Class< ? > endpointClass = loader.loadClass( endpointClassName
);
- final boolean notServlet = !Servlet.class.isAssignableFrom( endpointClass );
+ final Class<?> endpointClass = loader.loadClass(endpointClassName);
+ final boolean notServlet = !Servlet.class.isAssignableFrom(endpointClass);
- if ( notServlet )
+ if (notServlet)
{
return endpointClass;
}
}
- catch ( ClassNotFoundException cnfe )
+ catch (ClassNotFoundException cnfe)
{
- ASHelper.LOG.warn( "Cannot load servlet class: " +
endpointClassName, cnfe );
+ ASHelper.LOG.warn("Cannot load servlet class: " +
endpointClassName, cnfe);
}
}
@@ -311,18 +311,18 @@
* @return required attachment
* @throws IllegalStateException if attachment value is null
*/
- public static <A> A getRequiredAttachment( final DeploymentUnit unit, final
Class< A > key )
+ public static <A> A getRequiredAttachment(final DeploymentUnit unit, final
Class<A> key)
{
- final A value = unit.getAttachment( key );
- if ( value == null )
+ final A value = unit.getAttachment(key);
+ if (value == null)
{
- ASHelper.LOG.error( "Cannot find attachment in deployment unit: " +
key );
+ ASHelper.LOG.error("Cannot find attachment in deployment unit: " +
key);
throw new IllegalStateException();
}
-
+
return value;
}
-
+
/**
* Returns optional attachment value from deployment unit or null if not bound.
*
@@ -331,11 +331,11 @@
* @param key attachment key
* @return optional attachment value or null
*/
- public static <A> A getOptionalAttachment( final DeploymentUnit unit, final
Class< A > key )
+ public static <A> A getOptionalAttachment(final DeploymentUnit unit, final
Class<A> key)
{
- return unit.getAttachment( key );
+ return unit.getAttachment(key);
}
-
+
/**
* Returns true if deployment unit have attachment value associated with the
<b>key</b>.
*
@@ -343,9 +343,9 @@
* @param key attachment key
* @return true if contains attachment, false otherwise
*/
- public static boolean hasAttachment( final DeploymentUnit unit, final Class< ? >
key )
+ public static boolean hasAttachment(final DeploymentUnit unit, final Class<?>
key)
{
- return ASHelper.getOptionalAttachment( unit, key ) != null;
+ return ASHelper.getOptionalAttachment(unit, key) != null;
}
/**
@@ -355,28 +355,28 @@
* @param jaxws if passed value is <b>true</b> JAXWS servlets list will be
returned, otherwise JAXRPC servlets list
* @return either JAXRPC or JAXWS servlets list
*/
- private static List< ServletMetaData > getWebServiceServlets( final
DeploymentUnit unit, final boolean jaxws )
+ private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit
unit, final boolean jaxws)
{
- final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment( unit,
JBossWebMetaData.class );
+ final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment(unit,
JBossWebMetaData.class);
final ClassLoader loader = unit.getClassLoader();
- final List< ServletMetaData > endpoints = new ArrayList< ServletMetaData
>();
+ final List<ServletMetaData> endpoints = new
ArrayList<ServletMetaData>();
- for ( ServletMetaData servletMD : jbossWebMD.getServlets() )
+ for (ServletMetaData servletMD : jbossWebMD.getServlets())
{
- final Class< ? > endpointClass = ASHelper.getEndpointClass( servletMD,
loader );
+ final Class<?> endpointClass = ASHelper.getEndpointClass(servletMD,
loader);
- if ( endpointClass != null )
+ if (endpointClass != null)
{
// check webservice annotations
- final boolean isWebService = endpointClass.isAnnotationPresent(
WebService.class );
- final boolean isWebServiceProvider = endpointClass.isAnnotationPresent(
WebServiceProvider.class );
+ final boolean isWebService =
endpointClass.isAnnotationPresent(WebService.class);
+ final boolean isWebServiceProvider =
endpointClass.isAnnotationPresent(WebServiceProvider.class);
// detect webservice type
- final boolean isJaxwsEndpoint = jaxws && ( isWebService ||
isWebServiceProvider );
- final boolean isJaxrpcEndpoint = !jaxws && ( !isWebService &&
!isWebServiceProvider );
+ final boolean isJaxwsEndpoint = jaxws && (isWebService ||
isWebServiceProvider);
+ final boolean isJaxrpcEndpoint = !jaxws && (!isWebService &&
!isWebServiceProvider);
- if ( isJaxwsEndpoint || isJaxrpcEndpoint )
+ if (isJaxwsEndpoint || isJaxrpcEndpoint)
{
- endpoints.add( servletMD );
+ endpoints.add(servletMD);
}
}
}