public class Org extends BaseDomainHelper
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
Org()
Construct new Org
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomDataKey(CustomDataKey keyIn) |
void |
addOwnedChannel(Channel channelIn)
Adds a new channel to the orgs set of channels
|
void |
addRole(Role newRole)
Add a Role to the Org.
|
void |
addTrust(Org org)
Add a (bidirectional) trust relationship.
|
boolean |
equals(java.lang.Object other) |
java.util.List<Channel> |
getAccessibleChannels()
Get the list of channels accessible for this org.
|
java.util.List<User> |
getActiveOrgAdmins()
Gets the list of active org admins (com.redhat.rhn.domain.user.User
objects) in this org.
|
java.util.Set<IssSlave> |
getAllowedToSlaves()
Gets the list of Slaves we're specifically allowed to be exported to
|
java.util.Set |
getCustomDataKeys() |
java.util.List<EntitlementServerGroup> |
getEntitledServerGroups()
Get the set of EntitlementServerGroups that this Org is a member of.
|
java.lang.Long |
getId()
Gets the current value of id
|
java.util.List<ManagedServerGroup> |
getManagedServerGroups()
Get the set of ManagedServerGroups that this Org is a member of.
|
java.lang.String |
getName()
Gets the current value of name
|
OrgAdminManagement |
getOrgAdminMgmt() |
OrgConfig |
getOrgConfig()
Get OrgConfig for this Org
|
java.util.Set<Channel> |
getOwnedChannels()
Get the set of channels associated with this org.
|
ChannelFamily |
getPrivateChannelFamily()
Returns the channelFamilies.
|
java.util.Set<Role> |
getRoles()
Gets the roles assigned to this Org.
|
Token |
getToken()
Returns the default registration token for this organization.
|
java.util.Set<Org> |
getTrustedOrgs()
Gets the list of trusted orgs.
|
UserGroup |
getUserGroup(Role roleIn)
Get the Org's UserGroup ID for the specified Role
|
java.util.Set<UserGroup> |
getUserGroups()
Get UserGroups for this Org.
|
java.util.Set<Entitlement> |
getValidAddOnEntitlementsForOrg()
Set of Entitlements that can be an add-on entitlement available to the
Org
|
java.util.Set<Entitlement> |
getValidBaseEntitlementsForOrg()
Set of Entitlements that can be a BaseEntitlement available to the Org
|
boolean |
hasCustomDataKey(java.lang.String label)
Convenience method that checks the set of customDataKeys for a custom
data key with the given label.
|
int |
hashCode() |
boolean |
hasRole(Role role)
Does the Org have the specified role
|
int |
numActiveOrgAdmins()
Gets the number of active org admins in this org.
|
void |
removeChannelPermissions(java.lang.Long uid,
java.lang.Long cid,
java.lang.String roleLabel)
TODO: get rid of Role label and pass in the class Remove all channel
permissions for a user/channel/role combination
|
void |
removeTrust(Org org)
Remove a (bidirectional) trust relationship.
|
void |
resetChannelPermissions(java.lang.Long uid,
java.lang.Long cid,
java.lang.String roleLabel)
TODO: get rid of Role label and pass in the class Reset channel
permissions for a user/channel/role combination
|
protected void |
setAllowedToSlaves(java.util.Set<IssSlave> inSlaves)
Set up slaves we can be exported to
|
void |
setCustomDataKeys(java.util.Set<CustomDataKey> customDataKeysIn) |
protected void |
setId(java.lang.Long idIn)
Sets the value of id to new value
|
void |
setName(java.lang.String nameIn)
Sets the value of name to new value
|
void |
setOrgAdminMgmt(OrgAdminManagement orgAdminMgmtIn) |
void |
setOrgConfig(OrgConfig orgConfigIn)
Set OrgConfig
|
void |
setOwnedChannels(java.util.Set<Channel> channelsIn)
Set the channels for this org.
|
void |
setToken(Token tokenIn)
Sets the default registration token for this organization.
|
void |
setUserGroups(java.util.Set<UserGroup> ugIn)
Set UserGroups for this Org.
|
java.lang.String |
toString() |
getCreated, getModified, setCreated, setModified
public java.util.Set getCustomDataKeys()
public void setCustomDataKeys(java.util.Set<CustomDataKey> customDataKeysIn)
customDataKeysIn
- The customDataKeys to set.public boolean hasCustomDataKey(java.lang.String label)
label
- The label to check for.public void addCustomDataKey(CustomDataKey keyIn)
keyIn
- The CustomDataKey to add to the customDataKeys set for this
org.public java.lang.Long getId()
protected void setId(java.lang.Long idIn)
idIn
- New value for idpublic java.lang.String getName()
public void setName(java.lang.String nameIn)
nameIn
- New value for namepublic java.util.Set<Role> getRoles()
Collections.unmodifiableMap(java.util.Map<? extends K, ? extends V>)
in order to enforce the
rule that roles are not changeable during runtime.public boolean hasRole(Role role)
role
- the Role to checkpublic void addRole(Role newRole)
newRole
- the role label we want to add to this Orgpublic UserGroup getUserGroup(Role roleIn)
roleIn
- the Role.label to translate to a UserGroup.IDpublic java.util.Set<UserGroup> getUserGroups()
public void setUserGroups(java.util.Set<UserGroup> ugIn)
ugIn
- the new arraypublic void setOrgConfig(OrgConfig orgConfigIn)
orgConfigIn
- The new OrgConfig to set.public OrgConfig getOrgConfig()
public java.util.List<EntitlementServerGroup> getEntitledServerGroups()
public java.util.List<ManagedServerGroup> getManagedServerGroups()
public void addOwnedChannel(Channel channelIn)
channelIn
- The Channel to addpublic void setOwnedChannels(java.util.Set<Channel> channelsIn)
channelsIn
- The channels for this orgpublic java.util.Set<Channel> getOwnedChannels()
public java.util.List<Channel> getAccessibleChannels()
public void resetChannelPermissions(java.lang.Long uid, java.lang.Long cid, java.lang.String roleLabel)
uid
- User ID to resetcid
- Channel IDroleLabel
- label of Role to resetpublic void removeChannelPermissions(java.lang.Long uid, java.lang.Long cid, java.lang.String roleLabel)
uid
- User ID to resetcid
- Channel IDroleLabel
- label of Role to resetpublic int numActiveOrgAdmins()
public java.util.List<User> getActiveOrgAdmins()
public ChannelFamily getPrivateChannelFamily()
public java.util.Set<Entitlement> getValidBaseEntitlementsForOrg()
public java.util.Set<Entitlement> getValidAddOnEntitlementsForOrg()
public java.lang.String toString()
toString
in class BaseDomainHelper
public Token getToken()
public void setToken(Token tokenIn)
tokenIn
- Default token.public java.util.Set<Org> getTrustedOrgs()
public void addTrust(Org org)
org
- A "trusted" organization to add.public void removeTrust(Org org)
org
- A "trusted" organization to be removed.public java.util.Set<IssSlave> getAllowedToSlaves()
protected void setAllowedToSlaves(java.util.Set<IssSlave> inSlaves)
inSlaves
- allowed slavespublic OrgAdminManagement getOrgAdminMgmt()
public void setOrgAdminMgmt(OrgAdminManagement orgAdminMgmtIn)
orgAdminMgmtIn
- The orgAdminMgmt to set.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object