* @return true if the user is logged offline and it has not been online previously. False in
* @return true if the user is logged offline and it has not been online previously. False in other case (user not logged, user logged online, user offline but it was previously online logged
* other case (user not logged, user logged online, user offline but it was previously online
* logged
*/
*/
publicstaticbooleanis_user_offline(){
publicstaticbooleanis_user_offline(){
returnpcbdb==null?false//no hay usuario aun
if(pcbdb==null){
:!getPcbdb().isUser_online();
returnfalse;
}else{
return!getPcbdb().isUser_online();
}
}
}
publicstaticbooleanis_user_online(){
publicstaticbooleanis_user_online(){
returnpcbdb!=null&&getPcbdb().isUser_online();
returnpcbdb!=null&&getPcbdb().isUser_online();
}
}
// Return the context
// modified by Fernando
publicstaticContextgetContext(){if(context==null)thrownewjava.lang.NullPointerException("Context is null. PCBcontext.init must be invoked previously");returncontext;}
// Return the device
/**
// modified by Fernando
* @return context
publicstaticDevicegetDevice(){if(device==null)thrownewjava.lang.NullPointerException("Device is null. PCBcontext.init must be invoked previously");returndevice;}
* @TODO complete documentation
*/
publicstaticContextgetContext(){
if(context==null){
thrownewjava.lang.NullPointerException("Context is null. PCBcontext.init must be"+
"invoked previously");
}
returncontext;
}
// Return the PCBDB
/**
// modified by Fernando
* @return device
publicstaticPCBDBHelpergetPcbdb(){if(context==null)thrownewjava.lang.NullPointerException("PCBDB is null. PCBcontext.set_user must be invoked previously");returnpcbdb;}
* @TODO complete documentation
*/
publicstaticDevicegetDevice(){
if(device==null){
thrownewjava.lang.NullPointerException("Device is null. PCBcontext.init must be"+
"invoked previously");
}
returndevice;
}
// Return the NetService
/**
// modified by Fernando
* @return PCBDB
publicstaticNetServicegetNetService(){if(service==null)thrownewjava.lang.NullPointerException("NetService is null. PCBcontext.set_user must be invoked previously");returnservice;}
* @TODO complete documentation
*/
publicstaticPCBDBHelpergetPcbdb(){
if(context==null){
thrownewjava.lang.NullPointerException("PCBDB is null. PCBcontext.set_user must be"+
"invoked previously");
}
returnpcbdb;
}
// Return the RestapiWrapper
/**
// modified by Fernando
* @return NetService
publicstaticRestapiWrappergetRestapiWrapper(){if(wrapper==null)thrownewjava.lang.NullPointerException("RestapiWrapper is null. PCBcontext.init must be invoked previously");returnwrapper;}
* @TODO complete documentation
*/
publicstaticNetServicegetNetService(){
if(service==null){
thrownewjava.lang.NullPointerException("NetService is null. PCBcontext.set_user"+
"must be invoked previously");
}
returnservice;
}
// Return the Room
/**
// modified by Fernando
* @return RestapiWrapper
publicstaticRoomgetRoom(){if(room==null)thrownewjava.lang.NullPointerException("Room is null. PCBcontext.set_user must be invoked previously");returnroom;}
* @TODO complete documentation
*/
publicstaticRestapiWrappergetRestapiWrapper(){
if(wrapper==null){
thrownewjava.lang.NullPointerException("RestapiWrapper is null. PCBcontext.init"+
"must be invoked previously");
}
returnwrapper;
}
/**
* @return Room
* @TODO complete documentation
*/
publicstaticRoomgetRoom(){
if(room==null){
thrownewjava.lang.NullPointerException("Room is null. PCBcontext.set_user must"+
"be invoked previously");
}
returnroom;
}
// Return the Vocabulary
/**
// modified by Fernando
* @return Vocabulary
publicstaticVocabularygetVocabulary(){if(vocabulary==null)thrownewjava.lang.NullPointerException("Vocabulary is null. PCBcontext.set_user must be invoked previously");returnvocabulary;}
* @TODO complete documentation
*/
publicstaticVocabularygetVocabulary(){
if(vocabulary==null){
thrownewjava.lang.NullPointerException("Vocabulary is null. PCBcontext.set_user"+
"must be invoked previously");
}
returnvocabulary;
}
// Return the ActionLog
/**
// modified by Fernando
* @return ActionLog
publicstaticActionLoggetActionLog(){if(actionLog==null)thrownewjava.lang.NullPointerException("ActionLog is null. PCBcontext.set_user must be invoked previously");returnactionLog;}
* @TODO complete documentation
*/
publicstaticActionLoggetActionLog(){
if(actionLog==null){
thrownewjava.lang.NullPointerException("ActionLog is null. PCBcontext.set_user"+