/** * Construct a simple LRS statement * * @param actorEmail the user email address, "I" * @param verbStr a string indicating the action, "did" * @param objectURI URI indicating the object of the statement, "this" */ public LRS_Statement(String actorEmail, String verbStr, String objectURI) { this(new LRS_Actor(actorEmail), new LRS_Verb(verbStr), new LRS_Object(objectURI)); } /**
@Override public void registerEventCallbacks(NotificationService notificationService) { // register a transient notification for resources this.notificationService = notificationService; this.notification = notificationService.addTransientNotification(); // we don't care about create evets this.notification.addFunction(TAG_UPDATE_EVENT); this.notification.addFunction(TAG_DELETE_EVENT); this.notification.addFunction(TAGCOLLECTION_UPDATE_EVENT); this.notification.addFunction(TAGCOLLECTION_DELETE_EVENT); this.notification.setAction(this); }
/** * Construct a simple LRS statement with Result * * @param actorEmail the user email address, "I" * @param verbStr a string indicating the action, "did" * @param objectURI URI indicating the object of the statement, "this" * @param resultSuccess true if the result was successful (pass) or false if not (fail), "well" * @param resultScaledScore Score from -1.0 to 1.0 where 0=0% and 1.0=100% */ public LRS_Statement(String actorEmail, String verbStr, String objectURI, boolean resultSuccess, float resultScaledScore) { this(new LRS_Actor(actorEmail), new LRS_Verb(verbStr), new LRS_Object(objectURI)); this.result = new LRS_Result(resultScaledScore, resultSuccess); } /**
public void fireEvent(String eventName, String reference) { // had to take out the exists check because it makes firing events for removing entities very annoying -AZ Event event = eventTrackingService.newEvent(eventName, reference, true, NotificationService.PREF_IMMEDIATE); eventTrackingService.post(event); }
/** * Registered this {@link NotificationAction} with the * {@link NotificationService}. Typically invoked by DI framework. */ public void init() { NotificationEdit notification = notificationService.addTransientNotification(); // we're only interested in being notified of site deletions notification.setFunction(SiteService.SECURE_REMOVE_SITE); // reiterate that we're only interested in site deletions (likely overkill) notification.setResourceFilter(SiteService.REFERENCE_ROOT); // assign this object as the actual action to be fired on site deletions notification.setAction(this); }
public void init() { // register a single observer for the EB system (switched from local observer) eventTrackingService.addObserver(new Observer() { public void update(Observable o, Object arg) { if (arg instanceof Event) { Event event = (Event) arg; handleEvent(event); } } }); }
public void valueUnbound(SessionBindingEvent event) { // stop observing the presence location m_eventTrackingService.deleteObserver(this); } }
/** * @return A representation of this event's values as a string. */ public String toString() { return seq + ":" + getEvent() + "@" + getResource() + "[" + (getModify() ? "m" : "a") + ", " + getPriority() + "]"; }
/** * @param email the user email address * @return an actor built using the given email address */ static LRS_Actor makeFromEmail(String email) { LRS_Actor actor = new LRS_Actor(email); return actor; } /**
public void destroy() { if ( notificationService != null && notification != null ) { notificationService.removeNotification(notification); } }
/** * @param name the unique identifier (EID, etc.) * @param homePage the URL of the Sakai instance */ public void setAccount(String name, String homePage) { account.setName(name); account.setHomePage(homePage); } // GETTERS
/** * Reset the tool (state) to "home" conditions. Default here is to clear everything from state. * * @param state * The tool's session state. */ protected void resetTool(SessionState state) { state.clear(); } // resetTool
/** * use of the empty constructor is restricted */ protected LRS_Actor() { objectType = "Agent"; account = new LRS_Account(); } /**
/** * Reset to the first page */ protected void resetPaging(SessionState state) { // we are changing the sort, so start from the first page again state.removeAttribute(STATE_TOP_PAGE_MESSAGE); } // resetPaging
/** * Switch to a new panel * * @param state * The session state. * @param newPanel * The new panel name */ public static void switchPanel(SessionState state, String newPanel) { state.setAttribute(STATE_NEW_PANEL, newPanel); } // addAlert
@Override public void registerEventCallbacks(NotificationService notificationService) { // register a transient notification for resources this.notificationService = notificationService; this.notification = notificationService.addTransientNotification(); // we don't care about create evets this.notification.addFunction(TAG_UPDATE_EVENT); this.notification.addFunction(TAG_DELETE_EVENT); this.notification.addFunction(TAGCOLLECTION_UPDATE_EVENT); this.notification.addFunction(TAGCOLLECTION_DELETE_EVENT); this.notification.setAction(this); }
/** * Construct a simple LRS statement with Result * * @param actorEmail the user email address, "I" * @param verbStr a string indicating the action, "did" * @param objectURI URI indicating the object of the statement, "this" * @param resultSuccess true if the result was successful (pass) or false if not (fail), "well" * @param resultScaledScore Score from -1.0 to 1.0 where 0=0% and 1.0=100% */ public LRS_Statement(String actorEmail, String verbStr, String objectURI, boolean resultSuccess, float resultScaledScore) { this(new LRS_Actor(actorEmail), new LRS_Verb(verbStr), new LRS_Object(objectURI)); this.result = new LRS_Result(resultScaledScore, resultSuccess); } /**
/** * Construct a simple LRS statement * * @param actorEmail the user email address, "I" * @param verbStr a string indicating the action, "did" * @param objectURI URI indicating the object of the statement, "this" */ public LRS_Statement(String actorEmail, String verbStr, String objectURI) { this(new LRS_Actor(actorEmail), new LRS_Verb(verbStr), new LRS_Object(objectURI)); } /**
/** * @return A representation of this event's values as a string. */ public String toString() { return seq + ":" + getEvent() + "@" + getResource() + "[" + (getModify() ? "m" : "a") + ", " + getPriority() + "]"; }
/** * @param instructorEmail Instructor user email that the statement relates to */ public void setInstructor(String instructorEmail) { this.instructor = new LRS_Actor(instructorEmail); } /**