l.c.i.b.IHasBranchVisibilityPolicy(Interface) : interface documentation

Part of lp.code.interfaces.branchvisibilitypolicy View In Hierarchy

Known subclasses: lp.registry.interfaces.product.IProductPublic, lp.registry.interfaces.projectgroup.IProjectGroupPublic

Implemented by types that need to define default branch visibility.
Method getBranchVisibilityTeamPolicies The branch visibility team policy items.
Method getBaseBranchVisibilityRule Return the BranchVisibilityRule that applies to everyone.
Method getBranchVisibilityRuleForTeam Return the defined visibility rule for the team.
Method getBranchVisibilityRuleForBranch Return the most specific visibility rule for a branch.
Method isUsingInheritedBranchVisibilityPolicy Return True if using policy from the inherited context.
Method setBranchVisibilityTeamPolicy Set the policy for the team.
Method removeTeamFromBranchVisibilityPolicy Remove the team from the policy list.
def getBranchVisibilityTeamPolicies():
The branch visibility team policy items.
def getBaseBranchVisibilityRule():
Return the BranchVisibilityRule that applies to everyone.
def getBranchVisibilityRuleForTeam(team):
Return the defined visibility rule for the team.

If there is no explicit team policy set for the team, return None.

def getBranchVisibilityRuleForBranch(branch):
Return the most specific visibility rule for a branch.

The owner of the branch is used to determine the team that the rule applies to. If there is a rule defined for the actual branch owner then that rule is used in preference to other rules only applicable through team membership.

If there are a number of rules that apply for the owner of the branch then the most restrictive rule is retuned.

def isUsingInheritedBranchVisibilityPolicy():
Return True if using policy from the inherited context.

Products that don't have any explicitly defined team policies, use the team policies defined for the project if the product has an associated project. ProjectGroups can't have inherited policies.

def setBranchVisibilityTeamPolicy(team, rule):
Set the policy for the team.

Each team can only have one policy.

ParametersteamThe team to associate with the rule.
ruleA value of the BranchVisibilityRule enumerated type.
def removeTeamFromBranchVisibilityPolicy(team):
Remove the team from the policy list.

If the team exists in the items list it is removed. If the team isn't in the items list, the method returns and the state of the object is unchanged. Attempting to remove the team None returns the policy for everyone back to the default, which is Public.

API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.