Class SharedConfigurationResource


  • @Path("/configurations")
    @Consumes("application/json")
    @Produces("application/json")
    @Controller
    public class SharedConfigurationResource
    extends java.lang.Object
    Configuration objects are used to externalize configuration that can be referenced by custom script tasks.

    One can declare new configuration types by adding it in the synthetic file

    • Constructor Summary

      Constructors 
      Constructor Description
      SharedConfigurationResource​(SharedConfigurationService sharedConfigurationService, com.xebialabs.xlrelease.security.PermissionChecker permissions, ConfigurationItemViewConverter configurationViewConverter, com.xebialabs.xlrelease.service.SharedConfigurationStatusService sharedConfigurationStatusService, com.xebialabs.xlrelease.service.ConfigurationAutoconfigService configurationAutoconfigService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.xebialabs.xlrelease.views.ConfigurationView addInstance​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      Creates a new configuration instance
      com.xebialabs.xlrelease.views.AutoconfigResponse autoconfigure​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)  
      com.xebialabs.xlrelease.views.SharedConfigurationStatusResponse checkConnection​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)  
      void deleteInstance​(java.lang.String configurationInstanceId)
      Deletes a configuration instance
      java.util.List<com.xebialabs.deployit.plugin.api.reflect.Descriptor> getDescriptors()
      Return the list of configuration types declared in synthetic file
      com.xebialabs.xlrelease.views.ConfigurationView getInstance​(java.lang.String configurationInstanceId)
      Returns a configuration instance
      java.util.List<com.xebialabs.xlrelease.views.ConfigurationView> getInstances​(boolean anonymized)
      Return the list of configuration instance
      java.util.List<ReferencedType> getReferenceVariableTypes()  
      java.lang.Boolean hasScript​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)  
      java.lang.Boolean isAutoconfigure​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)  
      com.xebialabs.xlrelease.views.ConfigurationView updateInstance​(java.lang.String configurationInstanceId, com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      Updates a configuration instance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SharedConfigurationResource

        @Autowired
        public SharedConfigurationResource​(SharedConfigurationService sharedConfigurationService,
                                           com.xebialabs.xlrelease.security.PermissionChecker permissions,
                                           ConfigurationItemViewConverter configurationViewConverter,
                                           com.xebialabs.xlrelease.service.SharedConfigurationStatusService sharedConfigurationStatusService,
                                           com.xebialabs.xlrelease.service.ConfigurationAutoconfigService configurationAutoconfigService)
    • Method Detail

      • getDescriptors

        @GET
        @Timed
        @Path("descriptors")
        public java.util.List<com.xebialabs.deployit.plugin.api.reflect.Descriptor> getDescriptors()
        Return the list of configuration types declared in synthetic file
        Returns:
        a list of type descriptor
      • getInstances

        @GET
        public java.util.List<com.xebialabs.xlrelease.views.ConfigurationView> getInstances​(@QueryParam("anonymized")
                                                                                            boolean anonymized)
        Return the list of configuration instance
        Parameters:
        anonymized - a boolean indicating whether the credentials should be stripped or not
        Returns:
        a list of configuration instance possibly anonymized
      • addInstance

        @POST
        public com.xebialabs.xlrelease.views.ConfigurationView addInstance​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
        Creates a new configuration instance
        Parameters:
        configurationView - the information required to create the new instance
        Returns:
        the created instance
      • getInstance

        @GET
        @Timed
        @Path("{configurationInstanceId:((?!descriptors).)*}")
        public com.xebialabs.xlrelease.views.ConfigurationView getInstance​(@PathParam("configurationInstanceId")
                                                                           java.lang.String configurationInstanceId)
        Returns a configuration instance
        Parameters:
        configurationInstanceId - the configuration instance identifier
        Returns:
        the configuration instance
      • updateInstance

        @PUT
        @Timed
        @Path("{configurationInstanceId:((?!descriptors).)*}")
        public com.xebialabs.xlrelease.views.ConfigurationView updateInstance​(@PathParam("configurationInstanceId")
                                                                              java.lang.String configurationInstanceId,
                                                                              com.xebialabs.xlrelease.views.ConfigurationView configurationView)
        Updates a configuration instance
        Parameters:
        configurationInstanceId - the configuration instance identifier
        configurationView - the changes to apply
        Returns:
        the updated configuration instance
      • deleteInstance

        @DELETE
        @Timed
        @Path("{configurationInstanceId}")
        public void deleteInstance​(@PathParam("configurationInstanceId")
                                   java.lang.String configurationInstanceId)
        Deletes a configuration instance
        Parameters:
        configurationInstanceId - the configuration identifier
      • checkConnection

        @Timed
        @Path("status")
        @POST
        public com.xebialabs.xlrelease.views.SharedConfigurationStatusResponse checkConnection​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      • hasScript

        @Timed
        @Path("hasScript")
        @POST
        public java.lang.Boolean hasScript​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      • autoconfigure

        @Timed
        @Path("autoconfigure")
        @POST
        public com.xebialabs.xlrelease.views.AutoconfigResponse autoconfigure​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      • isAutoconfigure

        @Timed
        @Path("isAutoconfigure")
        @POST
        public java.lang.Boolean isAutoconfigure​(com.xebialabs.xlrelease.views.ConfigurationView configurationView)
      • getReferenceVariableTypes

        @Timed
        @Path("referenceVariable/types")
        @GET
        public java.util.List<ReferencedType> getReferenceVariableTypes()