Interface TemplateManager

All Superinterfaces:
AuditableRestAction<Void>, Manager<TemplateManager>, RestAction<Void>

public interface TemplateManager extends Manager<TemplateManager>
Manager providing functionality to update one or more fields for a Template.

Example

manager.setName("backup")
       .setDescription("backup for our server")
       .queue();
manager.reset(TemplateManager.DESCRIPTION | TemplateManager.NAME)
       .setName("server template")
       .setDescription(null)
       .queue();
See Also:
  • Field Details

  • Method Details

    • reset

      @Nonnull @CheckReturnValue TemplateManager reset(long fields)
      Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
      Example: manager.reset(TemplateManager.NAME | TemplateManager.DESCRIPTION);

      Flag Constants:

      Specified by:
      reset in interface Manager<TemplateManager>
      Parameters:
      fields - Integer value containing the flags to reset.
      Returns:
      TemplateManager for chaining convenience
    • reset

      @Nonnull @CheckReturnValue TemplateManager reset(@Nonnull long... fields)
      Resets the fields specified by the provided bit-flag patterns.
      Example: manager.reset(TemplateManager.NAME, TemplateManager.DESCRIPTION);

      Flag Constants:

      Specified by:
      reset in interface Manager<TemplateManager>
      Parameters:
      fields - Integer values containing the flags to reset.
      Returns:
      TemplateManager for chaining convenience
    • setName

      @Nonnull @CheckReturnValue TemplateManager setName(@Nonnull String name)
      Sets the name of this Template.
      Parameters:
      name - The new name for this Template
      Returns:
      TemplateManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided name is null or not between 1-100 characters long
    • setDescription

      @Nonnull @CheckReturnValue TemplateManager setDescription(@Nullable String description)
      Sets the description of this Template.
      Parameters:
      description - The new description for this Template
      Returns:
      TemplateManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided description is not between 0-120 characters long