public class ProfileManager extends BaseManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPTION_REMOVE |
static java.lang.String |
OPTION_SUBSCRIBE |
| Constructor and Description |
|---|
ProfileManager() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List |
comparePackageLists(DataResult profiles,
DataResult systems,
java.lang.String param)
compares the given lists of Packages.
|
static DataResult |
compareServerToProfile(java.lang.Long sid,
java.lang.Long prid,
java.lang.Long orgid,
PageControl pc)
Returns a DataResult with a diff of the server's packages and those
in the profile.
|
static DataResult |
compareServerToServer(java.lang.Long sid,
java.lang.Long sid1,
java.lang.Long orgid,
PageControl pc)
Returns a DataResult with a diff of the server's packages and those
in the profile.
|
static DataResult<ProfileDto> |
compatibleWithChannel(Channel channelIn,
Org orgIn,
PageControl pc)
Get the list of Profile's that are compatible with the given Base
Channel ID passed in.
|
static java.util.List |
compatibleWithServer(Server server,
Org org)
Returns a list of Profiles which are compatible with the given server.
|
static void |
copyFrom(Server server,
Profile profile)
Copies the packages from a given Server to the given Profile.
|
static Profile |
createProfile(ProfileType type,
User user,
Channel channel,
java.lang.String name,
java.lang.String description)
Creates and persists a Server Package Profile for the given Server
with the name and description.
|
static Profile |
createProfile(User user,
Server server,
java.lang.String name,
java.lang.String description)
Creates and persists a Server Package Profile for the given Server
with the name and description.
|
static int |
deleteProfile(Profile profile)
Removes the given profile.
|
static java.util.List |
getChildChannelsNeededForProfile(User user,
Channel baseChannel,
Profile profileIn)
Get the List of child Channels of the passed in base Channel that contain the
packages found in the Profile.
|
static DataResult |
getMissingProfilePackages(User user,
java.lang.Long sid,
java.lang.Long prid,
java.util.Set pkgIdCombos,
PageControl pc)
Returns a list of missing packages.
|
static DataResult |
getMissingSystemPackages(User user,
java.lang.Long sid,
java.lang.Long sid1,
java.util.Set pkgIdCombos,
PageControl pc)
Returns a list of missing packages.
|
static DataResult<ProfileOverviewDto> |
listProfileOverviews(java.lang.Long orgId)
Returns the list of stored profiles.
|
static DataResult<ProfilePackageOverviewDto> |
listProfilePackages(java.lang.Long profileId)
Returns the list of packages associated with a stored profile.
|
static Profile |
lookupByIdAndOrg(java.lang.Long prid,
Org org)
Returns the Profile whose id is prid.
|
static DataResult |
prepareSyncToProfile(java.lang.Long sid,
java.lang.Long prid,
java.lang.Long orgid,
PageControl pc,
java.util.Set pkgIdCombos)
Prepares the list of packages to be synced for comfirmation.
|
static DataResult |
prepareSyncToServer(java.lang.Long sid,
java.lang.Long sid1,
java.lang.Long orgid,
PageControl pc,
java.util.Set pkgIdCombos)
Prepares the list of packages to be synced for comfirmation.
|
static PackageAction |
syncToProfile(User user,
java.lang.Long sid,
java.lang.Long prid,
java.util.Set pkgIdCombos,
java.lang.String missingoption,
java.util.Date earliest)
Syncs the given server id to the given profile id.
|
static PackageAction |
syncToSystem(User user,
java.lang.Long sid,
java.lang.Long sid1,
java.util.Set pkgIdCombos,
java.lang.String missingoption,
java.util.Date earliest)
Syncs the given server id to the given profile id.
|
makeDataResult, makeDataResult, makeDataResult, makeDataResult, makeDataResultNoPagination, makeDataResultNoPagination, processListControl, processPageControlpublic static final java.lang.String OPTION_REMOVE
public static final java.lang.String OPTION_SUBSCRIBE
public static int deleteProfile(Profile profile)
profile - Profile to deletepublic static Profile createProfile(ProfileType type, User user, Channel channel, java.lang.String name, java.lang.String description)
type - ProfileType we want to createuser - Logged in Userchannel - Channel that this Profile is created fromname - Name of profiledescription - Profile descriptionpublic static Profile createProfile(User user, Server server, java.lang.String name, java.lang.String description)
user - Logged in Userserver - Server which profile should be associated with.name - Name of profiledescription - Profile descriptionpublic static void copyFrom(Server server, Profile profile)
server - Server whose packages are to be copied.profile - Profile where packages are copied to.public static java.util.List compatibleWithServer(Server server, Org org)
server - Server whose profiles we want.org - Org ownerpublic static java.util.List comparePackageLists(DataResult profiles, DataResult systems, java.lang.String param)
profiles - Packages to comparesystems - Packages to compareparam - comparison parameterpublic static DataResult compareServerToServer(java.lang.Long sid, java.lang.Long sid1, java.lang.Long orgid, PageControl pc)
sid - Server whose packages are to be compared.sid1 - Server whose packages should be used in the comparison.orgid - Org ownerpc - PageControlpublic static DataResult compareServerToProfile(java.lang.Long sid, java.lang.Long prid, java.lang.Long orgid, PageControl pc)
sid - Server whose packages are to be compared.prid - Profile whose packages should be used in the comparison.orgid - Org ownerpc - PageControlpublic static DataResult prepareSyncToProfile(java.lang.Long sid, java.lang.Long prid, java.lang.Long orgid, PageControl pc, java.util.Set pkgIdCombos)
sid - Server involved in sync.prid - Profile we're syncing with.orgid - Org idpc - PageControlpkgIdCombos - Set of packages selected.public static DataResult prepareSyncToServer(java.lang.Long sid, java.lang.Long sid1, java.lang.Long orgid, PageControl pc, java.util.Set pkgIdCombos)
sid - Server involved in sync.sid1 - Profile we're syncing with.orgid - Org idpc - PageControlpkgIdCombos - Set of packages selected.public static PackageAction syncToSystem(User user, java.lang.Long sid, java.lang.Long sid1, java.util.Set pkgIdCombos, java.lang.String missingoption, java.util.Date earliest)
user - Current usersid - Server id to be affected.sid1 - Profile id to be used to sync.pkgIdCombos - Set of packages which will be synced.missingoption - Defines what do to if packages go missing. null means
ask the user.earliest - The earliest Date to perform this actionpublic static PackageAction syncToProfile(User user, java.lang.Long sid, java.lang.Long prid, java.util.Set pkgIdCombos, java.lang.String missingoption, java.util.Date earliest)
user - Current usersid - Server id to be affected.prid - Profile id to be used to sync.pkgIdCombos - Set of packages which will be synced.missingoption - Defines what do to if packages go missing. null means
ask the user.earliest - The earliest time to perform this actionpublic static DataResult getMissingProfilePackages(User user, java.lang.Long sid, java.lang.Long prid, java.util.Set pkgIdCombos, PageControl pc)
user - Current usersid - Server idprid - Profile idpkgIdCombos - Set of packagespc - page controlpublic static DataResult getMissingSystemPackages(User user, java.lang.Long sid, java.lang.Long sid1, java.util.Set pkgIdCombos, PageControl pc)
user - Current usersid - Server idsid1 - Profile idpkgIdCombos - Set of packagespc - page controlpublic static java.util.List getChildChannelsNeededForProfile(User user, Channel baseChannel, Profile profileIn)
user - making the callbaseChannel - to look for child channels forprofileIn - to iterate over the set of packages for.public static DataResult<ProfileOverviewDto> listProfileOverviews(java.lang.Long orgId)
orgId - The id of the org the profiles are associated with.public static DataResult<ProfilePackageOverviewDto> listProfilePackages(java.lang.Long profileId)
profileId - The id of the profile the packages are associated with.public static Profile lookupByIdAndOrg(java.lang.Long prid, Org org)
prid - Profile id sought.org - The org in which this profile should be found.public static DataResult<ProfileDto> compatibleWithChannel(Channel channelIn, Org orgIn, PageControl pc)
channelIn - that you want the list of Profiles against.orgIn - who owns the Profilespc - PageControl to filter the list.