1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.sharepoint.methods;
16  
17  import com.liferay.portal.sharepoint.Leaf;
18  import com.liferay.portal.sharepoint.Property;
19  import com.liferay.portal.sharepoint.ResponseElement;
20  import com.liferay.portal.sharepoint.SharepointRequest;
21  import com.liferay.portal.sharepoint.Tree;
22  
23  import java.util.ArrayList;
24  import java.util.List;
25  
26  /**
27   * <a href="ServerVersionMethodImpl.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Bruno Farache
30   */
31  public class ServerVersionMethodImpl extends BaseMethodImpl {
32  
33      public ServerVersionMethodImpl() {
34          Tree serverVersionTree = new Tree();
35  
36          serverVersionTree.addChild(new Leaf("major ver", "6", true));
37          serverVersionTree.addChild(new Leaf("minor ver", "0", true));
38          serverVersionTree.addChild(new Leaf("phase ver", "2", true));
39          serverVersionTree.addChild(new Leaf("ver incr", "8117", true));
40  
41          Property serverVersionProperty = new Property(
42              getMethodName(), serverVersionTree);
43  
44          _elements.add(serverVersionProperty);
45          _elements.add(new Property("source control", "1"));
46      }
47  
48      public String getMethodName() {
49          return _METHOD_NAME;
50      }
51  
52      protected List<ResponseElement> getElements(
53          SharepointRequest sharepointRequest) {
54  
55          return _elements;
56      }
57  
58      private static final String _METHOD_NAME = "server version";
59  
60      private List<ResponseElement> _elements = new ArrayList<ResponseElement>();
61  
62  }