This public method returns a boolean result indicating whether or not the handler supports the context object identified by the (case-sensitive) key value.
@param key a
String
liquibase.change.Change.supports()
Return true if this Change object supports the passed database. Used by the ChangeLog parsing process.
liquibase.change.ChangeParameterMetaData.supports()
net.sf.ezmorph.Morpher.supports()
net.sf.jportlet.portlet.descriptor.PortletDescriptor.supports()
org.apache.axis2.jaxws.feature.ClientConfigurator.supports()
Indicates whether the configurator supports the specified binding.
@param binding the binding to test
@return true
if the configurator supports the binding, false
otherwise.
org.apache.axis2.jaxws.feature.ServerConfigurator.supports()
Indicates whether the configurator supports the specified binding.
@param bindingId the binding id to test
@return true
if the configurator supports the binding id, false
otherwise.
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigStatsOutputSizeReader.supports()
Returns whether the given PSStore is supported by this output size reader or not.
@param sto POStore
@param conf Configuration
org.apache.shindig.social.core.util.JsonObjectToMapMorpher.supports()
@param clazz the class being checked
@return true if this morpher supports the class
org.eclipse.jst.jsf.context.symbol.source.AbstractContextSymbolFactory.supports()
org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration.supports()
org.geoserver.security.GeoServerAuthenticationProvider.supports()
org.geotools.filter.FilterCapabilities.supports()
Determines if the filter passed in is supported.
@param filter The Filter to be tested.
@return true if supported, false otherwise.
org.grails.validation.GrailsDomainClassValidator.supports()
org.hornetq.core.protocol.core.Channel.supports()
For protocol check
org.jasig.portal.channels.error.error2xml.IThrowableToElement.supports()
Returns true if the implementation knows how to translate an instance of the given class into an Element (throwableToElement() will return non-null) for instances of the class, which must extend Throwable). Returns false if the implementation will return null for throwableToNode() on an instance of the class. Throws IllegalArgumentException if c is not a class which extends Throwable. Throws IllegalArgumentException if c is null.
@param c a Class extending Throwable
@return true if handles instances of c, false otherwise
@throws IllegalArgumentException if c is null or does not extend Throwable
org.jbpm.pvm.internal.type.Variable.supports()
org.jbpm.pvm.type.Variable.supports()
org.mokai.Processor.supports()
Tells whether a message is supported by this processor or not.
@param message the {@link Message} to be tested
@return true if the message is supported, false otherwise.
org.mokai.connector.RoundRobinProcessor.supports()
org.mokai.connector.smpp.SmppConnector.supports()
org.mule.api.EndpointAnnotationParser.supports()
Determines whether this parser can process the current annotation. The clazz and member params are passed in so that further validation be done on the location, type or name of these elements.
@param annotation the annotation being processed
@param clazz the class on which the annotation was found
@param member the member on which the annotation was found inside the class. This is only set when the annotationwas either set on a {@link java.lang.reflect.Method}, {@link java.lang.reflect.Field} or {@link java.lang.reflect.Constructor}class member, otherwise this value is null.
@return true if this parser supports the current annotation, false otherwise
org.mule.api.security.SecurityProvider.supports()
org.mule.api.transaction.Transaction.supports()
@param key transactional resource key (i.e jdbc DataSource or jms Connection)
@param resource transactional resource (i.e. jdbc Connection or jms Session)
@return true if the current transaction supports to bind transactional resources key and resource
org.openengsb.domain.authentication.AuthenticationDomain.supports()
checks whether the given credentials are supported by this connector
org.opentides.bean.BaseReportValidator.supports()
org.rioproject.system.capability.platform.StorageCapability.supports()
Determine if the requested available diskspace can be met by the StorageCapability
@param requestedSize The request amount of disk space
@return Return true is the available amount of disk space is less thenthe request amount
org.sonar.api.issue.action.Action.supports()
org.springframework.data.repository.query.spi.Function.supports()
Returns {@literal true} if the function can be called with the given {@code argumentTypes}.
@param argumentTypes
@return
org.springframework.hateoas.EntityLinks.supports()
org.springframework.hateoas.RelProvider.supports()
org.springframework.oxm.GenericMarshaller.supports()
Indicates whether this marshaller can marshal instances of the supplied generic type.
@param genericType the type that this marshaller is being asked if it can marshal
@return true
if this marshaller can indeed marshal instances of the supplied type;false
otherwise
org.springframework.oxm.GenericUnmarshaller.supports()
Indicates whether this marshaller can marshal instances of the supplied generic type.
@param genericType the type that this marshaller is being asked if it can marshal
@return true
if this marshaller can indeed marshal instances of the supplied type;false
otherwise
org.springframework.oxm.Marshaller.supports()
Indicates whether this marshaller can marshal instances of the supplied type.
@param clazz the class that this marshaller is being asked if it can marshal
@return true
if this marshaller can indeed marshal instances of the supplied class;false
otherwise
org.springframework.oxm.Unmarshaller.supports()
Indicates whether this unmarshaller can unmarshal instances of the supplied type.
@param clazz the class that this unmarshaller is being asked if it can marshal
@return true
if this unmarshaller can indeed unmarshal to the supplied class;false
otherwise
org.springframework.security.access.AccessDecisionVoter.supports()
Indicates whether this {@code AccessDecisionVoter} is able to vote on the passed {@code ConfigAttribute}.
This allows the {@code AbstractSecurityInterceptor} to check every configuration attribute can be consumed bythe configured {@code AccessDecisionManager} and/or {@code RunAsManager} and/or {@code AfterInvocationManager}.
@param attribute a configuration attribute that has been configured against the{@code AbstractSecurityInterceptor}
@return true if this {@code AccessDecisionVoter} can support the passed configuration attribute
org.springframework.security.access.intercept.AfterInvocationManager.supports()
Indicates whether this
AfterInvocationManager
is able to process "after invocation" requests presented with the passed
ConfigAttribute
.
This allows the AbstractSecurityInterceptor
to check every configuration attribute can be consumed by the configured AccessDecisionManager
and/or RunAsManager
and/or AfterInvocationManager
.
@param attribute a configuration attribute that has been configured against the
AbstractSecurityInterceptor
@return true if this
AfterInvocationManager
can support the passed configuration attribute
org.springframework.security.access.intercept.AfterInvocationProviderManager.supports()
org.springframework.security.access.intercept.NullRunAsManager.supports()
org.springframework.security.access.intercept.RunAsManager.supports()
Indicates whether this
RunAsManager
is able to process the passed
ConfigAttribute
.
This allows the AbstractSecurityInterceptor
to check every configuration attribute can be consumed by the configured AccessDecisionManager
and/or RunAsManager
and/or AfterInvocationManager
.
@param attribute a configuration attribute that has been configured against the
AbstractSecurityInterceptor
@return
true
if this
RunAsManager
can support the passed configuration attribute
org.springframework.security.access.vote.AuthenticatedVoter.supports()
org.springframework.security.access.vote.RoleVoter.supports()
org.springframework.security.authentication.AnonymousAuthenticationProvider.supports()
org.springframework.security.authentication.RememberMeAuthenticationProvider.supports()
org.springframework.security.authentication.TestingAuthenticationProvider.supports()
org.springframework.security.web.access.channel.ChannelDecisionManagerImpl.supports()
org.springframework.security.web.access.channel.InsecureChannelProcessor.supports()
org.springframework.security.web.access.channel.SecureChannelProcessor.supports()
org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider.supports()
Indicate that this provider only supports PreAuthenticatedAuthenticationToken (sub)classes.
org.springframework.validation.Validator.supports()
Can this {@link Validator} {@link #validate(Object,Errors) validate}instances of the supplied
clazz
?
This method is typically implemented like so:
return Foo.class.isAssignableFrom(clazz);
(Where
Foo
is the class (or superclass) of the actual object instance that is to be {@link #validate(Object,Errors) validated}.)
@param clazz the {@link Class} that this {@link Validator} isbeing asked if it can {@link #validate(Object,Errors) validate}
@return
true
if this {@link Validator} can indeed{@link #validate(Object,Errors) validate} instances of thesupplied
clazz
org.springframework.ws.transport.WebServiceMessageSender.supports()
Does this {@link WebServiceMessageSender} support the supplied URI?
@param uri the URI to be checked
@return {@code true} if this {@code WebServiceMessageSender} supports the supplied URI
org.springmodules.validation.bean.conf.loader.xml.handler.ClassValidationElementHandler.supports()
Determines whether this handler can handle the given element.
@param element The element to be handled.
@param clazz The validated class.
@return true
if this handler can handle the given element, false
otherwise.
org.springmodules.validation.bean.conf.loader.xml.handler.PropertyValidationElementHandler.supports()
Determines whether this handler can handle the given element.
@param element The element to be handled.
@param clazz The validated clazz.
@param descriptor The property descriptor of the validated property.
@return true
if this handler can handle the given element, false
otherwise.
org.switchyard.policy.Policy.supports()
Returns whether the policy type passed in parameter is supported by this policy.
@param type policy type
@return policy type
org.switchyard.serial.graph.Factory.supports()
Whether this factory supports the specified type.
@param type the type
@return if the type is supported
weka.core.Capabilities.supports()
Returns true if the currently set capabilities support at least all of the capabiliites of the given Capabilities object (checks only the enum!)
@param c the capabilities to support at least
@return true if all the requested capabilities are supported
| */
@Test
public void supports() {
ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
Sheet sheet = sheet("legacy-rule.xls");
assertThat(extractor.supports(sheet), is(true));
}
/**
* not supported.
*/
|
| */
@Test
public void supports_not() {
ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
Sheet sheet = sheet("invalid.xls");
assertThat(extractor.supports(sheet), is(false));
}
/**
* total condition - ignore.
* @throws Exception if failed
|
|
}
//测试情况4,测试当认证管理器中的认证处理器列表不为null,列表有一个认证处理器,但是不支持该凭据的情况。
AuthenticationHandler handler = Mockito.mock(AuthenticationHandler.class);
Mockito.when(handler.supports(credential)).thenReturn(false);
try{
authenticationHandlers = new ArrayList<AuthenticationHandler>();
authenticationHandlers.add(handler);
authenticationManager.setAuthenticationHandlers(authenticationHandlers);
authenticationManager.authenticate(credential);
|
| handler = Mockito.mock(AuthenticationHandler.class);
Mockito.when(handler.supports(credential)).thenReturn(true);
Mockito.when(handler.authenticate(credential)).thenReturn(true);
CredentialToPrincipalResolver resolver = Mockito.mock(CredentialToPrincipalResolver.class);
Principal principal = Mockito.mock(Principal.class);
Mockito.when(resolver.supports(credential)).thenReturn(true);
Mockito.when(resolver.resolvePrincipal(credential)).thenReturn(principal);
try{
authenticationHandlers = new ArrayList<AuthenticationHandler>();
authenticationHandlers.add(handler);
authenticationManager.setAuthenticationHandlers(authenticationHandlers);
|
| // 3) abstract interfaces
//
if (entry instanceof ValueEntry)
{
ValueEntry v = (ValueEntry) entry;
if ((v.supports ().size () == 0) ||
((InterfaceEntry) v.supports ().elementAt (0)).isAbstract ()) {
return;
}
}
if (((InterfaceEntry) entry).isAbstract ()) {
|
|
@Override
protected Packet getResponse(Packet request, Exception e, WSDLPort port, WSBinding binding) {
Packet response = super.getResponse(request, e, port, binding);
if (e instanceof HTTPException) {
if (response.supports(MessageContext.HTTP_RESPONSE_CODE)) {
response.put(MessageContext.HTTP_RESPONSE_CODE, ((HTTPException)e).getStatusCode());
}
}
return response;
}
|
|
@Override
protected Packet getResponse(Packet request, Exception e, WSDLPort port, WSBinding binding) {
Packet response = super.getResponse(request, e, port, binding);
if (e instanceof HTTPException) {
if (response.supports(MessageContext.HTTP_RESPONSE_CODE)) {
response.put(MessageContext.HTTP_RESPONSE_CODE, ((HTTPException)e).getStatusCode());
}
}
return response;
}
|
|
if (this.offline)
{
BeanService service = Application.getBootLoader().getBootable(BeanService.class);
SynchronizeEngine engine = service.get(SynchronizeEngine.class);
this.syncAvail = engine.supports(SynchronizeJobKontoauszug.class,konto);
// checken, ob wir Addon-Properties haben
if (this.syncAvail)
{
try
|
| }
public void testConstraintCreation() {
Constraint validatorConstraint = new ValidatorConstraint();
assertEquals(ConstrainedProperty.VALIDATOR_CONSTRAINT, validatorConstraint.getName());
assertTrue(validatorConstraint.supports(TestClass.class));
assertFalse(validatorConstraint.supports(null));
validatorConstraint.setOwningClass(TestClass.class);
validatorConstraint.setPropertyName(PROP_NAME);
|
| {
if (key == null)
throw new IllegalArgumentException("invalid key");
PolicyContextHandler handler =
(PolicyContextHandler) handlerTable.get(key);
if (handler == null || !handler.supports(key))
throw new IllegalArgumentException("unknown handler key");
java.lang.SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new SecurityPermission("setPolicy"));
|
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact
coftware#gmail.com.