Difference between revisions of "Sugar Network/Resources"

From Sugar Labs
Jump to: navigation, search
Line 24: Line 24:
 
'''Resource.layer'''
 
'''Resource.layer'''
  
: This is an attempt to generalize the idea of [http://groups.google.com/group/sugar-network/browse_thread/thread/4cad05ec801f364c user/resource levels] with the idea that objects should not be removed from the Network immediately (only hidden, and permanently removed by Network administrators). So, every resource is associated with a layer, i.e., it might be visible for observers only if they requested this layer and have permissions to see it.
+
: This is a system level property to to track object's condition. It is a list of states set by the system during the object life cycle. Users cannot directly write to this property. Currently supported states are:
  
: For now, only the following list of layers is implemented, but the layer concept might be reused for [http://groups.google.com/group/sugar-network/msg/f5a1b4d78494a5d3 teachers related workflows] later:
+
:* ''deleted'' set after removing objects by users; right after user deletes, the object still remains in the system but becomes inaccessible to user requests;
 
+
:* ''favorite'' applied only to [[Sugar_Network/API#Client_proxy|local Context objects]], set if user ''stared'' the object;
:* ''public'', object is visible for everyone;
+
:* ''checkin'' applied only to [[Sugar_Network/API#Client_proxy|local Context objects]], set if user ''pinned'' some of Context releases to keep permanently in the local system.
:* ''deleted'' Network objects' layer will be changed to {{Code|deleted}} after removing objects by users.
 
  
 
<div id="context-type"></div>
 
<div id="context-type"></div>
Line 41: Line 40:
 
:* ''package'', GNU/Linux package metadata.
 
:* ''package'', GNU/Linux package metadata.
  
<div id="implementation-license"></div>
+
<div id="post-type"></div>
 
 
'''Implementation.license'''
 
 
 
: Short license names. The licenses should conform with the [[Activity Library]] licensing [[Activity_Library/Editors/Policy/Licensing|policy]].
 
 
 
<div id="implementation-stability"></div>
 
 
 
'''Implementation.stability'''
 
 
 
: Stability level of the Implementation. Values conform to Sugar Network [[Sugar_Network/Recipe_Specification#Software_stability_levels|recipe specification]].
 
 
 
<div id="implementation-requires"></div>
 
 
 
'''Implementation.requires'''
 
 
 
: A list of dependencies the ''Implementation'' requires to be installed in the system. The property is being auto populated from a [[Sugar_Network/Recipe_Specification#Dependencies|spec file]] from the uploaded ''Implementation'' bundle. This field exists only to simplify users driven queries, the real dependency checking bases on [[Sugar_Network/Recipe_Specification#Dependencies|spec files]].
 
 
 
<div id="notification-type"></div>
 
 
 
'''Notification.type'''
 
 
 
:* ''create'', object was created;
 
:* ''update'', object's properties were modified;
 
:* ''delete'', object was deleted (hidden);
 
:* ''vote'', object was voted/unvoted.
 
 
 
<div id="feedback-type"></div>
 
 
 
'''Feedback.type'''
 
 
 
:* ''question''
 
:* ''idea''
 
:* ''problem''
 
 
 
<div id="artifact-type"></div>
 
  
'''Artifact.type'''
+
'''Post.type'''
  
:* ''instance'', Sugar activity instance object.
+
:* ''review'', Review the Context;
 +
:* ''object'', Object generated by Context application;
 +
:* ''question'', Q&A request;
 +
:* ''answer'', Q&A response;
 +
:* ''issue'', Propblem with the Context;
 +
:* ''announce'', General announcement;
 +
:* ''notification'', Auto-generated Post for updates within the Context;
 +
:* ''feedback'', Review parent Post;
 +
:* ''post'', General purpose dependent Post.

Revision as of 02:11, 15 March 2014

The following diagram shows the full list of objects implemented by the Sugar Network API.

Sugar Network objects

Resource.author

A list of authors working on the corresponding resource. List items are dictionaries with the following keys:

  • guid
    Author's guid in the Sugar Network; might be omitted if a particular author is not registered in the Sugar Network;
  • name
    Full author's name;
  • role
    An integer which is a bit-wise ORed value of the following constants:
    • 1, author is registered in the Sugar Network (and guid key is set);
    • 2, author is the original author of the corresponding resource; if it is not set, user is only a maintainer, e.g., an uploader of a book which has its original authors.

Resource.layer

This is a system level property to to track object's condition. It is a list of states set by the system during the object life cycle. Users cannot directly write to this property. Currently supported states are:
  • deleted set after removing objects by users; right after user deletes, the object still remains in the system but becomes inaccessible to user requests;
  • favorite applied only to local Context objects, set if user stared the object;
  • checkin applied only to local Context objects, set if user pinned some of Context releases to keep permanently in the local system.

Context.type

Context types:
  • activity, Sugar activity;
  • book, books in various forms;
  • group, offline discussion groups;
  • package, GNU/Linux package metadata.

Post.type

  • review, Review the Context;
  • object, Object generated by Context application;
  • question, Q&A request;
  • answer, Q&A response;
  • issue, Propblem with the Context;
  • announce, General announcement;
  • notification, Auto-generated Post for updates within the Context;
  • feedback, Review parent Post;
  • post, General purpose dependent Post.