|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.pba.rbac.URLPrincipal
public class URLPrincipal
This class implements a Principal interface, so it can be used as an identifier. It also implements an Entry interface, so it can be used for Domain matching as well.
Some of the methods do not have any description, because they simply redirect the calls to ParsedURL object, so refer to the description of that class to see the meaning of the results.
Constructor Summary | |
---|---|
protected |
URLPrincipal()
|
|
URLPrincipal(java.lang.String url)
This constructor builds a URLPrincipal out of a URL string, and assumes the defaul port is unknown (getPort() will return -1, if the URL does not specify the port number). |
|
URLPrincipal(java.lang.String url,
int defaultPort)
This constructor builds a URLPrincipal given a URL string, and a default port number. |
Method Summary | |
---|---|
java.lang.String |
getAnchor()
|
java.security.Principal |
getEntryName()
This method returns the Principal naming the entry. |
java.lang.String |
getHost()
|
java.lang.String |
getName()
This method returns a normalised URL (i.e. the path is without '.' and '..' elements, etc.) |
java.lang.String[] |
getOriginalPath()
|
java.lang.String |
getPassword()
|
java.lang.String[] |
getPath()
|
int |
getPort()
This method returns a port number. |
java.lang.String |
getProtocol()
|
java.lang.String |
getQuery()
|
java.lang.String |
getURL()
This method returns the whole original URL; normalised URL can be obtained using getName() method. |
java.lang.String |
getUserName()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
equals, hashCode, toString |
Constructor Detail |
---|
protected URLPrincipal()
public URLPrincipal(java.lang.String url) throws BadURLException
This is equivalent to new URLPrincipal(url, -1);
url
- is the string URL
BadURLException
- if the url is not a well-formed HTTP or FILE URLpublic URLPrincipal(java.lang.String url, int defaultPort) throws BadURLException
url
- is the string URLdefaultPort
- is the number of the default port to assume if URL does
not
specify any port number
BadURLException
- if the url is not a well-formed HTTP or FILE URLMethod Detail |
---|
public java.lang.String getName()
getName
in interface java.security.Principal
public java.security.Principal getEntryName()
Entry
getEntryName
in interface Entry
public java.lang.String getProtocol()
public java.lang.String getUserName()
public java.lang.String getPassword()
public java.lang.String getHost()
public int getPort()
public java.lang.String[] getPath()
public java.lang.String[] getOriginalPath()
public java.lang.String getAnchor()
public java.lang.String getQuery()
public java.lang.String getURL()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |