com.atlassian.jira.sharing
Class DefaultShareTypeValidatorUtils

java.lang.Object
  extended by com.atlassian.jira.sharing.DefaultShareTypeValidatorUtils
All Implemented Interfaces:
ShareTypeValidatorUtils

public class DefaultShareTypeValidatorUtils
extends Object
implements ShareTypeValidatorUtils

Default implementation of ShareTypeValidatorUtils.

Since:
v3.13

Constructor Summary
DefaultShareTypeValidatorUtils(ShareTypeFactory shareTypeFactory, PermissionManager permissionManager)
           
 
Method Summary
 boolean isValidSearchParameter(JiraServiceContext context, ShareTypeSearchParameter searchParameter)
          Check to see if the passed SearchParameter is valid..
 boolean isValidSharePermission(JiraServiceContext context, SharedEntity entity)
          Validates to see if a given Set of SharePermission is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShareTypeValidatorUtils

public DefaultShareTypeValidatorUtils(ShareTypeFactory shareTypeFactory,
                                      PermissionManager permissionManager)
Method Detail

isValidSharePermission

public boolean isValidSharePermission(JiraServiceContext context,
                                      SharedEntity entity)
Description copied from interface: ShareTypeValidatorUtils
Validates to see if a given Set of SharePermission is valid. E.g. contains only one Singleton Permission and no others. I.e. Globally and Privately shared.

Specified by:
isValidSharePermission in interface ShareTypeValidatorUtils
Parameters:
context - Contains the user trying to store permissions, the i18nBean and ErrorCollection
entity - The entity the permissions are validating against
Returns:
true if the set is valid, otherwise false.

isValidSearchParameter

public boolean isValidSearchParameter(JiraServiceContext context,
                                      ShareTypeSearchParameter searchParameter)
Description copied from interface: ShareTypeValidatorUtils
Check to see if the passed SearchParameter is valid..

Specified by:
isValidSearchParameter in interface ShareTypeValidatorUtils
Parameters:
context - Context containing the user that is to store the SharePermission, the i18n bean and an ErrorCollection
searchParameter - the parameter is check.
Returns:
true if the parameter is valid or false otherwise.


Copyright © 2002-2012 Atlassian. All Rights Reserved.