示例#1
0
 def add(self, view_creation_information):
     view = View(self.context, None, self._parent_list)
     view._parent_collection = self
     qry = ServiceOperationQuery(self, "Add", None,
                                 view_creation_information, "parameters",
                                 view)
     self.context.add_query(qry)
     return view
    def add(self, view_creation_information):
        """

        :type view_creation_information: office365.sharepoint.view_create_information.ViewCreationInformation
        """
        view = View(self.context, None, self._parent_list)
        view._parent_collection = self
        qry = ServiceOperationQuery(self, "Add", None,
                                    view_creation_information, "parameters",
                                    view)
        self.context.add_query(qry)
        return view
示例#3
0
 def get_view(self, view_id):
     """Returns the list view with the specified view identifier."""
     view = View(
         self.context,
         ResourcePathServiceOperation(self.context, self.resource_path,
                                      "getview", [view_id]))
     return view
 def defaultView(self):
     """Gets or sets a value that specifies whether the list view is the default list view."""
     if self.is_property_available('DefaultView'):
         return self.properties['DefaultView']
     else:
         return View(self.context,
                     ResourcePath("DefaultView", self.resourcePath), self)
示例#5
0
 def get_by_id(self, view_id):
     """Gets the list view with the specified ID."""
     return View(
         self.context,
         ResourcePathServiceOperation("GetById", [view_id],
                                      self.resource_path),
         self._parent_list)
示例#6
0
 def get_by_title(self, view_title):
     """Gets the list view with the specified title."""
     return View(
         self.context,
         ResourcePathServiceOperation("GetByTitle", [view_title],
                                      self.resource_path),
         self._parent_list)
 def get_view(self, view_id):
     """Returns the list view with the specified view identifier.
     :type view_id: str
     """
     view = View(
         self.context,
         ResourcePathServiceOperation("getView", [view_id],
                                      self.resourcePath), self)
     return view
示例#8
0
 def get_by_title(self, view_title):
     """Gets the list view with the specified title."""
     resourcePath = self.resource_path + "/getbytitle('{0}')".format(
         view_title)
     view = View(self.context, resourcePath)
     return view
示例#9
0
 def get_by_id(self, view_id):
     """Gets the list view with the specified ID."""
     resourcePath = self.resource_path + "/getbyid('{0}')".format(view_id)
     view = View(self.context, resourcePath)
     return view