Record Class HandlerMappingDescriptor
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.api.plugins.web.HandlerMappingDescriptor
- Record Components:
baseUrl- base url part used for matching requests that should be handled by specified mappings. Will map urls: [/rest/{baseUrl}/, /plugin/{baseUrl}/]handlerMappings- collection ofHandlerMappingexactMatchOnly- if true mapping in provided handlerMappings must match full url, if false mapping can skip base url
- All Implemented Interfaces:
FeatureDescriptor
public record HandlerMappingDescriptor(String baseUrl, Collection<org.springframework.web.servlet.HandlerMapping> handlerMappings, boolean exactMatchOnly)
extends Record
implements FeatureDescriptor
Registers spring based
HandlerMappings under specified base url.
Used to register custom spring based endpoints. It allows to develop endpoints with Spring MVC as in any other Spring application. The base usage example with spring-plugin-activator that automatically exports feature descriptors:
-
Constructor Summary
ConstructorsConstructorDescriptionHandlerMappingDescriptor(String baseUrl, Collection<org.springframework.web.servlet.HandlerMapping> handlerMappings) HandlerMappingDescriptor(String baseUrl, Collection<org.springframework.web.servlet.HandlerMapping> handlerMappings, boolean exactMatchOnly) Creates an instance of aHandlerMappingDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexactMatchOnlyrecord component.getName()Unique name for descriptor in scope of plugin.Collection<org.springframework.web.servlet.HandlerMapping>Returns the value of thehandlerMappingsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HandlerMappingDescriptor
public HandlerMappingDescriptor(String baseUrl, Collection<org.springframework.web.servlet.HandlerMapping> handlerMappings, boolean exactMatchOnly) Creates an instance of aHandlerMappingDescriptorrecord class.- Parameters:
baseUrl- the value for thebaseUrlrecord componenthandlerMappings- the value for thehandlerMappingsrecord componentexactMatchOnly- the value for theexactMatchOnlyrecord component
-
HandlerMappingDescriptor
public HandlerMappingDescriptor(String baseUrl, Collection<org.springframework.web.servlet.HandlerMapping> handlerMappings)
-
-
Method Details
-
getName
Description copied from interface:FeatureDescriptorUnique name for descriptor in scope of plugin. If descriptor can repeat, then different names need to be returned for each one.- Specified by:
getNamein interfaceFeatureDescriptor- Returns:
- unique name of feature descriptor
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
handlerMappings
Returns the value of thehandlerMappingsrecord component.- Returns:
- the value of the
handlerMappingsrecord component
-
exactMatchOnly
public boolean exactMatchOnly()Returns the value of theexactMatchOnlyrecord component.- Returns:
- the value of the
exactMatchOnlyrecord component
-