Package com.caplin.server.auth
Class MapObject
- java.lang.Object
-
- com.caplin.server.auth.MapObject
-
public class MapObject extends java.lang.Object
Contains a representation of a mapped RTTP object holding the original object name and its mapped name.
The Liberator provides this powerful mechanism for mapping a user-requested object to another object name at the server back-end. This allows, for example, preferential prices or spreads to be provided to particular users or groups of users whilst maintaining a single object name on the client-side.
An instance of a MapObject is passed to the
Authenticator.mapObject
method. To perform object mapping simply set the mapped object name and ensure thatAuthenticationResult.OK
is returned.- See Also:
Authenticator.mapObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getMappedName()
The newly mapped object name.java.lang.String
getOriginalName()
The original object name provided by the Liberator.java.lang.String
getRequestedName()
int
hashCode()
void
setMappedName(java.lang.String mappedName)
Set the mapped object name.java.lang.String
toString()
-
-
-
Method Detail
-
getMappedName
public java.lang.String getMappedName()
The newly mapped object name.- Returns:
- the new mapped object name, or null if the object name is not mapped
-
getOriginalName
public java.lang.String getOriginalName()
The original object name provided by the Liberator.- Returns:
- the original object name
-
getRequestedName
public java.lang.String getRequestedName()
-
setMappedName
public void setMappedName(java.lang.String mappedName)
Set the mapped object name. Note: The maximum length that this name should be is 255 characters. This limit is not enforced, instead the name will be truncated to the maximum length.- Parameters:
mappedName
- the new mapped name for the object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-