public class StructureLoader extends DefaultHandler implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DECLARATION_MODE |
static String |
DEFAULT_TYPE_DECLARATION_MODE |
static String |
SESSION_CUSTOM_LOADER |
static String |
SESSION_USER_PK |
static SingletonCreator.Creator<StructureLoader> |
SINGLETON_CREATOR |
static String |
TYPE_DECLARATION_MODE_APPEND |
static String |
TYPE_DECLARATION_MODE_DELETE |
static String |
TYPE_DECLARATION_MODE_REPLACE |
| Modifier | Constructor and Description |
|---|---|
protected |
StructureLoader() |
protected |
StructureLoader(StructureLoaderData presetData,
Set<PK> customStructureUserGroupPKs,
boolean initialized) |
| Modifier and Type | Method and Description |
|---|---|
List<SearchResultActionNode> |
addSearchResultActionsInternal(ComposedType type) |
static void |
assureLoaded(JaloSession jaloSession,
HttpServletRequest request) |
protected void |
checkOutdated(JaloSession jaloSession,
HttpServletRequest request,
boolean productiveMode) |
void |
checkToolbarActions(JaloSession session) |
protected Node |
createNode(Node parent,
String name,
Map<String,String> attributes) |
static String |
createTimeStamp()
Returns a unique timestamp.
|
void |
dumpStructure(OutputStream outputStream) |
void |
endElement(String uri,
String localName,
String qName) |
void |
error(SAXParseException exception) |
void |
fatalError(SAXParseException exception) |
GroupNode |
findGroupNode(TreeNode root,
String name) |
TabNode |
findTabNode(Node root,
String id) |
static AttributeChipNode |
getAttributeChipNode(AttributeDescriptor desc) |
static Class |
getAttributeDisplayClass(Class attributeClass)
Returns a Class object of the attribute display chip which is mapped to the given attribute type class.
|
static Class |
getAttributeEditorClass(String editorType)
Returns a Class object of the attribute editor chip which is mapped to the given editor type string.
|
static AttributeTypeNode |
getAttributeTypeNode(Class attributeClass)
Returns the
AttributeTypeNode which contains the default configuration of the display- and
editorchips of the given attribute class. |
static Map<Class<?>,Class<?>> |
getClassMappings(Class<?> mappingNodeClass)
Returns the classmappings for the given mappingnode class.
|
protected Map<Class<?>,Class<?>> |
getClassMappingsInternal(Class<?> mappingNodeClass) |
protected ConfigurationNode |
getConfigurationNode() |
static CreateAction |
getCreateAction() |
protected StructureLoaderData |
getData() |
static Map<String,String> |
getDefaultEditorTypes() |
static DefaultReferenceNode |
getDefaultReferenceNode(ComposedType type) |
static int |
getDefaultSearchResultViewMode(ComposedType type) |
static ClassConfigNode |
getDisplayNode(Class attributeClass) |
static EditorNode |
getEditorNode(ComposedType type) |
static EditorNode |
getEditorNode(Item item) |
static EssentialsNode |
getEssentialsNode(ComposedType type) |
static ExplorerNode |
getExplorerLayout(ComposedType type) |
static ExplorerTreeNode |
getExplorerTreeNode() |
static int |
getExplorerTreeWidth()
Returns the width of the explorer tree.
|
static String |
getIcon(ComposedType type) |
static Set<LabelNode> |
getLabelNodes(ComposedType type,
String labelname) |
static Set<LabelNode> |
getLabelNodes(String labelname) |
static Set<LabelNode> |
getLabelNodes(TypeNode typeNode,
String labelname) |
static LoadAction |
getLoadAction() |
static StructureLoader |
getLoader() |
String |
getParseResult() |
static String |
getReferenceFinderAttributeName(ComposedType type) |
static List<String> |
getReferenceSearchAttributeNames(ComposedType type)
In contrast to
getReferenceFinderAttributeName(ComposedType) this method tries to extract several
attribute names from the 'searchattribute' setting which are comma separated. |
static RemoveAction |
getRemoveAction() |
protected static StructureLoader |
getRootLoader() |
static SaveAction |
getSaveAction() |
static SearchNode |
getSearchNode(ComposedType type) |
static List<SearchResultActionNode> |
getSearchResultActions(ComposedType type)
returns a List of
SearchResultActionNodes for the given type |
static ItemLayoutNode |
getSearchResultItemLayoutNode(ComposedType type,
int viewMode) |
protected String |
getTimestamp() |
static List<ToolbarActionNode> |
getToolbarActions()
returns a List of
ToolbarActionNodes |
List<ToolbarActionNode> |
getToolbarActionsInternal() |
static List<TypeNode> |
getToolbarCreateTypes()
returns a List of
TypeNodes |
List<TypeNode> |
getToolbarCreateTypesInternal() |
static List |
getTreeNodeChips(DisplayState displayState,
Chip parent) |
static ExplorableNode |
getTreeViewExplorableNode(ComposedType type)
Returns explorable node of the tree view section of the search result.
|
static TypeNode |
getTypeNode(ComposedType composedType) |
static Collection<TypeNode> |
getTypeNodes()
return Collection of
TypeNodes. |
Collection<TypeNode> |
getTypeNodesInternal() |
static boolean |
hasLoader() |
static boolean |
hasWarnings() |
boolean |
isOutdated() |
static boolean |
isUsingDBForStructure() |
protected boolean |
isValidForUser(User user) |
boolean |
loadStructure(InputStream isToRead,
String schemaURL)
Starts the loading of throws structure from the specified stream.
|
boolean |
loadStructure(String resourceName,
String schemaURL)
Starts the loading of structure from the specified file.
|
protected boolean |
loadXML(InputStream isToRead,
String schemaURL) |
static EditorNode |
modifyEditorNode(EditorNode toModify,
String xmlCfg)
Applies changes to an existing
EditorNode defined within a given xml string. |
void |
printConfig(DisplayState displayState,
String fileName) |
void |
printWarning(ComposedType type,
String warning) |
void |
printWarning(String warning) |
void |
printWarnings() |
void |
replaceTabRefNodes(Node root) |
protected void |
restoreData(StructureLoaderData newData) |
protected void |
setTimestamp(String timestamp) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
protected Set<PK> |
toPKSet(Set<UserGroup> grps) |
String |
toString() |
static void |
unsetCurrentLoader() |
void |
warning(SAXParseException exception) |
characters, endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclpublic static final String TYPE_DECLARATION_MODE_APPEND
public static final String TYPE_DECLARATION_MODE_DELETE
public static final String TYPE_DECLARATION_MODE_REPLACE
public static final String DEFAULT_TYPE_DECLARATION_MODE
public static final String DEFAULT_DECLARATION_MODE
public static final String SESSION_CUSTOM_LOADER
public static final String SESSION_USER_PK
public static final SingletonCreator.Creator<StructureLoader> SINGLETON_CREATOR
protected StructureLoader()
protected StructureLoader(StructureLoaderData presetData, Set<PK> customStructureUserGroupPKs, boolean initialized)
protected boolean isValidForUser(User user)
public static boolean isUsingDBForStructure()
public boolean isOutdated()
public static void unsetCurrentLoader()
protected String getTimestamp()
protected void setTimestamp(String timestamp)
protected void checkOutdated(JaloSession jaloSession, HttpServletRequest request, boolean productiveMode)
public static void assureLoaded(JaloSession jaloSession, HttpServletRequest request)
public static String createTimeStamp()
protected StructureLoaderData getData()
protected void restoreData(StructureLoaderData newData)
public static final boolean hasLoader()
public static final StructureLoader getLoader()
protected static final StructureLoader getRootLoader()
public static EditorNode modifyEditorNode(EditorNode toModify, String xmlCfg)
EditorNode defined within a given xml string. The existing node is
not changed itself but copied, altered and returned. Please note that the newly created node does not
become part of the current hmc configuration but exists only for temporary usage.toModify - xmlCfg - public boolean loadStructure(String resourceName, String schemaURL) throws IOException
resourceName - Name of the XML file containing the structure.schemaURL - URL of the xsd file which will be used to validate the xml file.IOExceptionpublic void dumpStructure(OutputStream outputStream)
public boolean loadStructure(InputStream isToRead, String schemaURL) throws IOException
isToRead - schemaURL - IOExceptionprotected boolean loadXML(InputStream isToRead, String schemaURL)
public static EssentialsNode getEssentialsNode(ComposedType type)
public static EditorNode getEditorNode(Item item)
public static EditorNode getEditorNode(ComposedType type)
public static ItemLayoutNode getSearchResultItemLayoutNode(ComposedType type, int viewMode)
public static int getDefaultSearchResultViewMode(ComposedType type)
public static ExplorableNode getTreeViewExplorableNode(ComposedType type)
type - public static DefaultReferenceNode getDefaultReferenceNode(ComposedType type)
public static String getReferenceFinderAttributeName(ComposedType type)
public static List<String> getReferenceSearchAttributeNames(ComposedType type)
getReferenceFinderAttributeName(ComposedType) this method tries to extract several
attribute names from the 'searchattribute' setting which are comma separated. Especially the
AutocompleteReferenceEditorChip can use more than one search attribute
which it will use performing an OR search on all attributes (and showing the results using all given attributes).type - the ComposedType for which to find the search attribute namespublic static ExplorerNode getExplorerLayout(ComposedType type)
public static String getIcon(ComposedType type)
public static SearchNode getSearchNode(ComposedType type)
public static TypeNode getTypeNode(ComposedType composedType)
public static AttributeChipNode getAttributeChipNode(AttributeDescriptor desc)
public static List getTreeNodeChips(DisplayState displayState, Chip parent)
GenericExplorerMenuTreeNodeChipspublic void error(SAXParseException exception) throws SAXException
error in interface ErrorHandlererror in class DefaultHandlerSAXExceptionpublic void fatalError(SAXParseException exception) throws SAXException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXExceptionpublic void warning(SAXParseException exception) throws SAXException
warning in interface ErrorHandlerwarning in class DefaultHandlerSAXExceptionpublic String getParseResult()
protected ConfigurationNode getConfigurationNode()
public static ExplorerTreeNode getExplorerTreeNode()
public static int getExplorerTreeWidth()
public static Collection<TypeNode> getTypeNodes()
TypeNodes.public Collection<TypeNode> getTypeNodesInternal()
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXExceptionpublic static List<TypeNode> getToolbarCreateTypes()
TypeNodespublic static List<ToolbarActionNode> getToolbarActions()
ToolbarActionNodespublic static List<SearchResultActionNode> getSearchResultActions(ComposedType type)
SearchResultActionNodes for the given typepublic static SaveAction getSaveAction()
public static LoadAction getLoadAction()
public static CreateAction getCreateAction()
public static RemoveAction getRemoveAction()
public List<ToolbarActionNode> getToolbarActionsInternal()
public List<SearchResultActionNode> addSearchResultActionsInternal(ComposedType type)
public void checkToolbarActions(JaloSession session)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXExceptionpublic void replaceTabRefNodes(Node root)
protected Node createNode(Node parent, String name, Map<String,String> attributes) throws NodeCreationFailedException
NodeCreationFailedExceptionpublic void printConfig(DisplayState displayState, String fileName) throws IOException
IOExceptionpublic void printWarning(String warning)
public void printWarning(ComposedType type, String warning)
public static Map<Class<?>,Class<?>> getClassMappings(Class<?> mappingNodeClass)
protected Map<Class<?>,Class<?>> getClassMappingsInternal(Class<?> mappingNodeClass)
public static Class getAttributeEditorClass(String editorType)
public static Class getAttributeDisplayClass(Class attributeClass)
public static AttributeTypeNode getAttributeTypeNode(Class attributeClass)
AttributeTypeNode which contains the default configuration of the display- and
editorchips of the given attribute class.public static ClassConfigNode getDisplayNode(Class attributeClass)
public void printWarnings()
public static Set<LabelNode> getLabelNodes(ComposedType type, String labelname)
public static boolean hasWarnings()
Copyright © 2017 SAP SE. All Rights Reserved.