Пример #1
0
    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
 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.resource_path), self)
Пример #3
0
    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.resource_path), self)
        return view
Пример #4
0
    def get_by_id(self, view_id):
        """Gets the list view with the specified ID.

        :type view_id: str
        """
        return View(
            self.context,
            ResourcePathServiceOperation("GetById", [view_id],
                                         self.resource_path), self._parent)
Пример #5
0
    def get_by_title(self, view_title):
        """Gets the list view with the specified title.

        :type view_title: str
        """
        return View(
            self.context,
            ResourcePathServiceOperation("GetByTitle", [view_title],
                                         self.resource_path), self._parent)
Пример #6
0
 def default_view(self):
     """Gets or sets a value that specifies whether the list view is the default list view."""
     return self.properties.get(
         'DefaultView',
         View(self.context, ResourcePath("DefaultView", self.resource_path),
              self))