Class IpRange
java.lang.Object
io.goobi.viewer.model.security.user.AbstractLicensee
io.goobi.viewer.model.security.user.IpRange
- All Implemented Interfaces:
ILicensee,Serializable
Represents an IP address range used for IP-based access control and licence assignment.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanSatisfyAllAccessConditions(Set<String> requiredAccessConditions, String privilegeName, String pi) canSatisfyAllAccessConditions.booleanGetter for the fielddescription.getId()Getter for the fieldid.getName()getName.Getter for the fieldsubnetMask.inthashCode()static voidmain.booleanmatchIp.voidsetDescription(String description) Setter for the fielddescription.voidSetter for the fieldid.voidSetter for the fieldname.voidsetSubnetMask(String subnetMask) Setter for the fieldsubnetMask.toString()Methods inherited from class io.goobi.viewer.model.security.user.AbstractLicensee
getAccessPermissionFromMap, getLicenses, hasLicense
-
Constructor Details
-
IpRange
public IpRange()
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
matchIp
matchIp.- Parameters:
inIp- client IP address to test against this range- Returns:
- true if the given IP address falls within the subnet mask of this IP range, false otherwise
-
canSatisfyAllAccessConditions
public AccessPermission canSatisfyAllAccessConditions(Set<String> requiredAccessConditions, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException canSatisfyAllAccessConditions.- Parameters:
requiredAccessConditions- set of access condition values that must all be satisfiedprivilegeName- privilege name to check against each access conditionpi- persistent identifier of the record being accessed- Returns:
- true if this IP range satisfies all given access conditions for the specified privilege, false otherwise
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.
-
getId
Getter for the fieldid.- Returns:
- the database identifier of this IP range
-
setId
Setter for the fieldid.- Parameters:
id- the database identifier to set
-
getName
getName. -
setName
Setter for the fieldname.- Parameters:
name- the display name of this IP range to set
-
getSubnetMask
Getter for the fieldsubnetMask.- Returns:
- the CIDR subnet mask defining the IP range
-
setSubnetMask
Setter for the fieldsubnetMask.- Parameters:
subnetMask- the CIDR subnet mask defining the IP range to set
-
getDescription
Getter for the fielddescription.- Returns:
- a human-readable description of this IP range
-
setDescription
Setter for the fielddescription.- Parameters:
description- a human-readable description of this IP range to set
-
getAccessType
- Specified by:
getAccessTypein interfaceILicensee- Returns:
- AccessType corresponding to the licensee's class
-
main
main.- Parameters:
args- command-line arguments (unused)
-
toString
-