Example usage for com.liferay.portal.kernel.uuid PortalUUIDUtil fromJsSafeUuid

List of usage examples for com.liferay.portal.kernel.uuid PortalUUIDUtil fromJsSafeUuid

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.uuid PortalUUIDUtil fromJsSafeUuid.

Prototype

public static String fromJsSafeUuid(String jsSafeUuid) 

Source Link

Usage

From source file:com.liferay.opensocial.shindig.util.ShindigUtil.java

License:Open Source License

public static com.liferay.opensocial.model.Gadget getGadget(String portletName, long companyId)
        throws Exception {

    int pos = portletName.indexOf(StringPool.UNDERLINE);

    String uuid = GetterUtil.getString(portletName.substring(pos + 1));

    uuid = PortalUUIDUtil.fromJsSafeUuid(uuid);

    com.liferay.opensocial.model.Gadget gadget = GadgetLocalServiceUtil.getGadget(uuid, companyId);

    return gadget;
}

From source file:com.liferay.wsrp.consumer.portlet.ConsumerPortlet.java

License:Open Source License

protected WSRPConsumerPortlet getWSRPConsumerPortlet() throws Exception {
    PortletConfig portletConfig = getPortletConfig();

    String portletName = portletConfig.getPortletName();

    int pos = portletName.indexOf(StringPool.UNDERLINE);

    String wsrpConsumerPortletUuid = portletName.substring(pos + 1);

    wsrpConsumerPortletUuid = PortalUUIDUtil.fromJsSafeUuid(wsrpConsumerPortletUuid);

    WSRPConsumerPortlet wsrpConsumerPortlet = WSRPConsumerPortletLocalServiceUtil
            .getWSRPConsumerPortlet(wsrpConsumerPortletUuid);

    return wsrpConsumerPortlet;
}