public class OrgFactory extends HibernateFactory
Modifier and Type | Field and Description |
---|---|
static TemplateString |
EMAIL_ACCOUNT_INFO |
static TemplateString |
EMAIL_FOOTER |
Modifier and Type | Method and Description |
---|---|
static Org |
createOrg()
Create a new Org from scratch
|
static void |
deleteOrg(java.lang.Long oid,
User user)
the org id is passed to pl/sql to wipe out
|
static java.lang.Long |
getActivationKeys(Org orgIn) |
static java.lang.Long |
getActiveSystems(Org orgIn) |
static java.lang.Long |
getActiveUsers(Org orgIn) |
static java.lang.Long |
getConfigChannels(Org orgIn) |
static java.lang.Long |
getKickstarts(Org orgIn) |
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages
show up on the correct class
|
static java.lang.Long |
getMigratedSystems(java.lang.Long orgTo,
java.lang.Long orgFrom) |
static Org |
getSatelliteOrg()
Get the default organization.
|
static java.lang.Long |
getServerGroups(Org orgIn) |
static java.lang.Long |
getSharedChannels(java.lang.Long orgId,
java.lang.Long trustId) |
static java.lang.Long |
getSharedSubscribedSys(java.lang.Long orgId,
java.lang.Long trustId) |
static java.lang.Long |
getTotalOrgCount() |
static java.util.Date |
getTrustedSince(java.lang.Long org,
java.lang.Long trustedOrg) |
static java.util.List<Org> |
lookupAllOrgs()
Lookup all orgs on the satellite.
|
static Org |
lookupById(java.lang.Long id)
Lookup an Org by id.
|
static Org |
lookupByName(java.lang.String name)
Find the org with the name, name.
|
static CustomDataKey |
lookupKeyById(java.lang.Long cikid)
Get the CustomDataKey represented by the passed in ID
|
static CustomDataKey |
lookupKeyByLabelAndOrg(java.lang.String label,
Org org)
Get the CustomDataKey represented by the passed in label and org
|
static java.util.List<Org> |
lookupOrgsUsingChannelFamily(ChannelFamily channelFamily)
Lookup orgs with servers with access to any channel that's a part of the given
family.
|
static TemplateString |
lookupTemplateByLabel(java.lang.String label)
Lookup a Template String by label
|
static Org |
save(Org org)
Commit the Org
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
public static final TemplateString EMAIL_FOOTER
public static final TemplateString EMAIL_ACCOUNT_INFO
protected org.apache.log4j.Logger getLogger()
getLogger
in class HibernateFactory
public static Org createOrg()
public static void deleteOrg(java.lang.Long oid, User user)
oid
- Org Id to deleteuser
- User who initiated this actionpublic static Org lookupByName(java.lang.String name)
name
- the org namepublic static CustomDataKey lookupKeyByLabelAndOrg(java.lang.String label, Org org)
label
- The label of the key you wantorg
- The org the key is inpublic static CustomDataKey lookupKeyById(java.lang.Long cikid)
cikid
- The ID of the key you wantpublic static Org save(Org org)
org
- Org object we want to commit.public static Org lookupById(java.lang.Long id)
id
- id to lookup Org bypublic static java.lang.Long getActiveUsers(Org orgIn)
orgIn
- Org to calculate userspublic static java.lang.Long getActiveSystems(Org orgIn)
orgIn
- to calculate systemspublic static java.lang.Long getServerGroups(Org orgIn)
orgIn
- Org to calculate number of server groups forpublic static java.lang.Long getConfigChannels(Org orgIn)
orgIn
- to calculate number of Config Channelspublic static java.lang.Long getActivationKeys(Org orgIn)
orgIn
- to calculate activations keyspublic static java.lang.Long getKickstarts(Org orgIn)
orgIn
- to calculate number of kickstartspublic static TemplateString lookupTemplateByLabel(java.lang.String label)
label
- to search forpublic static Org getSatelliteOrg()
public static java.util.List<Org> lookupOrgsUsingChannelFamily(ChannelFamily channelFamily)
channelFamily
- Channel family to search for.public static java.lang.Long getTotalOrgCount()
public static java.util.Date getTrustedSince(java.lang.Long org, java.lang.Long trustedOrg)
org
- Our orgtrustedOrg
- the org we trustpublic static java.lang.Long getMigratedSystems(java.lang.Long orgTo, java.lang.Long orgFrom)
orgTo
- Org to caclulate system migrations toorgFrom
- Org to caclulate system migrations frompublic static java.lang.Long getSharedChannels(java.lang.Long orgId, java.lang.Long trustId)
orgId
- Org to caclulate systemstrustId
- Org to calculate channel sharing topublic static java.lang.Long getSharedSubscribedSys(java.lang.Long orgId, java.lang.Long trustId)
orgId
- Org sharingtrustId
- subscribing systems to orgId channelspublic static java.util.List<Org> lookupAllOrgs()