com.redhat.rhn.domain.org
Interface Org

All Known Implementing Classes:
OrgImpl

public interface Org

Class Org that reflects the DB representation of web_customer DB table: web_customer


Method Summary
 void addCustomDataKey(CustomDataKey keyIn)
           
 void addOrgQuota(java.lang.Long totalIn)
          Add a Quota to this Org
 void addOwnedChannel(Channel channelIn)
          Adds a new channel to the orgs set of channels
 void addRole(Role roleLabel)
          Add a Role to the Org.
 java.util.List getAccessibleChannels()
          Get the list of channels accessible for this org.
 java.util.List getActiveOrgAdmins()
          Gets the list of active org admins (com.redhat.rhn.domain.user.User objects) in this org.
 java.util.Set getContactGroups()
          Get the Set of com.redhat.rhn.domain.monitoring.notification.ContactGroup objects associated with this Org.
 java.util.Date getCreated()
          Gets the current value of created
 java.lang.String getCreditApplicationCompleted()
          Gets the current value of creditApplicationCompleted
 java.util.Set getCustomDataKeys()
           
 java.lang.String getCustomerType()
          Gets the current value of customerType
 java.util.List getEntitledServerGroups()
          Get the set of EntitlementServerGroups that this Org is a member of.
 java.util.Set getEntitlements()
          Get entitlements for this Org
 java.lang.Long getId()
          Gets the current value of id
 java.util.List getManagedServerGroups()
          Get the set of ManagedServerGroups that this Org is a member of.
 java.util.Date getModified()
          Gets the current value of modified
 java.util.Set getMonitoringScouts()
          Gets the com.redhat.rhn.domain.monitoring.satcluster.SatClusters associated with this Org.
 java.lang.String getName()
          Gets the current value of name
 java.lang.Integer getOracleCustomerId()
          Gets the current value of oracleCustomerId
 java.lang.Integer getOracleCustomerNumber()
          Gets the current value of oracleCustomerNumber
 OrgQuota getOrgQuota()
          Get the quota object associated with this org.
 java.util.Set getOwnedChannels()
          Get the set of channels associated with this org.
 java.lang.String getPassword()
          Gets the current value of password
 ChannelFamily getPrivateChannelFamily()
          Returns the channelFamilies.
 java.lang.Long getQuotaTotal()
          Get the value of the OrgQuota's TOTAL allowed
 java.util.Set<Role> getRoles()
          Gets the roles assigned to this Org.
 Token getToken()
          Returns the default registration token for this organization.
 UserGroup getUserGroup(Role roleLabel)
          Get the Org's UserGroup ID for the specified Role
 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)
           
 boolean hasEntitlement(OrgEntitlementType ent)
          Does this org have the requested entitlement
 boolean hasRole(Role roleLabel)
          Does the Org have the specified role
 boolean isDemoEntitled()
          Returns if the given org has a demo entitlement
 boolean isPayingCustomer()
          Returns true if the Org is a paying customer, or false if it's a demo account.
 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 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
 void setCreated(java.util.Date createdIn)
          Sets the value of created to new value
 void setCreditApplicationCompleted(java.lang.String credIn)
          Sets the value of creditApplicationCompleted to new value
 void setCustomDataKeys(java.util.Set customDataKeysIn)
           
 void setCustomerType(java.lang.String customerTypeIn)
          Sets the value of customerType to new value
 void setEntitlements(java.util.Set entsIn)
          Set entitlements for this Org
 void setModified(java.util.Date modifiedIn)
          Sets the value of modified to new value
 void setName(java.lang.String nameIn)
          Sets the value of name to new value
 void setOracleCustomerId(java.lang.Integer oracleIn)
          Sets the value of oracleCustomerId to new value
 void setOracleCustomerNumber(java.lang.Integer oracleIn)
          Sets the value of oracleCustomerNumber to new value
 void setOwnedChannels(java.util.Set channelsIn)
          Set the channels for this org.
 void setPassword(java.lang.String passwordIn)
          Sets the value of password to new value
 void setToken(Token tokenIn)
          Sets the default registration token for this organization.
 

Method Detail

getCustomDataKeys

java.util.Set getCustomDataKeys()
Returns:
Returns the customDataKeys.

setCustomDataKeys

void setCustomDataKeys(java.util.Set customDataKeysIn)
Parameters:
customDataKeysIn - The customDataKeys to set.

addCustomDataKey

void addCustomDataKey(CustomDataKey keyIn)
Parameters:
keyIn - The CustomDataKey to add to the customDataKeys set for this org.

hasCustomDataKey

boolean hasCustomDataKey(java.lang.String label)
Parameters:
label - The label to check for
Returns:
Returns true if the corresponding custom data key exists, false otherwise.

getId

java.lang.Long getId()
Gets the current value of id

Returns:
Long the current value

getName

java.lang.String getName()
Gets the current value of name

Returns:
String the current value

setName

void setName(java.lang.String nameIn)
Sets the value of name to new value

Parameters:
nameIn - New value for name

getPassword

java.lang.String getPassword()
Gets the current value of password

Returns:
String the current value

setPassword

void setPassword(java.lang.String passwordIn)
Sets the value of password to new value

Parameters:
passwordIn - New value for password

getOracleCustomerId

java.lang.Integer getOracleCustomerId()
Gets the current value of oracleCustomerId

Returns:
Integer the current value

setOracleCustomerId

void setOracleCustomerId(java.lang.Integer oracleIn)
Sets the value of oracleCustomerId to new value

Parameters:
oracleIn - New value for oracleCustomerId

getOracleCustomerNumber

java.lang.Integer getOracleCustomerNumber()
Gets the current value of oracleCustomerNumber

Returns:
int the current value

setOracleCustomerNumber

void setOracleCustomerNumber(java.lang.Integer oracleIn)
Sets the value of oracleCustomerNumber to new value

Parameters:
oracleIn - New value for oracleCustomerNumber

getCustomerType

java.lang.String getCustomerType()
Gets the current value of customerType

Returns:
String the current value

setCustomerType

void setCustomerType(java.lang.String customerTypeIn)
Sets the value of customerType to new value

Parameters:
customerTypeIn - New value for customerType

getCreated

java.util.Date getCreated()
Gets the current value of created

Returns:
Date the current value

setCreated

void setCreated(java.util.Date createdIn)
Sets the value of created to new value

Parameters:
createdIn - New value for created

getCreditApplicationCompleted

java.lang.String getCreditApplicationCompleted()
Gets the current value of creditApplicationCompleted

Returns:
String the current value

setCreditApplicationCompleted

void setCreditApplicationCompleted(java.lang.String credIn)
Sets the value of creditApplicationCompleted to new value

Parameters:
credIn - New value for creditApplicationCompleted

getModified

java.util.Date getModified()
Gets the current value of modified

Returns:
Date the current value

setModified

void setModified(java.util.Date modifiedIn)
Sets the value of modified to new value

Parameters:
modifiedIn - New value for modified

getRoles

java.util.Set<Role> getRoles()
Gets the roles assigned to this Org. The Map returned from this method has been decorated with a call to Collections.unmodifiableMap(java.util.Map) in order to enforce the rule that roles are not changeable during runtime.

Returns:
Set of Roles associated with this Org

hasRole

boolean hasRole(Role roleLabel)
Does the Org have the specified role

Parameters:
roleLabel - the Role.label to check
Returns:
boolean if the Org has Role

getUserGroup

UserGroup getUserGroup(Role roleLabel)
Get the Org's UserGroup ID for the specified Role

Parameters:
roleLabel - the Role.label to translate to a UserGroup.ID
Returns:
the UserGroup if found, otherwise null.

addRole

void addRole(Role roleLabel)
Add a Role to the Org.

Parameters:
roleLabel - the role label we want to add to this Org

setEntitlements

void setEntitlements(java.util.Set entsIn)
Set entitlements for this Org

Parameters:
entsIn - new Set of Entitlements to update

getEntitlements

java.util.Set getEntitlements()
Get entitlements for this Org

Returns:
Set of entitlements for this Org

hasEntitlement

boolean hasEntitlement(OrgEntitlementType ent)
Does this org have the requested entitlement

Parameters:
ent - Entitlement to check
Returns:
boolean if or not the org has the Ent

getEntitledServerGroups

java.util.List getEntitledServerGroups()
Get the set of EntitlementServerGroups that this Org is a member of.

Returns:
List of ServerGroup classes

getManagedServerGroups

java.util.List getManagedServerGroups()
Get the set of ManagedServerGroups that this Org is a member of.

Returns:
List of ServerGroup classes

resetChannelPermissions

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

Parameters:
uid - User ID to reset
cid - Channel ID
roleLabel - label of Role to reset

removeChannelPermissions

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

Parameters:
uid - User ID to reset
cid - Channel ID
roleLabel - label of Role to reset

isPayingCustomer

boolean isPayingCustomer()
Returns true if the Org is a paying customer, or false if it's a demo account.

Returns:
true if the Org is a paying customer, or false if it's a demo account.

addOrgQuota

void addOrgQuota(java.lang.Long totalIn)
Add a Quota to this Org

Parameters:
totalIn - the total size of the quota

getOrgQuota

OrgQuota getOrgQuota()
Get the quota object associated with this org.

Returns:
an OrgQuota object.

getQuotaTotal

java.lang.Long getQuotaTotal()
Get the value of the OrgQuota's TOTAL allowed

Returns:
Long value of the Org's Quota total - null if there isnt one

numActiveOrgAdmins

int numActiveOrgAdmins()
Gets the number of active org admins in this org.

Returns:
Returns the number of active org admins in this org.

getActiveOrgAdmins

java.util.List getActiveOrgAdmins()
Gets the list of active org admins (com.redhat.rhn.domain.user.User objects) in this org.

Returns:
Returns the set of active org admins in this org.

getMonitoringScouts

java.util.Set getMonitoringScouts()
Gets the com.redhat.rhn.domain.monitoring.satcluster.SatClusters associated with this Org. Null if there are none or is not a Monitoring Sat.

Returns:
Set of SatClusters (Monitoring Scouts) associated with Org

getContactGroups

java.util.Set getContactGroups()
Get the Set of com.redhat.rhn.domain.monitoring.notification.ContactGroup objects associated with this Org.

Returns:
Set of ContactGroups

addOwnedChannel

void addOwnedChannel(Channel channelIn)
Adds a new channel to the orgs set of channels

Parameters:
channelIn - The Channel to add

setOwnedChannels

void setOwnedChannels(java.util.Set channelsIn)
Set the channels for this org.

Parameters:
channelsIn - The channels for this org

getOwnedChannels

java.util.Set getOwnedChannels()
Get the set of channels associated with this org.

Returns:
Returns the set of channels for this org.

getAccessibleChannels

java.util.List getAccessibleChannels()
Get the list of channels accessible for this org.

Returns:
List of channels public or owned by this org.

getPrivateChannelFamily

ChannelFamily getPrivateChannelFamily()
Returns the channelFamilies.

Returns:
the channelFamilies.

isDemoEntitled

boolean isDemoEntitled()
Returns if the given org has a demo entitlement

Returns:
true if entitled, false if not.

getValidBaseEntitlementsForOrg

java.util.Set<Entitlement> getValidBaseEntitlementsForOrg()
Set of Entitlements that can be a BaseEntitlement available to the Org

Returns:
Set of Entitlements

getValidAddOnEntitlementsForOrg

java.util.Set<Entitlement> getValidAddOnEntitlementsForOrg()
Set of Entitlements that can be an add-on entitlement available to the Org

Returns:
Set of Entitlements

getToken

Token getToken()
Returns the default registration token for this organization.

Returns:
default token, null if none exists.

setToken

void setToken(Token tokenIn)
Sets the default registration token for this organization.

Parameters:
tokenIn - Default token.