org.sca4j.introspection
Class DefaultIntrospectionContext

java.lang.Object
  extended by org.sca4j.introspection.DefaultIntrospectionContext
All Implemented Interfaces:
IntrospectionContext, org.sca4j.scdl.ValidationContext

public class DefaultIntrospectionContext
extends java.lang.Object
implements IntrospectionContext

Default implementation of an IntrospectionContext.

Version:
$Rev: 4336 $ $Date: 2008-05-25 10:06:15 +0100 (Sun, 25 May 2008) $

Constructor Summary
DefaultIntrospectionContext(java.lang.ClassLoader classLoader, java.net.URI contributionUri, java.net.URL scdlLocation)
          Constructor defining properties of this context.
DefaultIntrospectionContext(java.lang.ClassLoader targetClassLoader, java.net.URL sourceBase, java.lang.String targetNamespace, java.net.URI contributionUri, TypeMapping typeMapping)
           
DefaultIntrospectionContext(IntrospectionContext parentContext, java.lang.String targetNamespace)
          Initializes from a parent context.
DefaultIntrospectionContext(IntrospectionContext parentContext, TypeMapping typeMapping)
          Initializes from a parent context.
DefaultIntrospectionContext(java.net.URI contributionUri, java.lang.ClassLoader classLoader, java.lang.String targetNamespace)
           
 
Method Summary
 void addError(org.sca4j.host.contribution.ValidationFailure<?> e)
           
 void addErrors(java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> errors)
           
 void addWarning(org.sca4j.host.contribution.ValidationFailure<?> e)
           
 void addWarnings(java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> warnings)
           
 java.net.URI getContributionUri()
          Returns the active contribution URI.
 java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> getErrors()
           
 java.net.URL getSourceBase()
          Returns the location of the SCDL definition being deployed.
 java.lang.ClassLoader getTargetClassLoader()
          Returns a class loader that can be used to load application resources.
 java.lang.String getTargetNamespace()
          Target namespace for this loader context.
 TypeMapping getTypeMapping()
          Returns the mappings from formal to actual types for the component being introspected.
 java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> getWarnings()
           
 boolean hasErrors()
           
 boolean hasWarnings()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIntrospectionContext

public DefaultIntrospectionContext(java.lang.ClassLoader targetClassLoader,
                                   java.net.URL sourceBase,
                                   java.lang.String targetNamespace,
                                   java.net.URI contributionUri,
                                   TypeMapping typeMapping)

DefaultIntrospectionContext

public DefaultIntrospectionContext(java.net.URI contributionUri,
                                   java.lang.ClassLoader classLoader,
                                   java.lang.String targetNamespace)

DefaultIntrospectionContext

public DefaultIntrospectionContext(java.lang.ClassLoader classLoader,
                                   java.net.URI contributionUri,
                                   java.net.URL scdlLocation)
Constructor defining properties of this context.

Parameters:
classLoader - the classloader for loading application resources
contributionUri - the active contribution URI
scdlLocation - the location of the SCDL defining this composite

DefaultIntrospectionContext

public DefaultIntrospectionContext(IntrospectionContext parentContext,
                                   java.lang.String targetNamespace)
Initializes from a parent context.

Parameters:
parentContext - Parent context.
targetNamespace - Target namespace.

DefaultIntrospectionContext

public DefaultIntrospectionContext(IntrospectionContext parentContext,
                                   TypeMapping typeMapping)
Initializes from a parent context.

Parameters:
parentContext - Parent context.
typeMapping - mapping of formal types
Method Detail

hasErrors

public boolean hasErrors()
Specified by:
hasErrors in interface org.sca4j.scdl.ValidationContext

getErrors

public java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> getErrors()
Specified by:
getErrors in interface org.sca4j.scdl.ValidationContext

addError

public void addError(org.sca4j.host.contribution.ValidationFailure<?> e)
Specified by:
addError in interface org.sca4j.scdl.ValidationContext

addErrors

public void addErrors(java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> errors)
Specified by:
addErrors in interface org.sca4j.scdl.ValidationContext

hasWarnings

public boolean hasWarnings()
Specified by:
hasWarnings in interface org.sca4j.scdl.ValidationContext

getWarnings

public java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> getWarnings()
Specified by:
getWarnings in interface org.sca4j.scdl.ValidationContext

addWarning

public void addWarning(org.sca4j.host.contribution.ValidationFailure<?> e)
Specified by:
addWarning in interface org.sca4j.scdl.ValidationContext

addWarnings

public void addWarnings(java.util.List<org.sca4j.host.contribution.ValidationFailure<?>> warnings)
Specified by:
addWarnings in interface org.sca4j.scdl.ValidationContext

getTargetClassLoader

public java.lang.ClassLoader getTargetClassLoader()
Description copied from interface: IntrospectionContext
Returns a class loader that can be used to load application resources.

Specified by:
getTargetClassLoader in interface IntrospectionContext
Returns:
a class loader that can be used to load application resources

getSourceBase

public java.net.URL getSourceBase()
Description copied from interface: IntrospectionContext
Returns the location of the SCDL definition being deployed.

Specified by:
getSourceBase in interface IntrospectionContext
Returns:
the location of the SCDL definition being deployed

getTargetNamespace

public java.lang.String getTargetNamespace()
Description copied from interface: IntrospectionContext
Target namespace for this loader context.

Specified by:
getTargetNamespace in interface IntrospectionContext
Returns:
Target namespace.

getContributionUri

public java.net.URI getContributionUri()
Description copied from interface: IntrospectionContext
Returns the active contribution URI.

Specified by:
getContributionUri in interface IntrospectionContext
Returns:
the active contribution URI

getTypeMapping

public TypeMapping getTypeMapping()
Description copied from interface: IntrospectionContext
Returns the mappings from formal to actual types for the component being introspected.

Specified by:
getTypeMapping in interface IntrospectionContext
Returns:
the mappings from formal to actual types for the component being introspected


Copyright © 2008-2011 Service Symphony. All Rights Reserved.