Google Search Appliance Policy ACL API Developers Guide Manuel d'utilisateur Page 9

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 24
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 8
Google Search Appliance: Policy ACL API Developer’s Guide Policy ACL API Developer’s Guide 9
Retrieving ACL Rules
To retrieve all ACL rules:
GsaFeed feed = myClient.getFeed("policyAcls");
for(GsaEntry entry : feed.getEntries()) {
System.out.println("Url Pattern: " + entry.getGsaContent("urlPattern"));
System.out.println("ACL rules: " + entry.getGsaContent("acl"));
}
To retrieve an ACL rule for a URL pattern:
GsaEntry entry = myClient.getEntry("policyAcls", "http://example.com");
System.out.println("Url Pattern: " + entry.getGsaContent("urlPattern"));
System.out.println("ACL rules: " + entry.getGsaContent("acl"));
To retrieve an ACL rule for a URL pattern in the protocol buffer format:
GsaEntry entry = new GsaEntry();
entry.addGsaContent("urlPattern", "http://abc2.com");
entry.addGsaContent("acl", "group:testGroup user:john");
myClient.updateEntry("policyAcls", "http://example.com", entry);
Updating an ACL Rule
To update an ACL rule:
GsaEntry entry = new GsaEntry();
entry.addGsaContent("urlPattern", "http://abc2.com");
entry.addGsaContent("acl", "group:testGroup user:john");
myClient.updateEntry("policyAcls", "http://example.com", entry);
Deleting an ACL Rule
To delete an ACL rule:
myClient.deleteEntry("policyAcls", "http://example.com");
Group and Member API
The code in the sections that follow specifies which users and groups are allowed to access a URL
pattern that you set in the pattern ACL API.
Creating a Group
To create a new group:
// Create group "testGroup"
GsaEntry groupEntry = new GsaEntry();
groupEntry.addProperty("groupId", "testGroup");
service.insert(new URL("http://Search_Appliance:8000/a/feeds/group/2.0/domain/
"), groupEntry);
Vue de la page 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 23 24

Commentaires sur ces manuels

Pas de commentaire

Canon EOS-1D manuali

Manuali dei proprietari e guide per l'utente per Lettori DVD Canon EOS-1D.
We fornisce manuali pdf Canon EOS-1D per scaricare gratuitamente in base al tipo di documento:






Più prodotti e manuali per Lettori DVD Canon

Modelli Tipo di Documento
Nessuno