|
@@ -1160,7 +1160,7 @@ String function cmd_model_move(source : String, target : String):
|
|
|
else:
|
|
|
return "Write permission denied to: " + source!
|
|
|
else:
|
|
|
- return "Location not found: " + source!
|
|
|
+ return "Model not found: " + source!
|
|
|
|
|
|
String function cmd_model_add(type : String, name : String, code : String):
|
|
|
// Model addition operation, which uses model upload commands of the compiler
|
|
@@ -1199,7 +1199,7 @@ String function cmd_model_add(type : String, name : String, code : String):
|
|
|
else:
|
|
|
return "Read permission denied to: " + type!
|
|
|
else:
|
|
|
- return "Location not found: " + type!
|
|
|
+ return "Model not found: " + type!
|
|
|
|
|
|
String function cmd_process_execute(process : String, mapping : Element):
|
|
|
// Execute a process model until it reaches termination
|
|
@@ -1218,7 +1218,7 @@ String function cmd_process_execute(process : String, mapping : Element):
|
|
|
else:
|
|
|
return "Execute permission denied to: " + process!
|
|
|
else:
|
|
|
- return "Location not found: " + process!
|
|
|
+ return "Model not found: " + process!
|
|
|
|
|
|
String function cmd_process_signature(process : String):
|
|
|
// Execute a process model until it reaches termination
|
|
@@ -1247,7 +1247,7 @@ String function cmd_process_signature(process : String):
|
|
|
else:
|
|
|
return "Execute permission denied to model: " + process!
|
|
|
else:
|
|
|
- return "Location not found: " + process!
|
|
|
+ return "Model not found: " + process!
|
|
|
|
|
|
String function cmd_transformation_between(source_dict : String, target_dict : String):
|
|
|
Element result
|
|
@@ -1278,7 +1278,7 @@ String function cmd_transformation_between(source_dict : String, target_dict : S
|
|
|
// Correct tag, so make transformation a possibility
|
|
|
set_add(subresult, readAssociationSource(core, link))
|
|
|
else:
|
|
|
- return "Location not found: " + mm!
|
|
|
+ return "Model not found: " + mm!
|
|
|
|
|
|
// Got a set of subresults now, which we use to find the overlap
|
|
|
result = set_overlap(result, subresult)
|
|
@@ -1299,7 +1299,7 @@ String function cmd_transformation_between(source_dict : String, target_dict : S
|
|
|
// Correct tag, so make transformation a possibility
|
|
|
set_add(subresult, readAssociationSource(core, link))
|
|
|
else:
|
|
|
- return "Location not found: " + mm!
|
|
|
+ return "Model not found: " + mm!
|
|
|
|
|
|
// Got a set of subresults now, which we use to find the overlap
|
|
|
result = set_overlap(result, subresult)
|
|
@@ -1433,11 +1433,11 @@ String function cmd_model_render(model_name : String, mapper_name : String, rend
|
|
|
else:
|
|
|
return "Execute permission denied to: " + mapper_name!
|
|
|
else:
|
|
|
- return "Location not found: " + mapper_name!
|
|
|
+ return "Model not found: " + mapper_name!
|
|
|
else:
|
|
|
return "Read permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
Boolean function do_spawn_modify(model_name : String, write : Boolean):
|
|
|
output("Please edit this model before sending next input: " + model_name)
|
|
@@ -1566,7 +1566,7 @@ String function cmd_transformation_execute(transformation_name : String, source_
|
|
|
else:
|
|
|
return "Read permission denied to: " + source_model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + source_model_name!
|
|
|
+ return "Model not found: " + source_model_name!
|
|
|
|
|
|
targets = allOutgoingAssociationInstances(core, transformation_id, "transformOutput")
|
|
|
outputs = dict_create()
|
|
@@ -1580,7 +1580,7 @@ String function cmd_transformation_execute(transformation_name : String, source_
|
|
|
if (get_entry_id(target_model_name) == ""):
|
|
|
// Doesn't exist yet, so we can easily create
|
|
|
if (get_entry_id(get_foldername(target_model_name)) == ""):
|
|
|
- return "Location not found: " + get_foldername(target_model_name)!
|
|
|
+ return "Model not found: " + get_foldername(target_model_name)!
|
|
|
else:
|
|
|
if (allow_write(current_user_id, get_entry_id(get_foldername(target_model_name)))):
|
|
|
dict_add(output_map, assoc_name, full_name(readAssociationDestination(core, target)))
|
|
@@ -1604,7 +1604,7 @@ String function cmd_transformation_execute(transformation_name : String, source_
|
|
|
else:
|
|
|
return "Execute permission denied to: " + transformation_name!
|
|
|
else:
|
|
|
- return "Location not found: " + transformation_name!
|
|
|
+ return "Model not found: " + transformation_name!
|
|
|
|
|
|
String function cmd_verify(model_name : String, metamodel_name : String):
|
|
|
// Check whether a model conforms to its specification (with the selected type mapping)
|
|
@@ -1626,11 +1626,11 @@ String function cmd_verify(model_name : String, metamodel_name : String):
|
|
|
else:
|
|
|
return "Read permission denied to: " + metamodel_name!
|
|
|
else:
|
|
|
- return "Location not found: " + metamodel_name!
|
|
|
+ return "Model not found: " + metamodel_name!
|
|
|
else:
|
|
|
return "Read permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_model_overwrite(model_name : String, metamodel_name : String):
|
|
|
// Overwrites an existing model without changing any metadata
|
|
@@ -1661,7 +1661,7 @@ String function cmd_model_overwrite(model_name : String, metamodel_name : String
|
|
|
else:
|
|
|
return "Write permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_model_modify(model_name : String, metamodel_name : String):
|
|
|
// Model modify operation, which uses the mini_modify.alc operations, though with extensions for access control
|
|
@@ -1672,23 +1672,26 @@ String function cmd_model_modify(model_name : String, metamodel_name : String):
|
|
|
|
|
|
if (model_id != ""):
|
|
|
if (allow_read(current_user_id, model_id)):
|
|
|
- type_id = anAssociationDestination(core, model_id, "instanceOf")
|
|
|
- if (allow_read(current_user_id, type_id)):
|
|
|
- Element new_model
|
|
|
- new_model = get_full_model(model_id, get_entry_id(metamodel_name))
|
|
|
- if (element_eq(new_model, read_root())):
|
|
|
- return "Conformance hierarchy unknown for: " + model_name!
|
|
|
- modify(new_model, allow_write(current_user_id, model_id))
|
|
|
- if (allow_write(current_user_id, model_id)):
|
|
|
- // Overwrite the modified model
|
|
|
- model_overwrite(new_model, model_id, get_entry_id(metamodel_name))
|
|
|
- return "Success"!
|
|
|
+ type_id = get_entry_id(metamodel_name)
|
|
|
+ if (type_id != ""):
|
|
|
+ if (allow_read(current_user_id, type_id)):
|
|
|
+ Element new_model
|
|
|
+ new_model = get_full_model(model_id, type_id)
|
|
|
+ if (element_eq(new_model, read_root())):
|
|
|
+ return "Conformance hierarchy unknown for: " + model_name!
|
|
|
+ modify(new_model, allow_write(current_user_id, model_id))
|
|
|
+ if (allow_write(current_user_id, model_id)):
|
|
|
+ // Overwrite the modified model
|
|
|
+ model_overwrite(new_model, model_id, type_id)
|
|
|
+ return "Success"!
|
|
|
+ else:
|
|
|
+ return "Read permission denied to: " + full_name(type_id)!
|
|
|
else:
|
|
|
- return string_join("Read permission denied to: ", full_name(type_id))!
|
|
|
+ return "Model not found: " + metamodel_name!
|
|
|
else:
|
|
|
return "Read permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
Void function model_delete(model_id : String):
|
|
|
if (read_type(core, model_id) == "Folder"):
|
|
@@ -1717,7 +1720,7 @@ String function cmd_model_delete(model_name : String):
|
|
|
else:
|
|
|
return "Write permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_model_list(location : String):
|
|
|
// List all models
|
|
@@ -1739,7 +1742,7 @@ String function cmd_model_list(location : String):
|
|
|
else:
|
|
|
return "Read permission denied to: " + location!
|
|
|
else:
|
|
|
- return "Location not found: " + location!
|
|
|
+ return "Model not found: " + location!
|
|
|
|
|
|
String function cmd_model_list_full(location : String):
|
|
|
// List all models with full info
|
|
@@ -1770,7 +1773,7 @@ String function cmd_model_list_full(location : String):
|
|
|
else:
|
|
|
return "Read permission denied to: " + location!
|
|
|
else:
|
|
|
- return "Location not found: " + location!
|
|
|
+ return "Model not found: " + location!
|
|
|
|
|
|
String function cmd_transformation_add_MANUAL(source_models : Element, target_models : Element, operation_name : String):
|
|
|
return transformation_add(source_models, target_models, operation_name, "manual")!
|
|
@@ -1826,7 +1829,7 @@ String function transformation_add(source_models : Element, target_models : Elem
|
|
|
else:
|
|
|
return "Read permission denied to: " + name!
|
|
|
else:
|
|
|
- return "Location not found: " + name!
|
|
|
+ return "Model not found: " + name!
|
|
|
|
|
|
keys = dict_keys(target_models)
|
|
|
while (set_len(keys) > 0):
|
|
@@ -1852,7 +1855,7 @@ String function transformation_add(source_models : Element, target_models : Elem
|
|
|
else:
|
|
|
return "Read permission denied to: " + name!
|
|
|
else:
|
|
|
- return "Location not found: " + name!
|
|
|
+ return "Model not found: " + name!
|
|
|
|
|
|
if (get_entry_id(operation_name) == ""):
|
|
|
// Write out a merged metamodel containing all these models: this is the MM for the manual operation
|
|
@@ -1972,7 +1975,7 @@ String function cmd_transformation_add_MT(source_models : Element, target_models
|
|
|
else:
|
|
|
return "Read permission denied to: " + name!
|
|
|
else:
|
|
|
- return "Location not found: " + name!
|
|
|
+ return "Model not found: " + name!
|
|
|
|
|
|
keys = dict_keys(target_models)
|
|
|
while (set_len(keys) > 0):
|
|
@@ -2002,7 +2005,7 @@ String function cmd_transformation_add_MT(source_models : Element, target_models
|
|
|
else:
|
|
|
return "Read permission denied to: " + name!
|
|
|
else:
|
|
|
- return "Location not found: " + name!
|
|
|
+ return "Model not found: " + name!
|
|
|
|
|
|
merged_formalism = model_fuse(to_ramify)
|
|
|
model_create(merged_formalism, "merged/" + operation_name, get_entry_id("formalisms/SimpleClassDiagrams"), "Model")
|
|
@@ -2091,7 +2094,7 @@ String function cmd_permission_modify(model_name : String, permissions : String)
|
|
|
else:
|
|
|
return "User permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_permission_owner(model_name : String, new_user_name : String):
|
|
|
String model_id
|
|
@@ -2110,7 +2113,7 @@ String function cmd_permission_owner(model_name : String, new_user_name : String
|
|
|
else:
|
|
|
return "User permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_permission_group(model_name : String, new_group_name : String):
|
|
|
String model_id
|
|
@@ -2129,7 +2132,7 @@ String function cmd_permission_group(model_name : String, new_group_name : Strin
|
|
|
else:
|
|
|
return "User permission denied to: " + model_name!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_group_create(group_name : String):
|
|
|
// Create a new group and become its owner
|
|
@@ -2374,7 +2377,7 @@ String function cmd_transformation_signature(transformation_name : String):
|
|
|
else:
|
|
|
return "Model is not an operation: " + transformation_name!
|
|
|
else:
|
|
|
- return "Location not found: " + transformation_name!
|
|
|
+ return "Model not found: " + transformation_name!
|
|
|
|
|
|
String function cmd_model_types(model_name : String):
|
|
|
if (get_entry_id(model_name) != ""):
|
|
@@ -2393,7 +2396,7 @@ String function cmd_model_types(model_name : String):
|
|
|
|
|
|
return result!
|
|
|
else:
|
|
|
- return "Location not found: " + model_name!
|
|
|
+ return "Model not found: " + model_name!
|
|
|
|
|
|
String function cmd_folder_create(folder_name : String):
|
|
|
if (get_entry_id(folder_name) == ""):
|