public class Pack extends Object implements Serializable
| Constructor and Description |
|---|
Pack(String name,
String langPackId,
String description,
List<OsModel> osConstraints,
List<String> dependencies,
boolean required,
boolean preselected,
boolean loose,
String excludeGroup,
boolean uninstall,
long size)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(String child)
Add a child to this pack.
|
void |
addDependant(String name)
Adds the name of a pack that is dependent on this pack.
|
void |
addDependency(String name)
Adds a dependency on another pack.
|
void |
addFileSize(long add)
Adds to the size of the pack.
|
void |
addValidator(String validatorClassName)
Adds a pack validator.
|
boolean |
equals(Object obj) |
List<String> |
getChildren()
Returns the children pack names.
|
String |
getCondition()
Returns the condition that must be fulfilled for the pack to be installed.
|
List<String> |
getDependants()
Returns the names of the pack that are dependent on this pack.
|
List<String> |
getDependencies()
Returns the pack's dependencies.
|
String |
getDescription()
Returns the pack description.
|
String |
getExcludeGroup()
Returns the exclude group for the pack.
|
long |
getFileSize()
Returns the size of the pack.
|
String |
getGroup()
Returns the pack group.
|
String |
getImageId()
Returns the pack image resource identifier.
|
Set<String> |
getInstallGroups()
Returns the installation groups that this pack belongs to.
|
String |
getLangPackId()
Returns the language pack identifier, used for internationalisation.
|
String |
getName()
Returns the pack name.
|
Map<String,String> |
getOnDeselect() |
Map<String,String> |
getOnSelect() |
List<OsModel> |
getOsConstraints()
Returns the target platforms for the pack.
|
String |
getParent()
Returns the parent pack name.
|
long |
getSize()
Returns the size of the pack.
|
List<String> |
getValidators()
Returns the pack validators.
|
boolean |
hasChildren() |
boolean |
hasCondition()
Determines if the pack has a condition for installation.
|
boolean |
hasDependencies() |
boolean |
hasParent() |
boolean |
isHidden()
Determines if the pack should be hidden.
|
boolean |
isLoose()
Determines if pack files are stored outside of the installation packages.
|
boolean |
isPreselected()
Determines if the pack should be preselected for installation.
|
boolean |
isRequired()
Determined if the pack is required.
|
boolean |
isUninstall()
Determines if the pack files are deleted at uninstallation.
|
void |
setCondition(String condition)
Sets a condition that must be fulfilled for the pack to be installed.
|
void |
setDependants(List<String> dependants)
Sets the names of the packs that require this pack.
|
void |
setDependencies(List<String> dependencies)
Sets the names of packs that this pack is dependent on.
|
void |
setExcludeGroup(String group)
Sets the exclude group for the pack.
|
void |
setFileSize(long size)
Sets the size of the pack.
|
void |
setGroup(String group)
Sets the pack group.
|
void |
setHidden(boolean hidden)
Determines if the pack should be hidden.
|
void |
setImageId(String imageId)
Sets the pack image resource identifier.
|
void |
setLangPackId(String langPackId)
Sets the language pack identifier, used for internationalisation.
|
void |
setLoose(boolean loose)
Determines if pack files are stored outside of the installation packages.
|
void |
setOnDeselect(String names,
String condition)
Determines what packs to be selected or deselected when this pack is deselected.
|
void |
setOnSelect(String names,
String condition)
Determines what packs to be selected or deselected when this pack is selected.
|
void |
setOsConstraints(List<OsModel> platforms)
Sets the target platforms for the pack.
|
void |
setParent(String parent)
Sets the parent pack name.
|
void |
setPreselected(boolean preselected)
Determines if the pack should be preselected for installation.
|
void |
setSize(long size)
Sets the size of the pack.
|
static String |
toByteUnitsString(long bytes)
Convert bytes into appropriate measurements.
|
String |
toString()
To a String (useful for JLists).
|
public Pack(String name, String langPackId, String description, List<OsModel> osConstraints, List<String> dependencies, boolean required, boolean preselected, boolean loose, String excludeGroup, boolean uninstall, long size)
name - the pack name. Uniquely identifies the packlangPackId - the id of the pack used for I18N. May be null.description - the pack description. May be nullosConstraints - the OS constraint. If null indicates the pack applies to all OSesdependencies - dependencies of this pack. May be nullrequired - determines if the pack is required or notpreselected - if true the pack will be selected automatically for installationloose - if true files of this pack are stored outside the installation jar fileexcludeGroup - associated exclude group. May be nulluninstall - if true, the pack must be uninstalledsize - the pack sizepublic String getName()
public void setLangPackId(String langPackId)
langPackId - the language pack identifier. May be nullpublic String getLangPackId()
nullpublic String getDescription()
nullpublic void setOsConstraints(List<OsModel> platforms)
platforms - the target platforms. If null or empty, indicates the pack applies to all platformspublic List<OsModel> getOsConstraints()
null or empty, indicates the pack applies to all platformspublic void setDependencies(List<String> dependencies)
dependencies - a list of pack names. May be nullpublic List<String> getDependencies()
nullpublic boolean hasDependencies()
public void addDependency(String name)
name - the name of the pack this pack is dependent onpublic void setDependants(List<String> dependants)
dependants - the dependants. May be nullpublic List<String> getDependants()
nullpublic void addDependant(String name)
name - the dependant pack namepublic boolean isRequired()
true if the pack is required; false if it is optionalpublic void setPreselected(boolean preselected)
preselected - if true, the pack should be preselectedpublic boolean isPreselected()
true if the pack should be preselectedpublic void setLoose(boolean loose)
loose - if true, pack files are stored outside of the installation packagespublic boolean isLoose()
true if pack files are stored outside of the installation packagespublic void setExcludeGroup(String group)
group - the exclude group. May be nullpublic String getExcludeGroup()
nullpublic boolean isUninstall()
true if all files of the pack will be deleted during uninstallation;
false if they should be retained (subject to the uninstaller force delete option)public Set<String> getInstallGroups()
public void setGroup(String group)
group - the group. May be nullpublic String getGroup()
nullpublic void setSize(long size)
size - the size of the pack, in bytespublic long getSize()
public void setFileSize(long size)
size - the size of the pack, in bytespublic void addFileSize(long add)
add - the no. of bytes to addpublic long getFileSize()
public void setParent(String parent)
parent - the parent pack name. May be nullpublic String getParent()
nullpublic boolean hasParent()
true if the pack has a parent otherwise falsepublic void addChild(String child)
public List<String> getChildren()
public boolean hasChildren()
true if the pack has a parent otherwise falsepublic void setImageId(String imageId)
imageId - the image resource identifier. May be nullpublic String getImageId()
null, then the pack has no imagepublic void setCondition(String condition)
condition - the condition to set. If null, indicates that installation is unconditionalpublic String getCondition()
null, indicates that installation is unconditionalpublic boolean hasCondition()
true if the pack has a condition, false if installation is unconditionalpublic void addValidator(String validatorClassName)
validatorClassName - the pack validator class namepublic List<String> getValidators()
public void setHidden(boolean hidden)
hidden - true if the pack should be hidden, false if it should be displayedpublic boolean isHidden()
true if the pack should be hidden, false if it should be displayedpublic String toString()
public static String toByteUnitsString(long bytes)
bytes - the bytespublic void setOnSelect(String names, String condition)
names - names of a pack to be selected/deselected separated by a commacondition - select/deselect a pack when this pack is selected and condition is satisfied or nullpublic void setOnDeselect(String names, String condition)
names - name of a pack to be selected/deselected separated by a commacondition - select/deselect a pack when this pack is deselected and condition is satisfied or nullCopyright © 2001–2025. All rights reserved.