* Check the DestinationStream type and perform the appropriate authorization strategy. {@inheritDoc}.
*/
public void authorize(final ServiceActionContext inActionContext)
{
Principal currentPrincipal = inActionContext.getPrincipal();
PostActivityRequest currentRequest = (PostActivityRequest) inActionContext.getParams();
switch (currentRequest.getActivityDTO().getDestinationStream().getType())
{
case PERSON:
if (logger.isTraceEnabled())
{
logger.trace("Performing authorization to post to a Person based stream: "
+ currentRequest.getActivityDTO().getDestinationStream().getUniqueIdentifier());
}
performPersonAuthorization(currentPrincipal, currentRequest.getActivityDTO());
break;
case GROUP:
if (logger.isTraceEnabled())
{
logger.trace("Performing authorization to post to a Group based stream: "
+ currentRequest.getActivityDTO().getDestinationStream().getUniqueIdentifier());
}
performGroupAuthorization(currentPrincipal, currentRequest.getActivityDTO());
break;
case RESOURCE:
// anyone can post to resource stream.
break;
default: