Updated resources types support
This commit is contained in:
parent
cd7f4dca11
commit
59027a3452
|
@ -27,7 +27,7 @@ public enum ResourceTypeDecorator {
|
|||
GHN("gCube Hosting Node", "ghn-icon","Hosting Node"),
|
||||
|
||||
//GCore Endpoint aka ESservice
|
||||
RunningInstance("Running Instances", "runninginstance-icon", " EService"),
|
||||
RunningInstance("Running Instances", "runninginstance-icon", "EService"),
|
||||
//Generic Resource aka Configuration
|
||||
GenericResource("Generic Resources", "genericresource-icon","Configuration"),
|
||||
|
||||
|
@ -43,23 +43,31 @@ public enum ResourceTypeDecorator {
|
|||
* NEW RESOURCES IN THE TREE
|
||||
****************************************/
|
||||
|
||||
EService("EService", "runninginstance-icon","E Servicee"),
|
||||
Resource("Resource","ghn-icon","Resource"),
|
||||
LegalBody("LegalBody","ghn-icon","LegalBody"),
|
||||
//Service("","",""),
|
||||
HostingNode("gCube Hosting Node", "ghn-icon","Hosting Node"),
|
||||
Site("Site","ghn-icon","Site"),
|
||||
Dataset("Dataset","ghn-icon","Dataset"),
|
||||
Schema("Schema","ghn-icon","Schema"),
|
||||
ConfigurationTemplate("ConfigurationTemplate","ghn-icon","Configuration Template"),
|
||||
ConcreteDataset("ConcreteDataset","ghn-icon","ConcreteDataset"),
|
||||
Configuration("Configuration","ghn-icon","Configuration"),
|
||||
RunningPlugin("RunningPlugin","ghn-icon","RunningPlugin"),
|
||||
VirtualService("VirtualService","runtimeresource-icon","VirtualService"),
|
||||
Actor("Actor","ghn-icon","Actor"),
|
||||
Plugin("Plugin","ghn-icon","Plugin"),
|
||||
LegalBody("LegalBody","ghn-icon","LegalBody"),
|
||||
Person("Person","person-icon","Person"),
|
||||
|
||||
Person("Person","ghn-icon","Person"),
|
||||
ConfigurationTemplate("ConfigurationTemplate","ghn-icon","ConfigurationTemplate"),
|
||||
Configuration("Configuration","ghn-icon","Configuration"),
|
||||
|
||||
Dataset("Dataset","ghn-icon","Dataset"),
|
||||
ConcreteDataset("ConcreteDataset","ghn-icon","ConcreteDataset"),
|
||||
|
||||
Schema("Schema","ghn-icon","Schema"),
|
||||
|
||||
//Service("","",""), Conflict with old Version
|
||||
EService("EService", "runninginstance-icon","EService"),
|
||||
RunningPlugin("RunningPlugin","runningplugin-icon","RunningPlugin"),
|
||||
HostingNode("gCube Hosting Node", "ghn-icon","Hosting Node"),
|
||||
//VirtualMachine("","","")
|
||||
VirtualService("VirtualService","runtimeresource-icon","VirtualService"),
|
||||
|
||||
Site("Site","site-icon","Site"),
|
||||
|
||||
Software("Software","ghn-icon","Software"),
|
||||
Plugin("Plugin","plugin-icon","Plugin"),
|
||||
|
||||
Resource("Resource","ghn-icon","Resource"),
|
||||
|
||||
|
||||
/****************************************
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.gcube.resourcemanagement.support.shared.types.datamodel;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
|
||||
|
||||
|
@ -323,6 +322,307 @@ public class ResourceDetailModel {
|
|||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.InstallableSoftware.name(), type);
|
||||
|
||||
// TODO New Registry
|
||||
/*********************************************
|
||||
* Actor
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Actor.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Actor.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* LegalBody
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.LegalBody.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.LegalBody.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Person
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Person.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Person.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* ConfigurationTemplate
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.ConfigurationTemplate.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.ConfigurationTemplate.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Configuration
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 200));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 400));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "Secondary Type", 170));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 3; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.GenericResource.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
type.addField("Scopes");
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.GenericResource.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Dataset
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Dataset.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Dataset.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* ConcreteDataset
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.ConcreteDataset.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.ConcreteDataset.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Schema
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Schema.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Schema.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* RunningInstance
|
||||
********************************************/
|
||||
|
@ -365,7 +665,6 @@ public class ResourceDetailModel {
|
|||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.RunningInstance.name(), type);
|
||||
|
||||
// NEW REGISTRY
|
||||
/*********************************************
|
||||
* EService
|
||||
********************************************/
|
||||
|
@ -408,8 +707,78 @@ public class ResourceDetailModel {
|
|||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.EService.name(), type);
|
||||
|
||||
//TODO VirtualService
|
||||
// NEW REGISTRY
|
||||
/*********************************************
|
||||
* RunningPlugin
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.RunningPlugin.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.RunningPlugin.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* PROFILES OF RELATED RESOURCES: GHN
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("ServiceClass", "Service Class", 200));
|
||||
modelColumns.add(new ColumnConfig("ServiceName", "Service Name", 260));
|
||||
modelColumns.add(new ColumnConfig("ServiceVersion", "Service Version", 100));
|
||||
modelColumns.add(new ColumnConfig("MainVersion", "Main Version", 100));
|
||||
modelColumns.add(new ColumnConfig("Status", "Status", 65));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.GHNRelated.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("ServiceClass");
|
||||
type.addField("ServiceName");
|
||||
type.addField("ServiceVersion");
|
||||
type.addField("MainVersion");
|
||||
type.addField("Status");
|
||||
XML_MAPPING.put(ResourceTypeDecorator.GHNRelated.name(), type);
|
||||
|
||||
// VirtualMachine
|
||||
|
||||
/*********************************************
|
||||
* VirtualService
|
||||
********************************************/
|
||||
|
@ -417,7 +786,7 @@ public class ResourceDetailModel {
|
|||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
//modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
|
@ -437,7 +806,7 @@ public class ResourceDetailModel {
|
|||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
//type.addField("Version");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
@ -448,6 +817,124 @@ public class ResourceDetailModel {
|
|||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.VirtualService.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Site
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Site.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Site.name(), type);
|
||||
|
||||
|
||||
/*********************************************
|
||||
* Software
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Software.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Software.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* Plugin
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 260));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 200));
|
||||
// modelColumns.add(new ColumnConfig("Version", "Version", 100));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.Plugin.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
// type.addField("Version");
|
||||
// a) This is the GHNID type.addField("GHN", "/Profile/GHN/@UniqueID");
|
||||
// b) While this is its name
|
||||
type.addField("Scopes");
|
||||
|
||||
// These fields are internally used and not showable
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.Plugin.name(), type);
|
||||
|
||||
|
||||
//TODO End New Registry
|
||||
|
||||
/*********************************************
|
||||
* VIEW
|
||||
********************************************/
|
||||
|
@ -499,40 +986,6 @@ public class ResourceDetailModel {
|
|||
GWT.log("VIew Name: " + ResourceTypeDecorator.VIEW.name());
|
||||
XML_MAPPING.put(ResourceTypeDecorator.VIEW.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* GenericResource
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Name", "Name", 200));
|
||||
modelColumns.add(new ColumnConfig("Description", "Description", 400));
|
||||
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
|
||||
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
modelColumns.add(new ColumnConfig("SubType", "Secondary Type", 170));
|
||||
modelColumns.add(new ColumnConfig("SubType", "SubType", 200));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 3; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.GenericResource.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("Name");
|
||||
type.addField("Description");
|
||||
type.addField("Scopes");
|
||||
type.addField("SubType");
|
||||
type.addField("Type");
|
||||
|
||||
XML_MAPPING.put(ResourceTypeDecorator.GenericResource.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* RuntimeResource
|
||||
********************************************/
|
||||
|
@ -608,38 +1061,6 @@ public class ResourceDetailModel {
|
|||
type.addField("Type");
|
||||
XML_MAPPING.put(ResourceTypeDecorator.WSResource.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* PROFILES OF RELATED RESOURCES: GHN
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("ServiceClass", "Service Class", 200));
|
||||
modelColumns.add(new ColumnConfig("ServiceName", "Service Name", 260));
|
||||
modelColumns.add(new ColumnConfig("ServiceVersion", "Service Version", 100));
|
||||
modelColumns.add(new ColumnConfig("MainVersion", "Main Version", 100));
|
||||
modelColumns.add(new ColumnConfig("Status", "Status", 65));
|
||||
// Optional
|
||||
modelColumns.add(new ColumnConfig("ID", "ID", 220));
|
||||
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
for (int i = 5; i < modelColumns.size(); i++) {
|
||||
cm.setHidden(i, true);
|
||||
}
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.GHNRelated.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("ID");
|
||||
type.addField("ServiceClass");
|
||||
type.addField("ServiceName");
|
||||
type.addField("ServiceVersion");
|
||||
type.addField("MainVersion");
|
||||
type.addField("Status");
|
||||
XML_MAPPING.put(ResourceTypeDecorator.GHNRelated.name(), type);
|
||||
|
||||
/*********************************************
|
||||
* PROFILES OF RELATED RESOURCES: RunningInstance
|
||||
********************************************/
|
||||
|
@ -659,27 +1080,6 @@ public class ResourceDetailModel {
|
|||
type.addField("Value");
|
||||
XML_MAPPING.put(ResourceTypeDecorator.RunningInstanceRelated.name(), type);
|
||||
|
||||
// NEW REGISTRY
|
||||
/*********************************************
|
||||
* PROFILES OF RELATED RESOURCES: EService
|
||||
********************************************/
|
||||
// The column model for grid representation
|
||||
modelColumns = new ArrayList<ColumnConfig>();
|
||||
modelColumns.add(new ColumnConfig("Key", "Name", 200));
|
||||
modelColumns.add(new ColumnConfig("Value", "Value", 260));
|
||||
// create the column model
|
||||
cm = new ColumnModel(modelColumns);
|
||||
RECORD_DEFINITION.put(ResourceTypeDecorator.EService.name(), cm);
|
||||
|
||||
// defines the xml structure
|
||||
type = new ModelType();
|
||||
type.setRoot("Resources");
|
||||
type.setRecordName("Resource");
|
||||
type.addField("Key");
|
||||
type.addField("Value");
|
||||
XML_MAPPING.put(ResourceTypeDecorator.EService.name(), type);
|
||||
|
||||
|
||||
/*********************************************
|
||||
* PROFILES OF RELATED RESOURCES: Service
|
||||
********************************************/
|
||||
|
@ -811,10 +1211,8 @@ public class ResourceDetailModel {
|
|||
XML_MAPPING.put(ResourceTypeDecorator.Sweeper_RI.name(), type);
|
||||
|
||||
|
||||
//TODO Validatators
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************
|
||||
* VALIDATORS
|
||||
********************************************/
|
||||
|
@ -824,24 +1222,54 @@ public class ResourceDetailModel {
|
|||
|
||||
REQUIRED_FIELDS = new HashMap<String, String[]>();
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.GHN.name(), new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Collection.name(),
|
||||
new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.GenericResource.name(),
|
||||
new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.RuntimeResource.name(),
|
||||
new String[] { "Name", "SubType", "ID", "Host", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.VIEW.name(), new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.WSResource.name(),
|
||||
new String[] { "SourceKey", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Actor.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.LegalBody.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Person.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.ConfigurationTemplate.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.GenericResource.name(),
|
||||
new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Dataset.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.ConcreteDataset.name(),
|
||||
new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Schema.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Service.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.RunningInstance.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes", "GHN" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.EService.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes", "GHN" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.RunningPlugin.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.GHN.name(), new String[] { "Name", "SubType", "ID", "Scopes" });
|
||||
// VirtualMachine
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.VirtualService.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Service.name(),
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Site.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Software.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.Plugin.name(),
|
||||
new String[] { "ServiceClass", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
REQUIRED_FIELDS.put(ResourceTypeDecorator.WSResource.name(),
|
||||
new String[] { "SourceKey", "ServiceName", "ID", "SubType", "Scopes" });
|
||||
}
|
||||
|
||||
public static final ColumnModel getRecordDefinition(final String nodeID) {
|
||||
|
|
Loading…
Reference in New Issue