T
- - the generic type representing the entry (AddProfile for each subclass))public abstract class CreateProfile<T extends CreateProfile.AddProfile> extends MultipleEntryFields<T>
Modifier and Type | Class and Description |
---|---|
static class |
CreateProfile.AddProfile
This abstract class defines the generic fields for every zowe profile.
|
MultipleEntryFields.ProgressViewRendering
PerformanceBenchmarking.SourceFile
ExtensionPoint.LegacyInstancesAreScopedToHudson
zoweCmd
Constructor and Description |
---|
CreateProfile() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req)
This method handles the post request after pressing the save button on the config UI.
|
protected void |
downloadDependencies()
This method downloads and installs the latest version of the zowe ***-for-zowe-cli plugin,
if not installed in the computer.
|
protected void |
downloadZoweCLI()
This method downloads and installs the latest version of the zowe cli, if not installed in the computer.
|
String |
getDisplayName()
Return the display name.
|
String |
getFinalUpdatedMessage(boolean isUpdated,
String result,
T entry)
Returns the final message from a update of new entry action.
|
String |
getMainField(T entry)
Refers to an unique field that represents the entry, e.g.: a name or ID.
|
String |
getMainFieldLabel(T entry)
Refers to an unique label field that represents the entry, like a name or ID.
|
protected abstract String |
getPluginCmd()
Returns the plugin zowe command.
|
protected abstract String |
getPluginDisplayName()
Returns the plugin display name.
|
protected abstract String |
getPluginName()
Returns the plugin name.
|
List<PerformanceBenchmarking.SourceFile> |
getSourceFiles()
Source files associated with this sample.
|
String |
getXMLFile()
Returns the XMLFile name to be stored in the jenkins_home.
|
String |
handleSingleDelete(EntryAction<T> entryAction)
Handles a single new delete entry after saving the configuration.
|
String |
handleSingleNewEntry(EntryAction<T> entryAction)
Handles a single new swipeable entry after saving the configuration.
|
String |
handleSingleUpdate(UpdateAction<T> entryAction)
Handles a single new update entry after saving the configuration.
|
protected boolean |
invalidEntries()
Evaluates whether the configuration has invalid entries.
|
boolean |
isSuccessful(String result)
Handles whether the output of the entry action is successful.
|
protected void |
postProcessEntries()
Post processes the entries after the action items.
|
entries, getConfigFile, getDifferentEntries, getEntries, getModifiedEntries, getProcesses, processSingleEntry, setConfig, setEntries
all, doSourceFile, getDescription, getDescriptor, getGroovySamples, getIconFileName, getOtherSamples, getUrlName
public List<PerformanceBenchmarking.SourceFile> getSourceFiles()
PerformanceBenchmarking
getSourceFiles
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
@POST public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException, IOException
MultipleEntryFields
doConfigSubmit
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
req
- - the POST requestjavax.servlet.ServletException
- if an error occurs in the application serverIOException
- if an I/O error occursprotected boolean invalidEntries()
MultipleEntryFields
invalidEntries
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
public String handleSingleDelete(EntryAction<T> entryAction)
MultipleEntryFields
handleSingleDelete
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
entryAction
- - the generic type that corresponds the entry.public String handleSingleUpdate(UpdateAction<T> entryAction)
MultipleEntryFields
handleSingleUpdate
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
entryAction
- - the generic type that corresponds the entry.public String handleSingleNewEntry(EntryAction<T> entryAction)
MultipleEntryFields
handleSingleNewEntry
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
entryAction
- - the generic type that corresponds the entry.public String getMainFieldLabel(T entry)
MultipleEntryFields
getMainFieldLabel
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
entry
- - the generic type that corresponds the entry.public String getMainField(T entry)
MultipleEntryFields
getMainField
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
entry
- - the generic type that corresponds the entry.public String getFinalUpdatedMessage(boolean isUpdated, String result, T entry)
MultipleEntryFields
getFinalUpdatedMessage
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
isUpdated
- - whether an update action occurred.result
- - action response, .e.g: the command outputentry
- - the generic type that represents the entrypublic boolean isSuccessful(String result)
MultipleEntryFields
isSuccessful
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
result
- - the result of the entry action, e.g.: the command output after saving the config file.public String getXMLFile()
MultipleEntryFields
getXMLFile
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
getDisplayName
in class PerformanceBenchmarking
protected void postProcessEntries()
MultipleEntryFields
postProcessEntries
in class MultipleEntryFields<T extends CreateProfile.AddProfile>
protected void downloadZoweCLI()
protected void downloadDependencies()
protected abstract String getPluginName()
protected abstract String getPluginCmd()
protected abstract String getPluginDisplayName()
Copyright © 2016–2022. All rights reserved.