Class IMServerConfigurationConversionFunction
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.admin.imserver.IMServerConfigurationConversionFunction
-
- All Implemented Interfaces:
RestConversionFunction<InstantMessagingServerDefinition,RestIMServerConfiguration>
@Component public class IMServerConfigurationConversionFunction extends Object implements RestConversionFunction<InstantMessagingServerDefinition,RestIMServerConfiguration>
Function to convertInstantMessagingServerDefinition
toRestIMServerConfiguration
- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description IMServerConfigurationConversionFunction(com.atlassian.sal.api.message.I18nResolver i18nResolver, LinkService linkService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull RestIMServerConfiguration
apply(@NotNull InstantMessagingServerDefinition input, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo)
Transforms a domain object to aAbstractRestModel
.InstantMessagingServerDefinition
merge(@NotNull RestIMServerConfiguration restIMServerConfiguration, @NotNull InstantMessagingServerDefinition imServerDef)
Update existingInstantMessagingServerDefinition
withRestIMServerConfiguration
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.plugins.rest.common.RestConversionFunction
toFunction
-
-
-
-
Constructor Detail
-
IMServerConfigurationConversionFunction
@Autowired public IMServerConfigurationConversionFunction(com.atlassian.sal.api.message.I18nResolver i18nResolver, LinkService linkService)
-
-
Method Detail
-
apply
@NotNull public @NotNull RestIMServerConfiguration apply(@NotNull @NotNull InstantMessagingServerDefinition input, @NotNull @NotNull Expansion expansion, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:RestConversionFunction
Transforms a domain object to aAbstractRestModel
. The resource will include links.- Specified by:
apply
in interfaceRestConversionFunction<InstantMessagingServerDefinition,RestIMServerConfiguration>
- Parameters:
input
- The domain object to transformexpansion
- The expansion to use when transforming the objecturiInfo
- URI info from the request- Returns:
- a RestResource
-
merge
public InstantMessagingServerDefinition merge(@NotNull @NotNull RestIMServerConfiguration restIMServerConfiguration, @NotNull @NotNull InstantMessagingServerDefinition imServerDef) throws WebValidationException
Update existingInstantMessagingServerDefinition
withRestIMServerConfiguration
- Parameters:
restIMServerConfiguration
-imServerDef
-- Returns:
- Updated im server configuration
- Throws:
WebValidationException
-
-