1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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="OpenServiceMethodImpl.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Bruno Farache
30   */
31  public class OpenServiceMethodImpl extends BaseMethodImpl {
32  
33      public OpenServiceMethodImpl() {
34          Tree metaInfoTree = new Tree();
35  
36          metaInfoTree.addChild(new Leaf("vti_casesensitiveurls", "IX|0", false));
37          metaInfoTree.addChild(new Leaf("vti_longfilenames", "IX|1", false));
38          metaInfoTree.addChild(
39              new Leaf("vti_welcomenames", "VX|index.html", false));
40          metaInfoTree.addChild(new Leaf("vti_username", "SX|joebloggs", false));
41          metaInfoTree.addChild(new Leaf("vti_servertz", "SX|-0700", false));
42          metaInfoTree.addChild(
43              new Leaf("vti_sourcecontrolsystem", "SR|lw", false));
44          metaInfoTree.addChild(
45              new Leaf("vti_sourcecontrolversion", "SR|V1", false));
46          metaInfoTree.addChild(
47              new Leaf("vti_doclibwebviewenabled", "IX|0", false));
48          metaInfoTree.addChild(
49              new Leaf("vti_sourcecontrolcookie", "SX|fp_internal", false));
50          metaInfoTree.addChild(
51              new Leaf(
52                  "vti_sourcecontrolproject", "SX|&#60;STS-based Locking&#62;",
53                  false));
54  
55          Tree serviceTree = new Tree();
56  
57          serviceTree.addChild(new Leaf("service_name", "/sharepoint", true));
58          serviceTree.addChild(new Leaf("meta_info", metaInfoTree));
59  
60          Property serviceProperty = new Property("service", serviceTree);
61  
62          _elements.add(serviceProperty);
63      }
64  
65      public String getMethodName() {
66          return _METHOD_NAME;
67      }
68  
69      protected List<ResponseElement> getElements(
70          SharepointRequest sharepointRequest) {
71  
72          return _elements;
73      }
74  
75      private static final String _METHOD_NAME = "open service";
76  
77      private List<ResponseElement> _elements = new ArrayList<ResponseElement>();
78  
79  }