View Javadoc
1   package com.github.mikkoi.maven.plugins.enforcer.rule.propertyusage.configuration;
2   
3   import javax.annotation.Nonnull;
4   import java.util.Collection;
5   import java.util.Collections;
6   
7   public class Templates {
8   
9       /**
10       * Replace template property name placeholder with this when searching for properties.
11       */
12      public static final String PROPERTY_NAME_REGEXP = "([a-z0-9\\-\\.]{1,}?)";
13  
14      /**
15       * Default property name placeholder string to replace in template.
16       */
17      public static final String DEFAULT_REPLACE_IN_TEMPLATE_WITH_PROPERTY_NAME = "REPLACE_THIS";
18  
19      private Templates() {
20  		// This class cannot be instantiated.
21  		throw new AssertionError();
22      }
23  
24      /**
25       * Get Default value
26       *
27       * @return collection of strings
28       */
29      @Nonnull
30      public static Collection<String> getDefault() {
31          return Collections.singleton("\"" + DEFAULT_REPLACE_IN_TEMPLATE_WITH_PROPERTY_NAME + "\"");
32      }
33  
34  }
35