NpsSite indicates website object.
| String |
id website’s unique identification |
| String |
name website’s name |
| String |
unitid unit’s unique identification |
| String |
unitname unit’s name |
| String |
keywordlinks Keyword links. One line represents a group of keyword links. Multiple keywords must be seperated by comma(,) in a group, and a URL link must be ends with all keywords. |
| NpsTopic |
GetTopic(String id) return to the id-designated topic |
| NpsTopic |
GetTopicByCode(String code) return to the code-designated topic. According to relationship between superior and subordinate, the topic’s code should be separate by the mark of “.” For example: the topic of “international news” which belongs to “news” can be coded as “news.international”. |
| NpsArticle |
GetArticle(String id) return to article which have designated ID. Self-defined datasource topic can not attain articles through this method. |
| NpsArticle |
GetCustomArticle(String id,NpsTopic top) return to article which have designated ID. It is available for self-defined datasource topic. |
| NpsArticleCollection |
GetAllArticles(int state) return to article list designated “state” within website. “state” could apply values below: 0: draft. 1: submitted while verifying. 2: verified while publishing. 3: successfully published. |
| NpsArticleCollection |
GetArticles(NpsTopic topic,int state,boolean included) return to the overall “state” article list which belongs to topics designated by “topic”. “state” could apply values below: 0: draft. 1: submitted while verifying. 2: verified while publishing. 3: successfully published. “incluced=true”: indicates it will return to all articles of lower-level topics. “incluced=false”: indicates it will return to articles of current topic. |
| NpsArticleCollection |
FTSearch(String query,int max) fulltext retrieval. Return to the search result set which can meet specific “query” requirement. For the grammar of “query”, please refer to “SOLR” grammar guide. “max” indicates the maximum number which will be return. “max<=0” indicates it will return to result sets which can meet all requirements. |
| NpsResource |
GetResource(String id) return the resource identified by parameter id |
| NpsResourceCollection |
GetResourcesByType(int type,String suffixes) return all resources by type and suffix type=-1 means all types type=0 means pictures only type=1 means documentations only type=2 means videos only type=3 means sounds only type=4 means flashes only and type=5 means all others Mutiple suffixes can be seperated by '|' or ',' or ';'. e.g.,".jpg|.bmp|.gif" means all resources which ends with .jpg or .bmp or .gif ".*" means all resources will be matched. |
| NpsResourceCollection |
GetResourcesByTopic(NpsTopic topic) return all resources which quoted by topic |
| void |
BuildArticles(NpsArticleCollection arts) rebuild all articles which belongs to result set. |
| void |
IndexArticles(NpsArticleCollection arts) Index all articles which belongs to result set |
| void |
Build(boolean rebuildall) rebuild/publish website. "rebuildall=true": rebuild all existing articles. ”rebuildall=false”: publish the pending articles. |
| void |
Index() Index all published articles. |
| void |
Archive() Archive all topics with archive schema. |
| void |
AddKeywordLink(String keyword,String url) Add a keyword link |
| void |
AddKeywordLinks(String line) Add a group of keyword links. Multiple keywords must be seperated by comma(,) in a group, and a URL link must be ends with all keywords. |
| void |
RemoveKeywordLink(String keyword,String url) Remove a keyword link |
| void |
RemoveKeywordLinks(String url) Remove a group of keyword links |