public final class ModelHandle extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ModelHandle.Configuration
a javabean wrapper for configurations within the project customizer
|
Modifier and Type | Field and Description |
---|---|
static String |
PANEL_BASIC |
static String |
PANEL_COMPILE |
static String |
PANEL_CONFIGURATION |
static String |
PANEL_LIBRARIES |
static String |
PANEL_MAPPING |
static String |
PANEL_RUN |
static String |
PANEL_SOURCES |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(ModelHandle.Configuration config) |
static ModelHandle.Configuration |
createCustomConfiguration(String id) |
static ModelHandle.Configuration |
createDefaultConfiguration() |
static ModelHandle.Configuration |
createProfileConfiguration(String id) |
ActionToGoalMapping |
getActionMappings()
action mapping model
|
ActionToGoalMapping |
getActionMappings(ModelHandle.Configuration config)
action mapping model
|
ModelHandle.Configuration |
getActiveConfiguration() |
List<ModelHandle.Configuration> |
getConfigurations() |
static NetbeansActionMapping |
getDefaultMapping(String action,
Project project) |
static NetbeansActionMapping |
getMapping(String action,
Project project,
ProjectConfiguration config)
Load a particular action mapping.
|
org.netbeans.modules.maven.model.pom.POMModel |
getPOMModel()
pom.xml model
|
org.apache.maven.project.MavenProject |
getProject()
the non changed (not-to-be-changed) instance of the complete project.
|
String |
getRawAuxiliaryProperty(String propertyName,
boolean shared)
get the value of Auxiliary property defined in the project,
however take only the content in nb-configurations.xml file into account, never
consider values from pom.xml here.
|
boolean |
isModified(Object obj) |
void |
markAsModified(Object obj)
always after modifying the models, mark them as modified.
|
static void |
putMapping(NetbeansActionMapping mapp,
Project project,
ProjectConfiguration config)
Store a particular action mapping.
|
void |
removeConfiguration(ModelHandle.Configuration config) |
void |
setActiveConfiguration(ModelHandle.Configuration conf) |
void |
setRawAuxiliaryProperty(String propertyName,
String value,
boolean shared)
set the value of Auxiliary property, will be written to nb-configurations.xml file
|
static void |
setUserActionMapping(NetbeansActionMapping action,
ActionToGoalMapping mapp)
inserts the action definition in the right place based on matching action name.
|
public static final String PANEL_RUN
public static final String PANEL_BASIC
public static final String PANEL_CONFIGURATION
public static final String PANEL_MAPPING
public static final String PANEL_LIBRARIES
public static final String PANEL_SOURCES
public static final String PANEL_COMPILE
public org.netbeans.modules.maven.model.pom.POMModel getPOMModel()
public org.apache.maven.project.MavenProject getProject()
public String getRawAuxiliaryProperty(String propertyName, boolean shared)
propertyName
- shared
- public void setRawAuxiliaryProperty(String propertyName, String value, boolean shared)
propertyName
- shared
- value
- public ActionToGoalMapping getActionMappings()
public ActionToGoalMapping getActionMappings(ModelHandle.Configuration config)
config
- public static void setUserActionMapping(NetbeansActionMapping action, ActionToGoalMapping mapp)
action
- mapp
- @CheckForNull public static NetbeansActionMapping getDefaultMapping(String action, Project project)
@CheckForNull public static NetbeansActionMapping getMapping(String action, Project project, ProjectConfiguration config)
action
- an action nameproject
- a Maven projectconfig
- a configuration of that projectpublic static void putMapping(NetbeansActionMapping mapp, Project project, ProjectConfiguration config) throws IOException
mapp
- an action mapping modelproject
- a Maven projectconfig
- a configuration of that projectIOException
- in case of troublepublic List<ModelHandle.Configuration> getConfigurations()
public void addConfiguration(ModelHandle.Configuration config)
public void removeConfiguration(ModelHandle.Configuration config)
public ModelHandle.Configuration getActiveConfiguration()
public void setActiveConfiguration(ModelHandle.Configuration conf)
public boolean isModified(Object obj)
public void markAsModified(Object obj)
obj
- either getPOMModel() or getActionMappings()public static ModelHandle.Configuration createProfileConfiguration(String id)
public static ModelHandle.Configuration createDefaultConfiguration()
public static ModelHandle.Configuration createCustomConfiguration(String id)