View Javadoc

1   /*
2    * Copyright 2008 FatWire Corporation. All Rights Reserved.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.fatwire.gst.foundation.facade.runtag.asset;
18  
19  import com.fatwire.gst.foundation.facade.runtag.AbstractTagRunner;
20  
21  /**
22   * Wrapper around the ASSET.CREATE tag
23   * 
24   * @author Mike Field
25   * @since Jun 11, 2008
26   */
27  public final class AssetCreate extends AbstractTagRunner {
28  
29      // Default Constructor
30      public AssetCreate() {
31          super("ASSET.CREATE");
32      }
33  
34      /**
35       * Sets name to the value of <code>s</code>
36       * 
37       * @param s The name of the asset instance
38       */
39      public void setName(String s) {
40          // validate first
41          if (s == null || s.length() == 0) {
42              throw new IllegalArgumentException("Invalid string for Name: " + s);
43          }
44          this.set("NAME", s);
45      }
46  
47      /**
48       * Sets the type to the asset to <code>s</code>
49       * 
50       * @param s The name of the asset type
51       */
52      public void setType(String s) {
53          // validate first
54          if (s == null || s.length() == 0) {
55              throw new IllegalArgumentException("Invalid string for Type: " + s);
56          }
57          this.set("TYPE", s);
58      }
59  
60  }