Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
AuthListerQuery.php
Go to the documentation of this file.
1 <?php
2 
5 
11 
51  class AuthListerQuery extends \StructuredDynamics\osf\php\api\framework\WebServiceQuery
52  {
61  function __construct($network, $appID, $apiKey, $userID)
62  {
63  // Set the OSF network & credentials to use for this query.
64  $this->setNetwork($network);
65  $this->appID = $appID;
66  $this->apiKey = $apiKey;
67  $this->userID = $userID;
68 
69  // Set default configarations for this web service query
70  $this->setSupportedMimes(array("text/xml",
71  "application/json",
72  "application/rdf+xml",
73  "application/rdf+n3",
74  "application/iron+json",
75  "application/iron+csv"));
76 
77  $this->setMethodGet();
78 
79  $this->mime("resultset");
80 
81  $this->setEndpoint("auth/lister");
82 
83  // Set default parameters for this query
84  $this->getDatasetsUri();
85  $this->includeAllWebServiceUris();
86  $this->sourceInterface("default");
87  }
88 
99  public function getDatasetsUri()
100  {
101  $this->params["mode"] = "dataset";
102 
103  return($this);
104  }
105 
115  {
116  $this->params["mode"] = "ws";
117 
118  return($this);
119  }
120 
131  public function getDatasetGroupsAccesses($datasetUri)
132  {
133  $this->params["mode"] = "access_dataset";
134  $this->params["dataset"] = urlencode($datasetUri);
135 
136  return($this);
137  }
138 
147  public function getUserAccesses()
148  {
149  $this->params["mode"] = "access_user";
150 
151  return($this);
152  }
153 
162  public function getGroupAccesses($group)
163  {
164  $this->params["mode"] = "access_group";
165 
166  $this->params["group"] = urlencode($group);
167 
168  return($this);
169  }
170 
178  public function getGroups()
179  {
180  $this->params["mode"] = "groups";
181 
182  return($this);
183  }
184 
192  public function getGroupUsers($group)
193  {
194  $this->params["mode"] = "group_users";
195 
196  $this->params["group"] = urlencode($group);
197 
198  return($this);
199  }
200 
208  public function getUserGroups()
209  {
210  $this->params["mode"] = "user_groups";
211 
212  return($this);
213  }
214 
226  public function includeAllWebServiceUris()
227  {
228  $this->params["target_webservice"] = "all";
229 
230  return($this);
231  }
232 
240  public function includeNoWebServiceUris()
241  {
242  $this->params["target_webservice"] = "none";
243 
244  return($this);
245  }
246 
256  public function includeTargerWebServiceUri($uri)
257  {
258  $this->params["target_webservice"] = urlencode($uri);
259 
260  return($this);
261  }
262  }
263 
265 ?>
getGroupAccesses($group)
Specifies that this query will return all the datasets URI currently existing, and accessible by the ...
getUserAccesses()
Specifies that this query will return all the datasets URI currently existing, and accessible by the ...
includeAllWebServiceUris()
Specifies if you want to get all the WebService URIs along with all the access records.
getUserGroups()
Specifies that this query will return all the groups where the user is registered to...
getGroups()
Specifies that this query will return all the groups currently defined in the OSF instance...
getDatasetGroupsAccesses($datasetUri)
Specifies that this query will return all the group access records in the OSF network instance...
getDatasetsUri()
Specifies that this query will return all the datasets URI currently existing, and accessible by the ...
includeTargerWebServiceUri($uri)
Specifies which target web service you want to include in the resultset.
includeNoWebServiceUris()
Specifies if you do not want to include any web service URIs for the access records.
__construct($network, $appID, $apiKey, $userID)
Constructor.
getRegisteredWebServiceEndpointsUri()
Specifies that this query will return all the web service endpoints URI currently registered to this ...
getGroupUsers($group)
Specifies that this query will return all the users registered to a group.
Auth Lister Query to a OSF Auth Lister web service endpoint.