Command message

A message returned by a command. Messages are used to inform the client of the command initialization status and results. Mostly, messages are used to check if a command is in an error state.

Introduced properties

private var _http_status_code: Int

nitc :: CmdMessage :: _http_status_code

HTTP code to return for this message
fun http_status_code: Int

nitc :: CmdMessage :: http_status_code

HTTP code to return for this message
protected fun http_status_code=(http_status_code: Int)

nitc :: CmdMessage :: http_status_code=

HTTP code to return for this message
fun print_message(no_color: nullable Bool)

nitc :: CmdMessage :: print_message

abstract fun to_html: Writable

nitc :: CmdMessage :: to_html

Render the message as a HTML string
fun to_json: nullable Serializable

nitc :: CmdMessage :: to_json

Return a JSON Serializable representation of self
abstract fun to_md: Writable

nitc :: CmdMessage :: to_md

Render the message as a HTML string

Redefined properties

redef type SELF: CmdMessage

nitc $ CmdMessage :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _http_status_code: Int

nitc :: CmdMessage :: _http_status_code

HTTP code to return for this message
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun http_status_code: Int

nitc :: CmdMessage :: http_status_code

HTTP code to return for this message
protected fun http_status_code=(http_status_code: Int)

nitc :: CmdMessage :: http_status_code=

HTTP code to return for this message
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun print_message(no_color: nullable Bool)

nitc :: CmdMessage :: print_message

fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_html: Writable

nitc :: CmdMessage :: to_html

Render the message as a HTML string
fun to_json: nullable Serializable

nitc :: CmdMessage :: to_json

Return a JSON Serializable representation of self
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

abstract fun to_md: Writable

nitc :: CmdMessage :: to_md

Render the message as a HTML string
fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram nitc::CmdMessage CmdMessage core::Object Object nitc::CmdMessage->core::Object nitc::CmdSuccess CmdSuccess nitc::CmdSuccess->nitc::CmdMessage nitc::CmdError CmdError nitc::CmdError->nitc::CmdMessage nitc::CmdWarning CmdWarning nitc::CmdWarning->nitc::CmdMessage nitc::CmdError... ... nitc::CmdError...->nitc::CmdError nitc::CmdWarning... ... nitc::CmdWarning...->nitc::CmdWarning

Parents

interface Object

core :: Object

The root of the class hierarchy.

Children

abstract class CmdError

nitc :: CmdError

Command Error
class CmdSuccess

nitc :: CmdSuccess

Command Success
abstract class CmdWarning

nitc :: CmdWarning

Command Warning

Descendants

class CmdParserError

nitc :: CmdParserError

An error produced by the CmdParser
class ErrorBadGraphFormat

nitc :: ErrorBadGraphFormat

Bad graph format requested
class ErrorMEntityConflict

nitc :: ErrorMEntityConflict

Multiple MEntities matching mentity_name
class ErrorMEntityNoName

nitc :: ErrorMEntityNoName

No MEntity name provided
class ErrorMEntityNotFound

nitc :: ErrorMEntityNotFound

No MEntity matching mentity_name
class ErrorNoPerson

nitc :: ErrorNoPerson

No person instance or name provided
class ErrorNoQuery

nitc :: ErrorNoQuery

No query string given
class ErrorNoTag

nitc :: ErrorNoTag

No tag name provided
class ErrorNotClass

nitc :: ErrorNotClass

The MEntity is not a MClass or a MClassDef
class ErrorNotProperty

nitc :: ErrorNotProperty

The MEntity is not a MProperty or a MClassDef
class ErrorPersonNotFound

nitc :: ErrorPersonNotFound

No person found with this name
class ErrorTagNotFound

nitc :: ErrorTagNotFound

No tag with this name in the catalog
class WarningNoCode

nitc :: WarningNoCode

No code for mentity
class WarningNoContribFile

nitc :: WarningNoContribFile

No license file for mentity
class WarningNoContributor

nitc :: WarningNoContributor

No contributor for mentity
class WarningNoDescription

nitc :: WarningNoDescription

No git clone url for mentity
class WarningNoFeatures

nitc :: WarningNoFeatures

No feature list for mentity
class WarningNoGitUrl

nitc :: WarningNoGitUrl

No git url for mentity
class WarningNoIni

nitc :: WarningNoIni

No ini file for mentity
class WarningNoIssuesUrl

nitc :: WarningNoIssuesUrl

No issues url for mentity
class WarningNoLicense

nitc :: WarningNoLicense

No ini license string for mentity
class WarningNoLicenseFile

nitc :: WarningNoLicenseFile

No license file for mentity
class WarningNoLinearization

nitc :: WarningNoLinearization

No linearization computed for mentity.
class WarningNoMDoc

nitc :: WarningNoMDoc

No MDoc for mentity
class WarningNoMain

nitc :: WarningNoMain

No tests for mentity
class WarningNoMains

nitc :: WarningNoMains

No tests for mentity
class WarningNoMaintainer

nitc :: WarningNoMaintainer

No maintainer for mentity
class WarningNoManFile

nitc :: WarningNoManFile

No man file for mentity
class WarningNoManOptions

nitc :: WarningNoManOptions

No options description found in the man file for mentity
class WarningNoManSynopsis

nitc :: WarningNoManSynopsis

No synopsis found in the man file for mentity
class WarningNoMetadata

nitc :: WarningNoMetadata

No metadata for mentity
class WarningNoTest

nitc :: WarningNoTest

No tests for mentity
class WarningNoUML

nitc :: WarningNoUML

No UML model for mentity

Class definitions

nitc $ CmdMessage
# Command message
#
# A message returned by a command.
# Messages are used to inform the client of the command initialization status and results.
# Mostly, messages are used to check if a command is in an error state.
abstract class CmdMessage
end
src/doc/commands/commands_base.nit:81,1--87,3

nitc :: commands_http $ CmdMessage
redef class CmdMessage
	# HTTP code to return for this message
	var http_status_code = 200
end
src/doc/commands/commands_http.nit:82,1--85,3

nitc :: md_commands $ CmdMessage
redef class CmdMessage

	# Render the message as a HTML string
	fun to_md: Writable is abstract
end
src/doc/templates/md_commands.nit:32,1--36,3

nitc :: json_commands $ CmdMessage
redef class CmdMessage
	# Return a JSON Serializable representation of `self`
	fun to_json: nullable Serializable do
		var obj = new JsonObject
		obj["status"] = class_name
		obj["message"] = to_s
		return obj
	end
end
src/doc/templates/json_commands.nit:34,1--42,3

nitc :: term $ CmdMessage
redef class CmdMessage
	fun print_message(no_color: nullable Bool) do print to_s
end
src/doc/term/term.nit:48,1--50,3

nitc :: html_commands $ CmdMessage
redef class CmdMessage

	# Render the message as a HTML string
	fun to_html: Writable is abstract
end
src/doc/templates/html_commands.nit:35,1--39,3