1 /*
2 * Copyright 2003 - 2013 The eFaps Team
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 * Revision: $Rev$
17 * Last Changed: $Date$
18 * Last Changed By: $Author$
19 */
20
21 package org.efaps.update.schema.user;
22
23 import java.net.URL;
24 import java.util.List;
25 import java.util.Map;
26
27 import org.efaps.update.AbstractUpdate;
28 import org.efaps.util.EFapsException;
29
30 /**
31 * @author The eFaps Team
32 * @version $Id$
33 */
34 public class GroupUpdate
35 extends AbstractUpdate
36 {
37 /**
38 *
39 * @param _url URL of the file
40 */
41 public GroupUpdate(final URL _url)
42 {
43 super(_url, "Admin_User_Group");
44 }
45
46 /**
47 * Creates new instance of class {@link CompanyDefinition}.
48 *
49 * @return new definition instance
50 * @see CompanyDefinition
51 */
52 @Override
53 protected AbstractDefinition newDefinition()
54 {
55 return new GroupDefinition();
56 }
57
58 /**
59 *
60 */
61 public class GroupDefinition
62 extends AbstractDefinition
63 {
64 @Override
65 protected void readXML(final List<String> _tags,
66 final Map<String, String> _attributes,
67 final String _text)
68 throws EFapsException
69 {
70 final String value = _tags.get(0);
71 if ("status".equals(value)) {
72 addValue("Status", _text);
73 } else {
74 super.readXML(_tags, _attributes, _text);
75 }
76 }
77 }
78 }