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

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

Introduction

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

Prototype

public static String toJsSafeUuid(String uuid) 

Source Link

Usage

From source file:com.liferay.opensocial.service.impl.GadgetLocalServiceImpl.java

License:Open Source License

protected String getPortletId(String uuid) {
    String portletId = GadgetPortlet.PORTLET_NAME_PREFIX.concat(uuid);

    portletId = PortalUtil.getJsSafePortletId(PortalUUIDUtil.toJsSafeUuid(portletId));

    return portletId;
}

From source file:com.liferay.wsrp.hook.upgrade.v1_1_0.UpgradeUuid.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    List<WSRPConsumerPortlet> wsrpConsumerPortlets = WSRPConsumerPortletLocalServiceUtil
            .getWSRPConsumerPortlets(QueryUtil.ALL_POS, QueryUtil.ALL_POS);

    for (WSRPConsumerPortlet wsrpConsumerPortlet : wsrpConsumerPortlets) {
        StringBuilder sb = new StringBuilder(4);

        sb.append(ConsumerPortlet.PORTLET_NAME_PREFIX);
        sb.append(wsrpConsumerPortlet.getCompanyId());
        sb.append(StringPool.UNDERLINE);
        sb.append(wsrpConsumerPortlet.getWsrpConsumerPortletId());

        String oldPortletId = PortalUtil.getJsSafePortletId(sb.toString());

        String newPortletId = ConsumerPortlet.PORTLET_NAME_PREFIX.concat(wsrpConsumerPortlet.getUuid());

        newPortletId = PortalUtil.getJsSafePortletId(PortalUUIDUtil.toJsSafeUuid(newPortletId));

        updateLayout(oldPortletId, newPortletId);
        updateResourceAction(oldPortletId, newPortletId);
        updateResourcePermission(oldPortletId, newPortletId);
    }//from   w  w w  .  j a  v  a2 s . co  m
}

From source file:com.liferay.wsrp.service.impl.WSRPConsumerPortletLocalServiceImpl.java

License:Open Source License

protected String getPortletId(String wsrpConsumerPortletUuid) {
    String portletId = ConsumerPortlet.PORTLET_NAME_PREFIX.concat(wsrpConsumerPortletUuid);

    portletId = PortalUtil.getJsSafePortletId(PortalUUIDUtil.toJsSafeUuid(portletId));

    return portletId;
}