Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/alicebot/server/core/processor/loadtime/PropertyProcessor.java


1   // Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov.
2   // Jad home page: http://www.geocities.com/kpdus/jad.html
3   // Decompiler options: packimports(3) 
4   
5   package org.alicebot.server.core.processor.loadtime;
6   
7   import org.alicebot.server.core.Bot;
8   import org.alicebot.server.core.parser.StartupFileParser;
9   import org.alicebot.server.core.parser.XMLNode;
10  import org.alicebot.server.core.util.Toolkit;
11  
12  // Referenced classes of package org.alicebot.server.core.processor.loadtime:
13  //            StartupElementProcessor, InvalidStartupElementException
14  
15  public class PropertyProcessor extends StartupElementProcessor
16  {
17  
18      public PropertyProcessor()
19      {
20      }
21  
22      public String process(int i, XMLNode xmlnode, StartupFileParser startupfileparser)
23          throws InvalidStartupElementException
24      {
25          if(xmlnode.XMLType == 1)
26          {
27              String s = Toolkit.getAttributeValue("name", xmlnode.XMLAttr);
28              if(!s.equals(""))
29              {
30                  String s1 = Toolkit.getAttributeValue("value", xmlnode.XMLAttr);
31                  startupfileparser.getCurrentBot().setPropertyValue(s, s1);
32              }
33          } else
34          {
35              throw new InvalidStartupElementException("<property/> cannot have contents!");
36          }
37          return "";
38      }
39  
40      public static final String label = "property";
41  }