Skip to content

Instantly share code, notes, and snippets.

empty
{"id":[{"value":"aaaaaaaa","schemeName":"CustomerPOReferenceNumber"},{"value":"vodafone","schemeName":"ParentCompanyName"}],"created":{"value":"20181219"},"createdBy":{"value":"Miroslav Ligas"},"details":{"serviceRequiredDateTime":{"value":"20181129"}},"relatedSalesOrder":[{"id":{"value":"aa111","schemeName":"ExistingCircuitRefernce"}},{"id":{"value":"bbb2222","schemeName":"ExistingOrderRefernce"}}],"roles":{"requestor":{"contactPoint":[{"email":{"fullAddress":"miroslav.ligas1@vodafone.com"},"telephone":{"subscriberNumber":"333333333"}}]},"customer":{"id":[{"value":"FULL-DATA-SET-GOOD-DATA","schemeName":"CustomerRefernceNumber"}],"name":"Miroslav Ligas","contactPerson":[{"contactPoint":[{"email":{"fullAddress":"miroslav.ligas1@vodafone.com"},"telephone":{"subscriberNumber":"111111111"}}]}]},"subscriber":{"contactPerson":[{"type":"ExistingSubscriberName","name":""},{"type":"NewSubscriberName","name":""}]}},"parts":{"relatedParty":[{"name":"bbbbbbbb","type":"VodafoneTechnicalContact","contactPoint":[{"email":{"
curl -XPOST -v \
-H 'Accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'data={"to":["miroslav.ligas1@vodafone.com"],"cc":["miroslav.ligas@gmail.com"],"subject":"data","data":{"test":"Thisistheinput"}};type=application/json' \
-u test:test "https://portal-dev.vodafone.com:4445/o/rest-cove/send-mail/mail/new/msp-confirmation-mail"
@mir333
mir333 / aaa
Created September 20, 2018 14:31
aaaa
<script src="/o/wp/js/tealium-helpher.main.js"></script>
<script src="/o/wp/js/tealiumHelperWorker.main.js"></script>
<div class="hello-catalogue background catalogue-background" style=" text-align: center;padding-bottom: 50px;">
<div class="hello__band">
<div class="hello-message">
<p class="heading hello__heading heading--light heading--1 no-gutter--top m-0">
Your order forms
</p>
<p class="heading heading--light heading--4 no-gutter--top m-0">
You can get your orders to us quicker
</p>
<p class="heading heading--light heading--4 no-gutter--top m-0">
@mir333
mir333 / category-script-lfr.groovy
Last active October 31, 2018 11:23
Script for catering asset categories in liferay
import com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil
import com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil
import com.liferay.portal.kernel.service.ServiceContext
long userId = 20156
long groupId = 33881
def createVocabularyAndCategories = { vocabularyName, categories ->
out.println(categories.size())
@mir333
mir333 / example.ftl
Created September 26, 2017 14:42 — forked from travisrcory/example.ftl
Using Liferay Web Content structure type to import articles
<#if contents.getSiblings()?has_content>
<#assign VOID = freeMarkerPortletPreferences.setValue("view", "basicContentView") />
<#list contents.getSiblings() as cur_contents>
<#assign article = cur_contents.getData()?eval />
<#--
* This is a liferay-ui taglib that allows for rendering assets.
* It is used throughout the portal, and here we can use it to display the articles we have nested
* It accepts:
@Component(
immediate = true,
property = {
"key=login.events.post"
},
service = LifecycleAction.class
)
public class LandingPageRouter implements LifecycleAction {
private static Log LOG = LogFactoryUtil.getLog(LandingPageRouter.class);
@mir333
mir333 / populate regions in Liferay
Last active October 10, 2016 11:30
This gist offers a quick way how to add regions into Liferay through the admin console. (draft version)
import com.liferay.portal.kernel.exception.NestableException;
import com.liferay.portal.model.Country;
import com.liferay.portal.service.CountryServiceUtil;
import com.liferay.portal.service.RegionServiceUtil;
import java.util.HashMap;
import java.util.Map;
try {
Map<String,String> counties = new HashMap<String,String>(){{
String keywords = "Bo";
Long brandOrganisationId = 111355l;
Long countryGroupId = 11111l;
SearchContext searchContext = new SearchContext();
BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext);
if (!Validator.isBlank(keywords)) {