Class UISchemesOldNames
An old launcher sends the theme parameter it always sent, one of claro (removed as a choice), flat, dbootstrap, ios or ios7, and reports its version in the izr.version entry of the client environment (client.js buildEnv). A launcher whose version predates FAMILIES_SINCE_IIZIRUN has no family choice of its own, so the name it sends also selects the family here; the Dojo widget style it names is still selected as before, and a name that is not a widget style is still dropped by UIThemes.parseNames(String). A current launcher's names pass through unchanged: it sends a family name when it has one, and its widget style names mean only the widget style. An unknown name is dropped whatever the version.
Sits beside the catalogue UISchemes and is read where the server parses the client's theme names (ClientSessionGyro.getSelectedThemes).
- Author:
- Christopher Mindus
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat the server makes of the theme names a client sent.Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe first iiziRun version whose launcher knows the theme families: the IIZI version 5 store release of iiziRun Developer and Custom (ruled DK-D-13, CC-THEME-DARK-V5).Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic UISchemes.FamilygetMappedFamily(String oldName) Gets the family an old theme name maps to.static Map<String, UISchemes.Family> Gets the old theme names, for the tests.parseClientThemes(String s, String iiziRunVersion) Parses the theme names a client sent, mapping an old name to its family when the connecting iiziRun predates the families.static booleanpredatesFamilies(String iiziRunVersion) Checks if an iiziRun version predates the theme families.
Field Details
FAMILIES_SINCE_IIZIRUN
The first iiziRun version whose launcher knows the theme families: the IIZI version 5 store release of iiziRun Developer and Custom (ruled DK-D-13, CC-THEME-DARK-V5). Every launcher in the stores before it is 4.8.0 (Developer, Custom) or older, so the mapping applies to all of them; the release bumpssetup.jsto this version.- See Also:
Constructor Details
UISchemesOldNames
public UISchemesOldNames()
Method Details
getOldNames
Gets the old theme names, for the tests.- Returns:
- The old names, unmodifiable.
getMappedFamily
Gets the family an old theme name maps to.- Parameters:
oldName- The theme name.- Returns:
- The family, or null when the name is not an old one.
predatesFamilies
Checks if an iiziRun version predates the theme families.- Parameters:
iiziRunVersion- Theizr.versionentry of the client environment: the launcher's version as"X.Y.Z", or null or empty for a Browser, which runs no launcher.- Returns:
- true when the version is present and older than
FAMILIES_SINCE_IIZIRUN, false for a current launcher and for a Browser.
parseClientThemes
Parses the theme names a client sent, mapping an old name to its family when the connecting iiziRun predates the families.- Parameters:
s- The names, space separated, or "*" for any; never null.iiziRunVersion- The launcher's version, or null or empty for a Browser.- Returns:
- The widget styles the names select, as
UIThemes.parseNames(String)returns them, and the family they select, null for none. - Throws:
IllegalArgumentException- AsUIThemes.parseNames(String).