Examples of LrsStatement


Examples of org.jasig.portal.events.tincan.om.LrsStatement

       
        final LrsObject lrsObject = new LrsObject(id, "Activity",
                ImmutableMap.of("name", new LocalizedString(new Locale("en", "us"), "Portlet Name"),
                                "description", new LocalizedString(new Locale("en", "us"), "Portlet Description")));

        final LrsStatement lrsStatement = new LrsStatement(lrsActor, LrsVerb.INITIALIZED, lrsObject);
       
        final String result = this.objectMapper.writeValueAsString(lrsStatement);
       
        assertEquals("{\"actor\":{\"mbox\":\"user@example.com\",\"name\":\"John Doe\",\"objectType\":\"Agent\"},\"verb\":{\"id\":\"http://adlnet.gov/expapi/verbs/initialized\",\"display\":{\"en-us\":\"initialized\"}},\"object\":{\"id\":\"urn:tincan:uportal:activities:portlet:fname\",\"objectType\":\"Activity\",\"definition\":{\"name\":{\"en-US\":\"Portlet Name\"},\"description\":{\"en-US\":\"Portlet Description\"}}}}", result);
    }
View Full Code Here

Examples of org.jasig.portal.events.tincan.om.LrsStatement

     * @param event the portal event.
     * @return the new LrsStatement
     */
    @Override
    public LrsStatement toLrsStatement(PortalEvent event) {
        return new LrsStatement(getActor(event), getVerb(event), getLrsObject(event));
    }
View Full Code Here

Examples of org.jasig.portal.events.tincan.om.LrsStatement

    /**
     * Send a batch of LRS statements.  MUST BE SCHEDULED!  Failure to
     * properly configure this class will result in memory leaks.
     */
    public void sendBatch() {
        LrsStatement statement = null;
        List<LrsStatement> list = new ArrayList<LrsStatement>();

        while ((statement = statementQueue.poll()) != null) {
            list.add(statement);
        }
View Full Code Here

Examples of org.jasig.portal.events.tincan.om.LrsStatement

        }

        try {
            for (IPortalEventToLrsStatementConverter factory : statementFactories) {
                if (factory.supports(e)) {
                    LrsStatement lrsStatement = factory.toLrsStatement(e);
                    if (lrsStatement != null) {
                        tinCanEventScheduler.scheduleEvent(lrsStatement);
                        // for now, assume a max of 1 handler per event.
                        break;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.