nitc :: CmdMetadata
nitc :: CmdMetadata :: _metadata
MPackage metadata retrievednitc :: CmdMetadata :: defaultinit
nitc :: CmdMetadata :: metadata=
MPackage metadata retrievednitc $ CmdMetadata :: SELF
Type of this instance, automatically specialized in every classnitc :: json_commands $ CmdMetadata :: to_json
Return a JSON Serializable representation ofself
results
nitc :: CmdEntity :: _mentity_name
Name of the mentity this command is aboutnitc :: CmdMetadata :: _metadata
MPackage metadata retrievedcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.core :: Object :: defaultinit
nitc :: CmdEntity :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: CmdMetadata :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: CmdEntity :: mentity_name
Name of the mentity this command is aboutnitc :: CmdEntity :: mentity_name=
Name of the mentity this command is aboutnitc :: CmdMetadata :: metadata=
MPackage metadata retrievedcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# Retrieve the catalog metadata for a MPackage
class CmdMetadata
super CmdEntity
# MPackage metadata retrieved
var metadata: nullable MPackageMetadata = null is optional, writable
redef fun init_command do
if metadata != null then return new CmdSuccess
var res = super
if not res isa CmdSuccess then return res
var mentity = self.mentity.as(not null)
if mentity isa MPackage then
metadata = mentity.metadata
else
return new WarningNoMetadata(mentity)
end
return res
end
end
src/doc/commands/commands_catalog.nit:100,1--121,3
redef class CmdMetadata
redef fun to_json do return metadata
end
src/doc/templates/json_commands.nit:112,1--114,3