|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The middleware level API for the SURLStat Catalog component.
This is the interface that this service exposes
to the other middleware components, not directly to the user.
Invariant for RCEntry
SURLEntry
s (can be empty)
GUIDStat
Method Summary | |
void |
addGuidReplica(java.lang.String guid,
SURLEntry[] newSurls)
Adds a list of new SURLs for existing entry in the catalog, keyed on the GUID. |
void |
createGuid(RCEntry[] entries)
Creates a set of new mappings in the Replica catalog. |
Permission |
getDefaultGlobalPermission()
Gets the global default permissions. |
Permission |
getDefaultPrincipalPermission(java.lang.String principal)
Get the default permissions for user. |
StringPair[] |
getGuidForSurl(java.lang.String[] surls)
Returns the {SURL,GUID} pair for a given SURL. |
GUIDStat[] |
getGuidStat(java.lang.String[] guids)
Gets list of GUIDStat {see @GUIDStat} objects for given GUID. |
StringPair[] |
getMasterReplica(java.lang.String[] guids)
Returns the master SURL for a given GUID. |
SURLEntry[] |
getSurlStat(java.lang.String[] surls)
Gets list of SURLStat objects for given SURLs |
StringBoolean[] |
hasGuid(java.lang.String[] guids)
Convenience method to check the existence of a GUID in the catalog. |
RCEntry[] |
listReplicasByGuid(java.lang.String[] guids,
boolean withPermissions)
Returns list of all valid RCEntry for given
list of GUIDs. |
StringPair[] |
listSurlsByGuid(java.lang.String[] guids)
Returns list {GUID,SURL} pairs for given GUIDs. |
void |
removeGuid(java.lang.String[] guids)
Removes GUID with all existing mappings from the catalog. |
void |
removeGuidReplica(StringPair[] guidSurls,
boolean removeGuidOnLastReplica)
Removes specified mappings. |
void |
setDefaultGlobalPermission(Permission defaultPermission)
Sets the global default permissions. |
void |
setDefaultPrincipalPermission(java.lang.String principal,
Permission defaultPermission)
Default permissions for user. |
void |
setMasterReplica(StringPair[] guidSurls)
Sets one of existing SURLs as master for a given guid. |
void |
updateGuidStat(java.lang.String[] guids,
GUIDStat[] stats)
Bulk method to update GUID stat objects. |
void |
updateStatus(java.lang.String[] guids,
int status,
int mask)
Set the status flags for the given GUID. |
void |
updateSurlStat(java.lang.String guid,
SURLEntry[] surlStats)
Sets SURLStat objects on a given GUID. |
Methods inherited from interface org.glite.data.catalog.service.fas.FASBase |
checkPermission, getPermission, setPermission |
Methods inherited from interface org.glite.data.catalog.service.ServiceBase |
getInterfaceVersion, getSchemaVersion, getServiceMetadata, getVersion |
Method Detail |
public void createGuid(RCEntry[] entries) throws InternalException, AuthorizationException, ExistsException, InvalidArgumentException
RCEntry
object contains the GUID, its stat and a list of
SURLEntry
objects giving all information about the SURLs associated with the given GUID.
entries
- list of mapping entities (RCEntry
)
AuthorizationException
- No right to add new entries.
ExistsException
- A SURL or GUID already exists in the catalog.
InvalidArgumentException
- The status information in the entry is invalid.
InternalException
- InvalidArgumentException
ExistsException
.
ExistsException
.
AuthorizationException
.
public void addGuidReplica(java.lang.String guid, SURLEntry[] newSurls) throws InternalException, AuthorizationException, ExistsException, InvalidArgumentException
guid
- existing GUID we add SURLS fornewSurls
- list of new SurlStats for an already existing GUID
AuthorizationException
- No right to add new SURLs to an existing replica.
ExistsException
- The GUID-SURL pair already exists.
InvalidArgumentException
- The status information for the new SURL is invalid.
InternalException
- InvalidArgumentException
NotExistsException
.
AuthorizationException
.
ExistsException
.
InvalidArgumentException
public void updateGuidStat(java.lang.String[] guids, GUIDStat[] stats) throws InternalException, AuthorizationException, InvalidArgumentException, NotExistsException
guids
- list of GUIDs to updatestats
- list of GUIDStat containing the update
AuthorizationException
- No right to update the replica status information.
InvalidArgumentException
- The status information for the GUID is invalid.
NotExistsException
- The GUID does not exists.
InternalException
- InvalidArgumentException
NotExistsException
AuthorizationException
.
public void updateSurlStat(java.lang.String guid, SURLEntry[] surlStats) throws InternalException, AuthorizationException, InvalidArgumentException, NotExistsException
guid
- GUID to set SURLStat forsurlStats
- generic properties of a lsit of SURLs to be set
AuthorizationException
- No right to update the replica status information.
InvalidArgumentException
- The status information for the SURL is invalid.
NotExistsException
- The GUID or a SURL does not exists.
InternalException
- NotExistsException
AuthorizationException
.
InvalidArgumentException
NotExistsException
public void setMasterReplica(StringPair[] guidSurls) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guidSurls
- list of StringPair
objects.
The first string is the GUID, the second the master SURL to be set.
AuthorizationException
- No right to update the replica status information.
NotExistsException
- Either the GUID does not exist or the given SURL is not a registered replica of the GUID.
InvalidArgumentException
- The GUID or SURL of an entry is malformed.
InternalException
- NotExistsException
.
InvalidArgumentException
AuthorizationException
.
public void updateStatus(java.lang.String[] guids, int status, int mask) throws InternalException, AuthorizationException, InvalidArgumentException, NotExistsException
guids
- GUIDs to set status for.status
- The status flag to set or cleared.mask
- The mask for the status bits to be set or cleared.
AuthorizationException
- No right to update the replica status information.
InvalidArgumentException
- The status information for the SURL is invalid.
NotExistsException
- The GUID to update does not exist.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
public void removeGuidReplica(StringPair[] guidSurls, boolean removeGuidOnLastReplica) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guidSurls
- list of StringPair
objects.
The first string is the GUID, the second is the SURL to be removed.removeGuidOnLastReplica
- tells the catalog whether the GUID should be removed if the last SURL is removed.
AuthorizationException
- No right to remove a replica from the given GUID.
NotExistsException
- Either the GUID does not exist or the given SURL is not a registered replica of the GUID.
InvalidArgumentException
- The GUID or SURL of an entry is malformed.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
InvalidArgumentException
.
AuthorizationException
.
public void removeGuid(java.lang.String[] guids) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guids
- The replica entries to be removed.
AuthorizationException
- No right to remove the replica entry from the catalog.
NotExistsException
- The GUID does not exist.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
InvalidArgumentException
public void setDefaultPrincipalPermission(java.lang.String principal, Permission defaultPermission) throws InternalException, AuthorizationException, InvalidArgumentException
setDefaultGlobalPermission
.
Sets permission policy for a user used while creating new RCEntries
with no permissions specified.
defaultPermission
- - permission object to be used while no permissions are specified
AuthorizationException
- No access right to update the default user permissions.
InvalidArgumentException
- The permission settings are invalid.
InternalException
- InvalidArgumentException
.
AuthorizationException
.
public void setDefaultGlobalPermission(Permission defaultPermission) throws InternalException, AuthorizationException, InvalidArgumentException
defaultPermission
- - permission object to be used while no permissions are specified and user in a context has not defaults set
AuthorizationException
- No access right to update the default permissions.
InvalidArgumentException
- The permission settings are invalid.
InternalException
- InvalidArgumentException
.
AuthorizationException
.
public StringPair[] getGuidForSurl(java.lang.String[] surls) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
AuthorizationException
- No access right to list the GUID for a given SURL.
NotExistsException
- The SURL does not exist.
InvalidArgumentException
- Invalid SURL.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
public StringPair[] getMasterReplica(java.lang.String[] guids) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guids
- the list of GUIDs to get the master SURL for
AuthorizationException
- No access right to list SURLs for a given GUID.
NotExistsException
- The GUID does not exist.
InvalidArgumentException
- Invalid GUID.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
NotExistsException
.
public StringPair[] listSurlsByGuid(java.lang.String[] guids) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guids
- - GUID strings we want surls for
StringPair
objects.
The first string is the GUID, the second the SURL corresponding to that GUID.
If the GUID has more than one SURL, it will be repeated.
AuthorizationException
- No access right to list SURLs for a given GUID.
NotExistsException
- The GUID does not exist.
InvalidArgumentException
- Invalid GUID.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
NotExistsException
.
public RCEntry[] listReplicasByGuid(java.lang.String[] guids, boolean withPermissions) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
RCEntry
for given
list of GUIDs.
guids
- - list of GUIDs we want valid RCEntries for
RCEntry
array, only valid SURLs.
AuthorizationException
- No access right to list SURLs for a given GUID.
NotExistsException
- The GUID does not exist.
InvalidArgumentException
- Invalid format of GUID.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
public StringBoolean[] hasGuid(java.lang.String[] guids) throws InternalException, InvalidArgumentException, AuthorizationException
guids
- the list of GUIDs to check
AuthorizationException
- No access right to list the catalog.
InvalidArgumentException
- Invalid format of GUID.
InternalException
- InvalidArgumentException
.
public GUIDStat[] getGuidStat(java.lang.String[] guids) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
guids
- GUID we want stats for
AuthorizationException
- No access right get status information for a given GUID.
InvalidArgumentException
- Invalid format of GUID.
NotExistsException
- The GUID does not exist.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
public SURLEntry[] getSurlStat(java.lang.String[] surls) throws InternalException, AuthorizationException, NotExistsException, InvalidArgumentException
surls
- list of SURLs we want stats for
InvalidArgumentException
- Invalid format of SURL
AuthorizationException
- No access right to list the GUID for a given SURL.
NotExistsException
- Either the GUID does not exist or the given SURL is not a registered replica of the GUID.
InternalException
- InvalidArgumentException
.
NotExistsException
.
AuthorizationException
.
public Permission getDefaultPrincipalPermission(java.lang.String principal) throws InternalException, AuthorizationException, InvalidArgumentException
AuthorizationException
- No access right to get the default user permissions.
InternalException
- AuthorizationException
.
InvalidArgumentException
getDefaultGlobalPermission()
public Permission getDefaultGlobalPermission() throws InternalException, AuthorizationException
AuthorizationException
- No access right to get the default permissions.
InternalException
- AuthorizationException
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |