nitc :: CmdCatalogContributing :: _maintaining
Include maintained packages?nitc :: CmdCatalogContributing :: maintaining=
Include maintained packages?nitc $ CmdCatalogContributing :: SELF
Type of this instance, automatically specialized in every classnitc $ CmdCatalogContributing :: init_command
FIXME linearizationnitc $ CmdCatalogContributing :: init_results
Initialize theresults
list
nitc :: json_commands $ CmdCatalogContributing :: to_json
Return a JSON Serializable representation ofself
results
nitc :: CmdCatalogContributing :: _maintaining
Include maintained packages?nitc :: CmdCatalogPerson :: _person_name
Name of the person to retrievenitc :: CmdEntities :: _sorter
nitc :: CmdCatalogPackages :: _sorter
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdCatalog :: defaultinit
nitc :: CmdEntities :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: CmdCatalogPerson :: defaultinit
core :: Object :: defaultinit
nitc :: CmdList :: 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 :: CmdCatalogContributing :: maintaining=
Include maintained packages?core :: 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 :: CmdCatalogPerson :: person_name
Name of the person to retrievenitc :: CmdCatalogPerson :: person_name=
Name of the person to retrievenitc :: CmdList :: print_list
nitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# Retrieve the packages contributed by a person
class CmdCatalogContributing
super CmdCatalogPerson
super CmdCatalogPackages
autoinit(model, catalog, filter, person, person_name, limit, page, count, max)
# Include maintained packages?
#
# Default is `false`.
var maintaining = false is optional, writable
# FIXME linearization
redef fun init_command do return super
redef fun init_results do
if results != null then return new CmdSuccess
var res = super
if not res isa CmdSuccess then return res
var person = self.person.as(not null)
if not catalog.contrib2proj.has_key(person) then return res
var maint2proj = null
if catalog.maint2proj.has_key(person) then
maint2proj = catalog.maint2proj[person]
end
var results = new Array[MPackage]
for mpackage in catalog.contrib2proj[person] do
if not maintaining and maint2proj != null and maint2proj.has(mpackage) then continue
results.add mpackage
end
self.results = results
return res
end
end
src/doc/commands/commands_catalog.nit:309,1--346,3