|
Franz Inc, AllegroGraph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.franz.agraph.repository.AGServer
public class AGServer
The starting point for interacting with an
AllegroGraph server.
An AGServer references
AGCatalog
s,
which reference
AGRepositories
, from which
connections
may be obtained,
on which data is manipulated and queried.
AGServer provides methods for User (and Role) Management.
AGServer also provides federated
repositories.
Constructor Summary | |
---|---|
AGServer(com.franz.agraph.http.AGHTTPClient httpClient)
Creates an instance for interacting with an AllegroGraph server. |
|
AGServer(String serverURL)
Creates an instance for interacting with an AllegroGraph server. |
|
AGServer(String username,
String password,
com.franz.agraph.http.AGHTTPClient httpClient)
Creates an instance for interacting with an AllegroGraph server. |
|
AGServer(String serverURL,
String username,
String password)
Creates an instance for interacting with an AllegroGraph server. |
Method Summary | |
---|---|
void |
addRole(String role)
Adds a role to this server. |
void |
addRoleAccess(String role,
boolean read,
boolean write,
String catalog,
String repository)
Adds to a role's access list for this server. |
void |
addRolePermission(String role,
String permission)
Adds to a role's permission list. |
void |
addRoleSecurityFilter(String role,
String type,
String s,
String p,
String o,
String g)
Adds a security filter for a role. |
void |
addUser(String user,
String password)
Adds a user to the server. |
void |
addUserAccess(String user,
boolean read,
boolean write,
String catalog,
String repository)
Adds to a user's access list for this server. |
void |
addUserPermission(String user,
String permission)
Adds to a user's permission list. |
void |
addUserRole(String user,
String role)
Adds a role for this user. |
void |
addUserSecurityFilter(String user,
String type,
String s,
String p,
String o,
String g)
Adds a security filter for a user. |
void |
changeUserPassword(String user,
String password)
|
void |
close()
Close the HTTP connection resources to the AllegroGraph server. |
AGCatalog |
createCatalog(String catalogID)
Returns an AGCatalog instance for the given catalogID. |
void |
deleteCatalog(String catalogID)
Deletes any catalog with the given repository id. |
void |
deleteRole(String role)
Deletes a role from this server. |
void |
deleteRoleAccess(String role,
boolean read,
boolean write,
String catalog,
String repository)
Deletes from a role's access list for this server. |
void |
deleteRolePermission(String role,
String permission)
Delete from a role's permission list. |
void |
deleteRoleSecurityFilter(String role,
String type,
String s,
String p,
String o,
String g)
Deletes a security filter for a role. |
void |
deleteUser(String user)
Deletes a user from the server. |
void |
deleteUserAccess(String user,
boolean read,
boolean write,
String catalog,
String repository)
Deletes from a user's access list for this server. |
void |
deleteUserPermission(String user,
String permission)
Deletes from a user's permission list. |
void |
deleteUserRole(String user,
String role)
Deletes a role for this user. |
void |
deleteUserSecurityFilter(String user,
String type,
String s,
String p,
String o,
String g)
Deletes a security filter for a user. |
AGVirtualRepository |
federate(AGAbstractRepository... repositories)
Creates a federated view of multiple repositories. |
String |
getBuildDate()
Returns the server's build date. |
AGCatalog |
getCatalog()
Returns the unnamed root catalog for this AllegroGraph server. |
AGCatalog |
getCatalog(String catalogID)
Gets the catalog instance for a given catalog id. |
com.franz.agraph.http.AGHTTPClient |
getHTTPClient()
Returns the AGHTTPClient instance for this server. |
String |
getRevision()
Returns the server's revision info. |
AGCatalog |
getRootCatalog()
Returns the unnamed root catalog for this AllegroGraph server. |
String |
getServerURL()
Returns the URL of this AllegroGraph server. |
String |
getVersion()
Returns the server version. |
List<String> |
listCatalogs()
Returns a List of catalog ids known to this AllegroGraph server. |
org.json.JSONArray |
listRoleAccess(String role)
Returns a role's access list for this server. |
List<String> |
listRolePermissions(String role)
Returns a list of permissions for a role. |
List<String> |
listRoles()
Returns a list of roles known to this server. |
org.json.JSONArray |
listRoleSecurityFilters(String role,
String type)
Returns a list of security filters of the given type for a role |
org.json.JSONArray |
listUserAccess(String user)
Returns a user's access list for this server. |
org.json.JSONArray |
listUserEffectiveAccess(String user)
Returns a user's effective access list for this server. |
List<String> |
listUserEffectivePermissions(String user)
Returns a list of effective permissions for a user. |
List<String> |
listUserPermissions(String user)
Returns a list of permissions for a user. |
List<String> |
listUserRoles(String user)
Returns a list of roles for a user. |
List<String> |
listUsers()
Returns a List of user ids known to this AllegroGraph server. |
org.json.JSONArray |
listUserSecurityFilters(String user,
String type)
Returns a list of security filters of the given type for a user |
AGVirtualRepository |
virtualRepository(String storeSpec)
Creates a virtual repository with the given store specification. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AGServer(String serverURL, String username, String password)
serverURL
- the URL of the server (trailing slashes are removed).username
- a user id for authenticating with the serverpassword
- a password for authenticating with the serverAGServer(String)
public AGServer(String username, String password, com.franz.agraph.http.AGHTTPClient httpClient)
username
- a user id for authenticating with the serverpassword
- a password for authenticating with the serverhttpClient
- the AGHTTPClient instance to usepublic AGServer(com.franz.agraph.http.AGHTTPClient httpClient)
Attempts X.509 server and client authentication when no username and password have been set in the httpClient, and properties such as
have been set appropriately.
javax.net.ssl.keyStore,
javax.net.ssl.keyStorePassword,
javax.net.ssl.keyStoreType, and
javax.net.ssl.trustStore
Also set SSL directives in the server's config file, e.g:
For more details, see Server configuration.
SSLPort 10036
SSLClientAuthRequired true
SSLClientAuthUsernameField CN
SSLCertificate /path/agraph.cert
SSLCAFile /path/ca.cert
httpClient
- the AGHTTPClient instance to useAGServer(String)
public AGServer(String serverURL)
Uses a new default AGHTTPClient instance having the given serverURL.
Attempts X.509 server and client authentication when properties such as
have been set appropriately.
javax.net.ssl.keyStore,
javax.net.ssl.keyStorePassword,
javax.net.ssl.keyStoreType, and
javax.net.ssl.trustStore
Also set SSL directives in the server's config file, e.g:
For more details, see Server configuration.
SSLPort 10036
SSLClientAuthRequired true
SSLClientAuthUsernameField CN
SSLCertificate /path/agraph.cert
SSLCAFile /path/ca.cert
serverURL
- the URL of the server (trailing slashes are removed).AGServer(String, String, String)
,
AGServer(AGHTTPClient)
Method Detail |
---|
public String getServerURL()
public com.franz.agraph.http.AGHTTPClient getHTTPClient()
public String getVersion() throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public String getBuildDate() throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public String getRevision() throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public AGCatalog getRootCatalog()
getCatalog()
public List<String> listCatalogs() throws com.franz.agraph.http.exception.AGHttpException
org.openrdf.OpenRDFException
com.franz.agraph.http.exception.AGHttpException
public AGCatalog getCatalog(String catalogID) throws com.franz.agraph.http.exception.AGHttpException
catalogID
- a catalog id.
com.franz.agraph.http.exception.AGHttpException
public AGCatalog getCatalog()
public AGCatalog createCatalog(String catalogID) throws com.franz.agraph.http.exception.AGHttpException
catalogID
- the id (the name) of the catalog
com.franz.agraph.http.exception.AGHttpException
public void deleteCatalog(String catalogID) throws com.franz.agraph.http.exception.AGHttpException
catalogID
- the name of the catalog to delete.
com.franz.agraph.http.exception.AGHttpException
public AGVirtualRepository virtualRepository(String storeSpec)
The storeSpec parameter is a string using the minilanguage for store specification described in the HTTP protocol document (see the store parameter there).
This syntax can be used to create federations, graph-filtered stores, reasoning stores, and compositions thereof.
storeSpec
- the store specificationpublic AGVirtualRepository federate(AGAbstractRepository... repositories)
public void close()
close
in interface Closeable
Closeable.close()
public List<String> listUsers() throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public void addUser(String user, String password) throws com.franz.agraph.http.exception.AGHttpException
user
- user id to addpassword
- user's password
com.franz.agraph.http.exception.AGHttpException
public void deleteUser(String user) throws com.franz.agraph.http.exception.AGHttpException
user
- user id to delete
com.franz.agraph.http.exception.AGHttpException
public void addUserAccess(String user, boolean read, boolean write, String catalog, String repository) throws com.franz.agraph.http.exception.AGHttpException
Access is documented here.
user
- user idread
- read accesswrite
- write accesscatalog
- catalog id, or "*" (or null) for all catalogsrepository
- repository id, or "*" (or null) for all repos, in the given catalog(s)
com.franz.agraph.http.exception.AGHttpException
public void deleteUserAccess(String user, boolean read, boolean write, String catalog, String repository) throws com.franz.agraph.http.exception.AGHttpException
Access is documented here.
user
- user idread
- read accesswrite
- write accesscatalog
- catalog id, or "*" (or null) for all catalogsrepository
- repository id, or "*" (or null) for all repos, in the given catalog(s)
com.franz.agraph.http.exception.AGHttpException
public org.json.JSONArray listUserAccess(String user) throws com.franz.agraph.http.exception.AGHttpException
Access is documented here.
user
- user id
com.franz.agraph.http.exception.AGHttpException
public void addUserSecurityFilter(String user, String type, String s, String p, String o, String g) throws com.franz.agraph.http.exception.AGHttpException
user
- user idtype
- filter type is "allow" or "disallow"s
- subject to allow/disallow, in NTriples formatp
- predicate to allow/disallow, in NTriples formato
- object to allow/disallow, in NTriples formatg
- graph to allow/disallow, in NTriples format
com.franz.agraph.http.exception.AGHttpException
public void deleteUserSecurityFilter(String user, String type, String s, String p, String o, String g) throws com.franz.agraph.http.exception.AGHttpException
user
- user idtype
- filter type is "allow" or "disallow"s
- subject to allow/disallow, in NTriples formatp
- predicate to allow/disallow, in NTriples formato
- object to allow/disallow, in NTriples formatg
- graph to allow/disallow, in NTriples format
com.franz.agraph.http.exception.AGHttpException
public org.json.JSONArray listUserSecurityFilters(String user, String type) throws com.franz.agraph.http.exception.AGHttpException
user
- user idtype
- filter type is "allow" or "disallow"
com.franz.agraph.http.exception.AGHttpException
public void changeUserPassword(String user, String password)
public org.json.JSONArray listUserEffectiveAccess(String user) throws com.franz.agraph.http.exception.AGHttpException
Includes the access granted to roles that this user has.
user
- user id
com.franz.agraph.http.exception.AGHttpException
public List<String> listUserPermissions(String user) throws com.franz.agraph.http.exception.AGHttpException
Permissions are documented here.
user
- user id
com.franz.agraph.http.exception.AGHttpException
public List<String> listUserEffectivePermissions(String user) throws com.franz.agraph.http.exception.AGHttpException
Includes the permission granted to roles that this user has.
Permissions are documented here.
user
- user id
com.franz.agraph.http.exception.AGHttpException
public void addUserPermission(String user, String permission) throws com.franz.agraph.http.exception.AGHttpException
user
- user idpermission
- "super" or "eval" or "session"
com.franz.agraph.http.exception.AGHttpException
public void deleteUserPermission(String user, String permission) throws com.franz.agraph.http.exception.AGHttpException
user
- user idpermission
- "super" or "eval" or "session"
com.franz.agraph.http.exception.AGHttpException
public List<String> listRoles() throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public void addRole(String role) throws com.franz.agraph.http.exception.AGHttpException
role
- role id
com.franz.agraph.http.exception.AGHttpException
public void addRoleAccess(String role, boolean read, boolean write, String catalog, String repository) throws com.franz.agraph.http.exception.AGHttpException
Access is documented here.
role
- role idread
- read accesswrite
- write accesscatalog
- catalog id, or "*" (or null) for all catalogsrepository
- repository id, or "*" (or null) for all repos, in the given catalog(s)
com.franz.agraph.http.exception.AGHttpException
public org.json.JSONArray listRoleAccess(String role) throws com.franz.agraph.http.exception.AGHttpException
Access is documented here.
role
- role id
com.franz.agraph.http.exception.AGHttpException
public void addRoleSecurityFilter(String role, String type, String s, String p, String o, String g) throws com.franz.agraph.http.exception.AGHttpException
role
- role idtype
- filter type is "allow" or "disallow"s
- subject to allow/disallow, in NTriples formatp
- predicate to allow/disallow, in NTriples formato
- object to allow/disallow, in NTriples formatg
- graph to allow/disallow, in NTriples format
com.franz.agraph.http.exception.AGHttpException
public org.json.JSONArray listRoleSecurityFilters(String role, String type) throws com.franz.agraph.http.exception.AGHttpException
role
- role idtype
- filter type is "allow" or "disallow"
com.franz.agraph.http.exception.AGHttpException
public void deleteRoleSecurityFilter(String role, String type, String s, String p, String o, String g) throws com.franz.agraph.http.exception.AGHttpException
role
- role idtype
- filter type is "allow" or "disallow"s
- subject to allow/disallow, in NTriples formatp
- predicate to allow/disallow, in NTriples formato
- object to allow/disallow, in NTriples formatg
- graph to allow/disallow, in NTriples format
com.franz.agraph.http.exception.AGHttpException
public List<String> listUserRoles(String user) throws com.franz.agraph.http.exception.AGHttpException
com.franz.agraph.http.exception.AGHttpException
public void addUserRole(String user, String role) throws com.franz.agraph.http.exception.AGHttpException
user
- user idrole
- role id
com.franz.agraph.http.exception.AGHttpException
public void deleteUserRole(String user, String role) throws com.franz.agraph.http.exception.AGHttpException
user
- user idrole
- role id
com.franz.agraph.http.exception.AGHttpException
public void deleteRoleAccess(String role, boolean read, boolean write, String catalog, String repository) throws com.franz.agraph.http.exception.AGHttpException
role
- role idread
- read accesswrite
- write accesscatalog
- catalog id, or "*" (or null) for all catalogsrepository
- repository id, or "*" (or null) for all repos, in the given catalog(s)
com.franz.agraph.http.exception.AGHttpException
public void deleteRole(String role) throws com.franz.agraph.http.exception.AGHttpException
role
- role id
com.franz.agraph.http.exception.AGHttpException
public void addRolePermission(String role, String permission) throws com.franz.agraph.http.exception.AGHttpException
role
- role idpermission
- "super" or "eval" or "session"
com.franz.agraph.http.exception.AGHttpException
public void deleteRolePermission(String role, String permission) throws com.franz.agraph.http.exception.AGHttpException
role
- role idpermission
- "super" or "eval" or "session"
com.franz.agraph.http.exception.AGHttpException
public List<String> listRolePermissions(String role) throws com.franz.agraph.http.exception.AGHttpException
Permissions are documented here.
role
- role id
com.franz.agraph.http.exception.AGHttpException
|
Copyright © 2008-2012 Franz Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |