SAF2 / documentation

2 stars 3 forks source link

Platform Notifications #43

Closed vangelisv closed 9 years ago

vangelisv commented 9 years ago

Is there a method/API to send a (platform) Notification to a registered user in FiSpace?

In the Front End Tech guide there is GET /fispace/application/getAllUserNotifications, to get user notifications bu we could not find any POST methods...

sbrahma commented 9 years ago

Hello Your issue has been posted to FISPACE in :https://bitbucket.org/fispace/phase3support/issue/56/platform-notifications

Thanks.

perezdf commented 9 years ago

Hi,

in the version deployed in EE (based on 0.14.0), there are a service available in http://37.131.251.117:8080/sdi-frontend where receives a Notification object by a POST. The content of this object is shown in the frontend by a popup.

Notification object is defined by the following xsd

<xsd:complexType name="NotificationType">
        <xsd:sequence>
            <xsd:element name="fispaceUserId" type="xsd:string"
                minOccurs="1" maxOccurs="1" />
            <xsd:element name="type" type="NotificationTypeType"
                minOccurs="1" maxOccurs="1" />
            <xsd:element name="message" minOccurs="1" maxOccurs="1">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="255" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="NotificationTypeType" final="restriction">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="alert" />
            <xsd:enumeration value="error" />
            <xsd:enumeration value="info" />
        </xsd:restriction>
    </xsd:simpleType>

NotificationTypeType determines which type of message you are sending with an specific icon.

More information about the api by the following javadoc: http://central.maven.org/maven2/eu/fispace/api/0.14.3/api-0.14.3-sources.jar

Next version of FIspace 0.15.0 will contain some improvements and bug fixing.

I have some examples about how to use it, but there are aligned with version 0.15.0 rather than 0.14.0. Therefore, they will be public when the version 0.15.0 will be public in the following site:

http://perezdf.bitbucket.org

I hope it may help you. Cheers

vangelisv commented 9 years ago

Thank you.