#servicebuilder
Explore tagged Tumblr posts
harrisonsuzuki · 2 years ago
Text
5 Perks Of Staying Connected With Car Dealerships
Tumblr media
Are you a car owner or planning to buy a car soon? If so, staying connected with car dealerships Melton can offer you a world of benefits that you might not have considered before. In this blog post, we'll explore five outstanding perks of maintaining a strong connection with car dealerships. From exclusive deals to expert advice, these advantages can make your automotive journey smoother and more enjoyable.
Exclusive Deals and Promotions
One of the most enticing reasons to stay connected with car dealerships in Melton is the access to exclusive deals and promotions. Dealers often offer special discounts, limited-time offers, and loyalty rewards to their valued customers.
By staying in the loop, you can take advantage of these deals and save a significant amount on your next car purchase, scheduled maintenance, or repairs.
Whether it's a reduced price on a brand-new model or a complimentary service package, staying connected ensures you don't miss out on money-saving opportunities.
Timely Maintenance Reminders
Regular maintenance is crucial for keeping your car in top-notch condition and ensuring its longevity. However, with our busy lives, it's easy to overlook service schedules. When you maintain a connection with your car dealership, they can provide you with timely maintenance reminders.
Whether it's an oil change, tire rotation, or a comprehensive check-up, these reminders ensure you never miss a vital service appointment. Keeping your car well-maintained not only saves you from potential breakdowns but also improves its overall performance and efficiency.
Access to the Latest Models and Technologies
Car technology is evolving at a rapid pace, with new models boasting cutting-edge features hitting the market regularly.
When you stay connected with car dealerships, you get the advantage of being among the first to know about the latest releases and advancements in automotive technology.
Dealerships often organise exclusive previews and test-drive events for their loyal customers, giving you a chance to experience the latest models firsthand. This way, you can stay ahead of the curve and make informed decisions when it's time to upgrade your vehicle.
Tumblr media
Personalised Customer Service
Building a strong connection with car dealerships often leads to personalised customer service. As dealers get to know you and your preferences, they can offer tailored recommendations and solutions that best suit your needs.
Whether it's finding the ideal car that matches your lifestyle or addressing specific concerns about your vehicle, a personalised approach can make you feel valued as a customer.
Additionally, having a dedicated point of contact at the dealership can streamline communication and ensure a smoother experience whenever you require assistance.
Expert Advice and Support
Car dealerships employ knowledgeable professionals who understand the ins and outs of various car models. When you stay connected with them, you gain access to expert advice and support whenever you need it.
Whether you have questions about a specific feature, need troubleshooting assistance, or seek guidance on upgrading to a different model, the dealership's experts are there to help. Their insights can empower you to make well-informed decisions regarding your car and enhance your overall ownership experience.
Conclusion
Staying connected with car dealerships Melton comes with a host of benefits that can greatly enhance your automotive journey. From exclusive deals and promotions to expert advice and personalised customer service, these perks ensure you get the most out of your car ownership experience.
So, if you haven't already, consider establishing a strong connection with your local car dealership and unlock these outstanding advantages today!
Source: https://www.articleshore.com/5-perks-of-staying-connected-with-car-dealerships/
0 notes
inextures · 2 years ago
Text
Deactivating and activating custom modules for a particular site in Liferay 7.4 (Part 2)
Tumblr media
In previous part, we have created a panel module now we will create a service builder to store the values given from the user and to pass it to theme. Then we will create a theme to get this data and deactivate it from the site.
Creating a service builder (IntelliJ)
To store the state of the portlet on a particular side and to send this information in theme we need a service builder.
To create a service builder this are the following steps:
Go to File -> New -> Module
Tumblr media
2. Update the service.xml file
<?xml version="1.0"?> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 7.4.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_7_4_0.dtd"> <service-builder dependency-injector="ds" package-path="moduleblacklistservice">  <namespace>ModuleBlaclist</namespace>  <!--<entity data-source="sampleDataSource" local-service="true" name="Foo" remote-service="false" session-factory="sampleSessionFactory" table="foo" tx-manager="sampleTransactionManager uuid="true"">-->  <entity local-service="true" name="Portlet" remote-service="true" uuid="true">      <!-- PK fields -->      <column name="id" primary="true" type="long" />      <!-- Group instance -->      <column name="groupId" type="long" />      <!-- Audit fields -->      <column name="companyId" type="long" />      <column name="userId" type="long" />      <column name="userName" type="String" />      <column name="createDate" type="Date" />      <column name="modifiedDate" type="Date" />      <!-- Other fields -->      <column name="portletId" type="String" />      <column name="active" type="boolean" />      <!-- Finder methods -->      <finder name="portletId" return-type="Collection">        <finder-column name="portletId" />      </finder>      <finder name="groupId" return-type="Collection">        <finder-column name="groupId" />      </finder>      <finder name="group_portlet" return-type="Collection">        <finder-column name="groupId" />        <finder-column name="portletId" />      </finder>  </entity> </service-builder>
3.  Update the local service implantation class
package moduleblacklistservice.service.impl; import com.liferay.portal.aop.AopService; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.model.User; import com.liferay.portal.kernel.service.ServiceContext; import com.liferay.portal.kernel.util.OrderByComparator; import moduleblacklistservice.model.Portlet; import moduleblacklistservice.service.base.PortletLocalServiceBaseImpl; import org.osgi.service.component.annotations.Component; import java.util.Date; import java.util.List; @Component(  property = "model.class.name=moduleblacklistservice.model.Portlet",  service = AopService.class ) public class PortletLocalServiceImpl extends PortletLocalServiceBaseImpl {  public Portlet addPortlet(        long userId, long groupId,String portletId,Boolean active, ServiceContext serviceContext)        throws PortalException {      User user = userLocalService.getUserById(userId);      Date now = new Date();      long id = counterLocalService.increment();      Portlet portlet = portletPersistence.create(id);      portlet.setPortletId(portletId);      portlet.setActive(active);      portlet.setCompanyId(user.getCompanyId());      portlet.setGroupId(groupId);      portlet.setCreateDate(serviceContext.getCreateDate(now));      portlet.setModifiedDate(serviceContext.getModifiedDate(now));      portlet.setUserId(userId);      portlet.setUserName(user.getScreenName());      portlet.setUuid(serviceContext.getUuid());      portlet.setExpandoBridgeAttributes(serviceContext);      portletPersistence.update(portlet);      return portlet;  }  public List<Portlet> getPortletByPortletId(String portletId) {      return portletPersistence.findByportletId(portletId);  }  public List<Portlet> getPortletByGroupId(long groupId) {      return portletPersistence.findBygroupId(groupId);  }  public List<Portlet> getPortlet(long groupId,String portletId) {      return portletPersistence.findBygroup_portlet(groupId,portletId);  }  public List<Portlet> getPortlets(int start, int end) {      return portletPersistence.findAll(start, end);  }  public List<Portlet> getPortlets(int start, int end, OrderByComparator<Portlet> obc) {      return portletPersistence.findAll(start, end,obc);  }  public int getPortletsCount() {      return portletPersistence.countAll();  }  public List<Portlet> getPortlets() {      return portletPersistence.findAll();  } }
After this you would be able to disable a portlet on a particular site. To disable:
Go to the ModuleBlackListConfiguration tab
Tumblr media
2.Then go to action and uncheck the active status.
Tumblr media
3.This will deactivate the module from the site.
Tumblr media
We will only be able to deactivate MVC modules which are present in widget panel.
Conclusion
Using this you would be able to disable modules on a particular site without affecting the rest of the site.
Originally published by: Deactivating and activating custom modules for a particular site in Liferay 7.4 (Part 2)
0 notes
sritulasibangalore18 · 3 years ago
Video
youtube
Building Renovation in #bangalore 8722234719 Professional House Interi... Building Renovation Home Painting Service Cost, Best Painting Service,Building Renovation work, Top Painting Contractors in Bangalore #woodworking, #wood, #handmade, #woodworker, #woodwork, #diy, #design, #interiordesign, #woodart, #art, #homedecor, #furniture, #wooddesign, #carpentry, #woodcraft, #woodshop, #woodcarving, #carpenter, #handcrafted, #woodturning, #maker, #furnituredesign, #interior, #woodwork, #decor, #home, #tools, #woodwork #woodworkers,ikea furnitures,IKEA #Bangalore, #vijayanagar, #InsightsIAS, #NAGARBHAVI,#Bangalore, #vijayanagar,  #NAGARBHAVIMAINROAD, #CHANDRALAYOUT,  #InsightsIAS, #Rajajinagar, #Yeswanthpur,  #Malleswaram,  #Banashankari, #Jayanagara, #JPNagar, #BTMLayout,
0 notes
seanmonstar · 3 years ago
Text
This Month in hyper: October 2022
As the leaves change and fall, our wonderful contributors continue to make hyper ever better!
Releases
hyper v1.0.0-rc.1
After so much work through this year, we finally published the first release candidate for hyper 1.0, hyper v1.0.0-rc.1!
The community had some wonderful things to say:
Parking in a stable stop is such a lovely metaphor for library evolution, love it!
Very exciting, this is a huge milestone for the maturity of Rust's web-facing ecosystem. :)
all aboard the hype(r) train! 🚂
As the announcement post said, we've got more to do. We're moving into the hyper polish period. I'll have more to say about that soon! But you can join us in chat now if you want to help out.
hyper v0.14.21
We also published v0.14.21, to bring some fixes and features to the more stable branch. This included advanced TCP Server options, an option to ignore invalid header lines, and some more bug fixes.
Part of the 1.0 plan is to backport as much as possible to 0.14, in an effort to make upgrading easier. So you'll still see 0.14.x releases along the way.
hyper 1.0
In order to publish the first release candidate, hyper v1.0.0-rc.1, there was a bunch of work to finish up.
@Michael-J-Ward created the per-version Connection types for the server module. And then I finished up the split by removing the combined hyper::server::conn::Connection type. @bossmc then removed an unneeded Option wrapping the internals of hyper::server::conn::http1::Connection, and dropped the try_into_parts method.
@LucioFranco refactored out the hyper::body::aggregate functions into a Collected type in http-body-util. I was able to use those to upgrade hyper with the new Body trait design that works on frames, making it forwards-compatible. I also finished up the bike-shaving to determine the name of the body type hyper returns, settling on hyper::body::Incoming.
hyper in curl
@dannasman cleaned up a feature we ended up not needing: the ability to get the raw response bytes. curl ended up preferring using the parsed response fields, keeping the parsing in Rust.
Are you interested in helping to debug the last few unit tests for hyper in curl?
HTTP/3
We're working on HTTP/3 in a separate crate, h3, with the goal of fitting it into hyper.
@g2p documented the entire public API for the h3 and h3-quinn crates. @eagr refined the compliance report generation, and exception reasons. In tower-h3, @eager made use of the new Body trait from the hyper rc1, and better use of Endpoint.
Tower
Tower (and tower-http) are a protocol-agnostic RPC framework with middleware, and they combine nicely with hyper.
@jplatte implemented Layer for tuples up to 16 elements, such that a tuple of layers is similar to using ServiceBuilder. @samvrlewis added methods to ReadyCache to allow iterating over the ready services, and implemented Clone fordiscover::Change. @boraarslan added a trait Budget, so that the retry middlware revamp can allow swappable budget implementations.
@82marbag introduced a new TimeoutBody middleware to wrap HTTP requests and/or responses in a body type that will timeout reads. This adds onto the existing main timeout middleware, which just times out waiting for response headers.
0 notes
phoenixjobs8 · 4 years ago
Text
Restaurant Assistant General Manager (AGM)
Salary: $40,000 – $50,000 per year, plus quarterly bonus eligibility (most recent average quarterly AGM bonus was $1,224*)About YouYou are looking for a fun, exciting, yet challenging opportunity in restaurant management.
You want a sharp team, and a bright future with a growing company.
You’re a passionate foodie and love learning new skills in the kitchen, dining room, and business operations.
You consider yourself an innovator, and can build winning teams and surprise our guests with a top-notch experience during each visit.About NoodlesAt Noodles & Company, our mission is to always nourish and inspire every team member, guest and community we serve.
We accomplish this by living our values of We Care, We Show Pride, We are Passionate, and We Love Life!
We provide opportunities to learn culinary skills working with fresh food and the art of personal connection with our guests.
Come join our amazing team, make new friends, develop your career, skills, and have fun.We are proud to be recognized on Forbes’ America’s Best Employers for Diversity 2021 and Forbes’ Best Employers for Women 2021 lists and are committed to creating an inclusive environment where Noodlers can bring their full self to work.BenefitsCareers at Noodles are served with a side of:Medical, dental, vision insurance401(k) and stock purchase discountsCompetitive payFree shift meal – plus food, phone and event ticket discountsOpportunities for advancementPaid time off, paid maternity/paternity leaveScholarship opportunitiesLearn more about our benefits: noodles.com/careers/perks/*Veterans and those with previous military experience are encouraged to apply!Your Day in the LifePartner with the GM to lead a high performing team Run the restaurant with confidence, deliver fast and effective solutions Lead with integrity and live the culture of Noodles & Company every dayAssess team member performance, deliver actionable and timely feedback Create an epic experience by welcoming guests with a smile and delivering world-class customer serviceBuild trust within your team, recognize a job well-doneFollow Noodles & Company’s operational policy and proceduresManage the restaurant to meet company standards in food quality, food safety, and cleanlinessHire, train and manage restaurant team members and shift managersIdentify and foster talent in your team, develop high performers for promotionsFollow inventory control procedures and guidelinesAssist with scheduling, expense tracking, labor management, and local restaurant marketingWhat You Bring to the TeamMinimum of one year of management and/or leadership experienceMust be at least 18 years oldSense of humorAbility to effectively delegate responsibilityConflict resolution skills required, as well as excellent verbal and written communication skillsAbility to work 45 hours per week within our operating hours (generally 11am-9pm), with flexibility to work variable shifts throughout the week (starting as early as 7am, and working until as late as 11pm)Position may include walking, bending, twisting, reaching, stooping, kneeling, crouching, pushing, pulling or moving objects up to 55 poundsCertain other physical requirements may apply, as reasonably applicable in a standard kitchen/restaurant environmentCOVID-19 Safety MeasuresWe are committed to ensuring the safety of our Team Members and Guests.
Our safety measures include:Symptom screenings before each shiftEnhanced cleaning and handwashing proceduresPlexiglass shields and social distancing between Team Members and GuestsLearn more about our safety: noodles.com/teammembersafetynoodles.com/careersNoodles is an Equal Opportunity Employer.
Our goal is to be an inclusive and diverse team that is representative of the communities and guests we serve.*As of Q2 2021, the average quarterly bonus for AGMs across company-owned restaurants was $1,224.
Quarterly bonuses are comprised of financial and operational targets.
Noodles makes no guarantees about bonus earnings and reserves the right to amend bonus and benefits plans as necessary.
The post Restaurant Assistant General Manager (AGM) first appeared on Valley of the Sun Jobs. source https://valleyofthesunjobs.com/upper-management/restaurant-assistant-general-manager-agm-11e9c1/?utm_source=rss&utm_medium=rss&utm_campaign=restaurant-assistant-general-manager-agm-11e9c1
0 notes
gulf-career-hunt · 4 years ago
Text
Sale Executive Dubai UAE
Sale Executive Dubai UAE
Position: Sale Executive Date posted: 2021-02-25 Industry: Real Estate Employment type: Full Time Experience: minimum 2 year Qualification: Bachelor’s Degree holder Salary: AED 3000  Location: Dubai, United Arab Emirates Company: Attractive Home Description: We are looking for Sale Executive lady for our company. Provide excellent customer serviceBuilding and maintaining strong,…
Tumblr media
View On WordPress
0 notes
kimayaacharekarposts · 5 years ago
Text
WHY IS A WEBSITE Crucial FOR YOUR NEW BUSINESS?
Main advantages of a websiteAppear on the top of searchKeep in touch with the current and potential audienceEducate, inform and showcaseMake use of digital marketing and be cost-effectiveExcellent Customer ServiceBuild a reputationCompete in the marketConclusionWe, at Crayon Infotech, a leading UX design agency in Mumbai, follow the benefits of the website when we collaborate with a startup or a small business and work towards making it great in the industry.
Approximately 1.5 billion websites are live today in the digital realm but hardly 10-15% of them updates regularly.
This is a saddening figure and it means that there are huge lost chances for most website owners and zero value for web users. No matter what business you own, in this digital era, it must have a presence marked on the internet.
We are a digital agency and one of the best web development and design agency in Mumbai, our experts have listed out a few benefits for a startup to have a website. So, without further addition, let's find out why the website is a must need for your business.
There is no dearth of reasons that support the idea of making a customized website for a new brand. If you’re still questioning as to why you should be making a custom website for your newly started business, we, as a leading customized product development agency in Mumbai have listed out reasons for you:
In 2020, websites have many goals. An exceptionally well-designed site leaves a great deal of scope for action, like:
Provide information to the prospective clients about your background, services, and solutions
Make sure a visual experience by making apt use of images, videos, and infographics
Share your testimonials of the existing customers to showcase your quality of work
Educate the target audience
Keep in touch with the current customers, and etc.
Web surfers and shoppers take the best deal by researching about the company and its product before buying or ordering. If you design the website correctly, your web resource will appear on the top and considerably enhance your chances of reaching the potential clientele.
If your marketing tactic is still conservative and you rely on brick-and-mortar business, it is peak time for you to go digital for better projects and in terms of availability.
Even if your business is closed due to holidays or any unforeseen circumstances, the online shop will still be functioning all-around-the-clock.
More than 60% of buyers are through a digital platform and those customers need your assistance or advice and wouldn’t adapt to your working hours. On the website, they can any time send a request.
Online presence assists you to expand the borders. A small startup has all the oppurtinities to become a well-established organization. This means, make your website simple to understand and adaptable. The digital presence you have lets you maintain relations with existing clients and build an effective marketing campaign. You also showcase clients about offers, new big events, product updates and many other things.
Users make use of the internet for many purposes- entertainment, searching, buying, and communicating. The most significant reason is to satisfy information hunger. This is the reason it is important to optimize your site in a way that will be both engaging and informative.
Startup sites must have many pages like- Home, About us, Features, Pricing, FAQ, Blog. Every page should be designed according to the UI/UX requirements. Blogs are very crucial for SEO ranking and to appear at the top of the search.
Another point that the website is important for your brand is that it can integrate digital marketing tools and let online entrepreneurs promote their website at a lower cost.
If we compare it to traditional marketing methods like TV advertisements, newspapers, billboards, it is far more effective and less costly.
Also, it is duly noted that a website who blogs receive 97% more links to their website, which means it is highly useful to generate lead to your website.
Among the various benefits of a website, a startup in an early stage have many other advantages. Certainly, nothing is compared to a personal phone call but the majority of the visitors rather prefer online interactions for the follow-up process. This also allows visitors to send in the complaint t any given time.
When you find a great product/service, the first thing all of us tend to do is find information about it online. And, if there is no record online, there is a feeling of distrust certainly and then we move on to another site with similar features.
For a new startup and business, it is very important to have a website to build a reputation and garner the trust of potential customers.
The last but most important profit is that it gives you a chance to beat your competitions.
In a digital era where everyone has their brand out on the internet, it is hard to maintain your stand or just make a new identity.
At the starting of the blog, we have mentioned how the majority of websites are not maintained day-to-day and if you do so, you already are enhancing your chances to stand out from all others. It increases the visibility of your brand.
It is important to ensure that your website resource is truthful, attractive, and mobile-friendly and it will do the trick.
All of the above factors determine and influence the way your brand is viewed by the consumer and your place among the competitors.
0 notes
jobisitejobs · 7 years ago
Text
Moore Freight ServiceMoore Freight Service is looking for Cdl Class A Company Drivers &#8211; Taopi with Moore Freight ServiceMoore Freight Service
The position listed below is not with Minnesota Interviews but with Moore Freight ServiceMoore Freight ServiceMinnesota Interviews is a private organization that works in collaboration with government agencies to promote emerging careers. Our goal is to connect you with supportive resources to supplement your skills in order to attain your dream career.Cdl Class A Company Drivers - Moore Freight ServiceMoore Freight ServiceBuild a Career With Moore Freight Service, Inc.With MFS you are assured of:Flexible Home YimeRespect and PartnershipCompetitive PayMajor Medical Insurance, Dental, VisionShort and Long Term Disability401k Retirement Program Paid Glass TrainingAll Loads Are 95% Pre-LoadedReasonable Work SchedulesNew York City PremiumAll Trucks Associated topics: cdl a, cdl a driving, class a driving, company driving solo, company otr, company truck driver, over the road company, over the road driving, regional driver route, tanker truck  MooreFreightServiceMooreFreightServiceislookingforCdlClassACompanyDrivers–TaopiwithMooreFreightServiceMooreFreightService from Job Portal http://www.jobisite.com/extrJobView.htm?id=114817
0 notes
humph · 12 years ago
Text
Liferay did what to my what? Part 2: Where did that come from?
Last time I wrote about tracking what liferay is doing to your database. Now it's time to bring the discussion up a layer to figure out why those specific database calls are being made.
Chances are, if you're doing anything that is involved enough to need to start tracking through a swathe of database calls, you're going to notice that multiple changes are made to your database for a given click on the control panel. For example, the action of creating a new site in liferay results in a number of changes to the database:
INSERT INTO GROUP_ VALUES(10614,10154,10196,10001,10614,0,0,'Test Site','This is a test site',2,'','/test-site','1','1') INSERT INTO LAYOUTSET VALUES(10615,10614,10154,'2013-01-09 16:56:01.504000','2013-01-09 16:56:01.504000','1','0',0,'classic','01','mobile','01','',0,'','','0') INSERT INTO LAYOUTSET VALUES(10616,10614,10154,'2013-01-09 16:56:01.506000','2013-01-09 16:56:01.506000','0','0',0,'classic','01','mobile','01','',0,'','','0') INSERT INTO RESOURCEPERMISSION VALUES(611,10154,'com.liferay.portal.model.Group',4,'10614',10163,0,2097151) INSERT INTO USERGROUPROLE VALUES(10196,10614,10171) INSERT INTO USERS_GROUPS VALUES(10196,10614) INSERT INTO ASSETENTRY VALUES(10617,10192,10154,10196,'Test Test','2013-01-09 16:56:02.502000','2013-01-09 16:56:02.502000',10001,10614,'',0,'0',NULL,NULL,NULL,NULL,'','Test Site','This is a test site','','','',0,0,0.0E0,0) COMMIT
Now, if you wanted to create a site through your own code, you might be tempted to go and start chaining together calls to various *LocalServiceUtil classes (yes, I'm ignoring the whole static methods, testability, *LocalServiceUtil.getService(), dependency injection conversation for now) to mimic that process. Perhaps something like:
public class SiteCreator { public static void createGroup() throws Exception { // Don't do this! long groupId = CounterLocalServiceUtil.increment(Group.class.getName()); Group group = GroupLocalServiceUtil.createGroup(groupId); group.setName("Test Site"); group.setDescription("This is a test site"); group.setFriendlyURL("/test-site"); // Set a bunch of other properties GroupLocalServiceUtil.addGroup(group); long layoutSetId = CounterLocalServiceUtil.increment( LayoutSet.class.getName() ); LayoutSet layoutSet = LayoutSetLocalServiceUtil.createLayoutSet(layoutSetId); layoutSet.setGroupId(groupId); layoutSet.setPrivateLayout(false); layoutSet.setThemeId("classic"); layoutSet.setColorSchemeId("01"); // Set a bunch of other properties LayoutSetLocalServiceUtil.addLayoutSet(layoutSet); long resourcePermissionId = CounterLocalServiceUtil.increment( ResourcePermission.class.getName() ); ResourcePermission resourcePermission = ResourcePermissionLocalServiceUtil.createResourcePermission( resourcePermissionId ); resourcePermission.setName(Group.class.getName()); resourcePermission.setPrimaryKey(groupId); // Set a bunch of other properties ResourcePermissionLocalServiceUtil.addResourcePermission(resourcePermission); // Continue on with other objects, properties // as needed until you get the job done... } }
Hopefully you can tell that this is a pretty bad idea. Not only are you going through and doing a bunch of work that already exists somewhere within liferay, you often need to go and start tracking through the database to find out what the various magic numbers are in the SQL you have in your hands, to try and figure out what the relationship is.
As hinted at above - there's a better way to reuse what liferay is already doing to create those entities, although it may not be immediately obvious what that way is. If you're not already aware, the vast majority of liferay's code that does real work (as opposed to routing data from the client to the services that do stuff) are generated by a nifty little tool called the Service Builder.
The service builder takes care of generating all of the generic CRUD type functionality you need for persisting and retrieval of information. This is the source of the various LocalServiceUtil, LocalService, ServiceUtil, Util, etc classes you've probably worked with when accessing liferay APIs.
However, the service builder also allows you to write custom code which it then incorporates back into those interfaces, and it is in these extensions that more complex code than "create a user" or "find a wiki page" take place. Service builder extensions take place in the *LocalServiceImpl classes - so that's where we go to look for the magical "do that again for me" entry point.
Returning to our "Create a site" example above, if we take a look through the GroupLocalServiceImpl code, the first method we find takes care of all of that for us.
/** * Adds a group. * * @param userId the primary key of the group's creator/owner * @param parentGroupId the primary key of the parent group * @param className the entity's class name * @param classPK the primary key of the entity's instance * @param liveGroupId the primary key of the live group * @param name the entity's name * @param description the group's description (optionally * <code>null</code>) * @param type the group's type. For more information see {@link * com.liferay.portal.model.GroupConstants} * @param friendlyURL the group's friendlyURL (optionally * <code>null</code>) * @param site whether the group is to be associated with a main site * @param active whether the group is active * @param serviceContext the service context to be applied (optionally * <code>null</code>). Can set asset category IDs and asset tag * names for the group, and whether the group is for staging. * @return the group * @throws PortalException if a creator could not be found, if the group's * information was invalid, if a layout could not be found, or if a * valid friendly URL could not be created for the group * @throws SystemException if a system exception occurred */ public Group addGroup( long userId, long parentGroupId, String className, long classPK, long liveGroupId, String name, String description, int type, String friendlyURL, boolean site, boolean active, ServiceContext serviceContext) throws PortalException, SystemException { // Group User user = userPersistence.findByPrimaryKey(userId); className = GetterUtil.getString(className); long classNameId = PortalUtil.getClassNameId(className); String friendlyName = name; long groupId = 0; while (true) { groupId = counterLocalService.increment(); User screenNameUser = userPersistence.fetchByC_SN( user.getCompanyId(), String.valueOf(groupId)); if (screenNameUser == null) { break; } } boolean staging = isStaging(serviceContext); long groupClassNameId = PortalUtil.getClassNameId(Group.class); if ((classNameId <= 0) || className.equals(Group.class.getName())) { className = Group.class.getName(); classNameId = groupClassNameId; classPK = groupId; } else if (className.equals(Organization.class.getName())) { name = getOrgGroupName(name); } else if (!GroupConstants.USER_PERSONAL_SITE.equals(name)) { name = String.valueOf(classPK); } if (className.equals(Organization.class.getName()) && staging) { classPK = liveGroupId; } if (className.equals(Layout.class.getName())) { Layout layout = layoutLocalService.getLayout(classPK); parentGroupId = layout.getGroupId(); } friendlyURL = getFriendlyURL( user.getCompanyId(), groupId, classNameId, classPK, friendlyName, friendlyURL); if (staging) { name = name.concat(" (Staging)"); friendlyURL = friendlyURL.concat("-staging"); } if (className.equals(Group.class.getName())) { if (!site && (liveGroupId == 0) && !name.equals(GroupConstants.CONTROL_PANEL)) { throw new IllegalArgumentException(); } } else if (!className.equals(Organization.class.getName()) && className.startsWith("com.liferay.portal.model.")) { if (site) { throw new IllegalArgumentException(); } } if ((classNameId <= 0) || className.equals(Group.class.getName())) { validateName(groupId, user.getCompanyId(), name, site); } validateFriendlyURL( user.getCompanyId(), groupId, classNameId, classPK, friendlyURL); Group group = groupPersistence.create(groupId); group.setCompanyId(user.getCompanyId()); group.setCreatorUserId(userId); group.setClassNameId(classNameId); group.setClassPK(classPK); group.setParentGroupId(parentGroupId); group.setLiveGroupId(liveGroupId); group.setName(name); group.setDescription(description); group.setType(type); group.setFriendlyURL(friendlyURL); group.setSite(site); group.setActive(active); if ((serviceContext != null) && (classNameId == groupClassNameId) && !user.isDefaultUser()) { group.setExpandoBridgeAttributes(serviceContext); } groupPersistence.update(group); // Layout sets layoutSetLocalService.addLayoutSet(groupId, true); layoutSetLocalService.addLayoutSet(groupId, false); if ((classNameId == groupClassNameId) && !user.isDefaultUser()) { // Resources resourceLocalService.addResources( group.getCompanyId(), 0, 0, Group.class.getName(), group.getGroupId(), false, false, false); // Site roles Role role = roleLocalService.getRole( group.getCompanyId(), RoleConstants.SITE_OWNER); userGroupRoleLocalService.addUserGroupRoles( userId, groupId, new long[] {role.getRoleId()}); // User userLocalService.addGroupUsers( group.getGroupId(), new long[] {userId}); // Asset if (serviceContext != null) { updateAsset( userId, group, serviceContext.getAssetCategoryIds(), serviceContext.getAssetTagNames()); } } else if (className.equals(Organization.class.getName()) && !user.isDefaultUser()) { // Resources resourceLocalService.addResources( group.getCompanyId(), 0, 0, Group.class.getName(), group.getGroupId(), false, false, false); } return group; }
So, now we can completely avoid needing to reproduce the code we were attempting to write, and instead rely on something given to us by the platform.
Rounding out - what does this all mean? In short - if you want to do something beyond simple CRUD operations, chances are the method is there - you just need to look through the *LocalServiceImpl class to track it down!
0 notes
inextures · 2 years ago
Text
Deactivating and activating custom modules for a particular site in Liferay 7.4 (Part 1)
Tumblr media
In Liferay 7.4 we can deactivate or activate a module for Liferay portal. This can be done using the components and app manager section from the control panel.
Tumblr media
But Liferay doesn’t provide any feature to activate or deactivate a module for a particular site. As it can be a necessary thing when we have multiple sites and want to limit modules for that. To achieve this in Liferay we must create a panel module, service builder and theme. In the following part we will create a panel module to list all custom modules and to give user the access to disable a module on a particular site. In second part we will create a service builder and theme.
Creating a panel module (IntelliJ)
To show and let users perform action we need a module to display portlets and take user action.
To create a panel module this are the following steps:
Go to File -> New -> Module
Select Liferay Modules
Tumblr media
3.Give the name to the module and choose the project type panel app.
4.This will create a panel module.
5.After this to see all modules in view we need to add a render method that will give the list of all custom modules present on the portal.
The portlet will look like this:
Tumblr media Tumblr media
As we don’t have service builder and theme, we won’t be able to perform the active and deactivating functionality. Conclusion
We have created a module to list all the custom modules and let the users have access to activate and deactivate modules for a particular site. In part 2 we will create a service builder and theme.
Originally published by: https://www.inexture.com/deactivating-and-activating-liferay-objects/
0 notes
sritulasibangalore18 · 3 years ago
Video
youtube
Home Painting Service Cost, Best Painting Service, Building Renovation w...Home Painting Service Cost, Best Painting Service,Building Renovation work, Top Painting Contractors in Bangalore #woodworking, #wood, #handmade, #woodworker, #woodwork, #diy, #design, #interiordesign, #woodart, #art, #homedecor, #furniture, #wooddesign, #carpentry, #woodcraft, #woodshop, #woodcarving, #carpenter, #handcrafted, #woodturning, #maker, #furnituredesign, #interior, #custom, #woodworkersofinstagram, #decor, #home, #tools, #woodworkingcommunity, #woodworkers,ikea furnitures, #Bangalore, #vijayanagar, #InsightsIAS, #NAGARBHAVI
0 notes
seanmonstar · 6 years ago
Text
hyper v0.13
After a few months of alpha development, the final release of hyper v0.13.0 is now ready! hyper is a maturing HTTP library written in Rust, already one of the fastest out there1, and trusted by many for its correctness.
The highlights of this release:
Full async/await support.
Tokio v0.2 upgrade.
Adopting tower::Service.
async / await
The premise of async and await in Rust is to allow writing code that uses Futures in a similar style to "blocking" code. No more combinators, no more "callbacks", just slap .await on the end of the expression. For instance, here's how we can use the Client:
#[tokio::main] async fn main() -> Result { let client = Client::new(); let mut resp = client.get("http://httpbin.org/ip".parse()?).await?; println!("Status: {}", resp.status()); println!("Headers: {:#?}\n", resp.headers()); while let Some(chunk) = resp.body_mut().data().await { stdout().write_all(&chunk?).await?; } Ok(()) }
Connecting, writing the request, receiving the response, streaming the body, and writing to stdout can all be done without "blocking" the thread. Instead, with the use of await, just that future will make as much progress as it can without blocking, and then go to a pending state and register a notification when more progress could be made. And yet, it looks just like regular "blocking" code. This should hugely improve the ergonomics of writing server code that scales under load.
Tokio v0.2
Tokio is a phenomenal async IO runtime for Rust, and hyper has built-in support by default. The Tokio v0.2 upgrade includes async/await support, a significant scheduler improvement, and even faster compile times.
Tower Services
Tower is an RPC design that builds off Twitter's "your server as a function"2. It defines the base Service trait, which handles some request-like value, and asynchronously returns a response-like value. The tower-service crate is minimal, and protocol-agnostic. Our hope is others in the ecosystem can be just use Service and http, and not have to depend directly on hyper3.
An additional benefit of integrating with Tower is being able to make use of many of the middleware we've already developed.
Server middleware:
let svc = ServiceBuilder::new() // Reject the request early if concurrency limit is hit .load_shed() // Only allow 1,000 requests in flight at a time .concurrency_limit(1_000) // Cancel requests that hang too long .timeout(Duration::from_secs(30)) // All wrapped around your application logic .service(your_app_service);
Or wrapping a Client:
let svc = ServiceBuilder::new() // Retry requests depending on the responses or errors .retry(your_retry_policy) // Cancel when the server takes too long .timeout(Duration::from_secs(5) // Load balance using P2C .layer(p2c::peak_ewma(dns_resolver)) // Wrapping a hyper::Client .service(hyper_client);
Additionally, most async fn(In) -> Out things in hyper are now just a Service. This means you can easily add these middleware to custom resolvers or connectors, for instance. Uses include adding a timeout or whitelist to a resolver.
v0.13.0
This probably the most exciting release of hyper yet. It's all thanks to the 30+ contributors tireless efforts this release that we've gotten this far. Our production users continue to help us improve hyper's correctness, performance, and features. The current goal is that we can finish up the remaining design questions and release hyper 1.0 in the middle of 2020.
To see even more details, check out the v0.13.0 changelog!
Always take benchmarks with a carton of salt. ↩︎
"Your Server as a Function" (PDF) ↩︎
This is similar to Python's WSGI, Ruby's Rack, and Java's Servlet. ↩︎
0 notes
seanmonstar · 6 years ago
Text
hyper alpha supports async/await
I'm excited to announce the first alpha of hyper 0.13. hyper is a maturing HTTP library written in Rust, already one of the fastest out there, and trusted by many for its correctness.
This alpha release brings support for the new std::future::Future. The reason this is so exciting is that this allows using the new async/await syntax that will be stabilizing in Rust 1.39.
Example
The follow example shows how one can use async/await to dump a response to the console:
#[tokio::main] async fn main() -> Result<(), Error> { let client = Client::new(); let resp = client.get("http://httpbin.org/ip".parse()?).await?; println!("Status: {}", resp.status()); println!("Headers: {:#?}\n", resp.headers()); while let Some(chunk) = resp.body_mut().next().await { stdout().write_all(&chunk?)?; } Ok(()) }
The same async/await style can be used for writing servers as well!
Changes to come
Besides the change from futures 0.1 to std::future::Future and how writing code with async/await, much of hyper's API will feel very similar. Still, there a some technically breaking changes that will be included in the 0.13 as well.
Embracing tower::Service
During hyper 0.12, servers were defined via the hyper::service::Service trait. Since then, we've been working hard on a general Service interface, and building powerful middleware that can utilize it. Our hope is that eventually, applications can be generic over Service and the http types, and a user could choose their backend that plugs right in (such as hyper).
Consider a small example that handles many mundane things for you:
let svc = ServiceBuilder::new() // Reject the request early if concurrency limit is hit .load_shed() // Only allow 1,000 requests in flight at a time .concurrency_limit(1_000) // Cancel requests that hang too long .timeout(Duration::from_secs(30)) // All wrapped around your application logic .service(your_app_service);
The tower::Service trait easily allows everyone to power up their servers and clients!
Alpha One
This first alpha is to allow people to try out writing HTTP servers and clients using the new async/await syntax. All the features from 0.12 work in this release. However, not all the API changes have been finalized, so as with other alphas, there will likely be breakage between alpha releases as we fine tune things.
But for now, get your fresh copy of hyper v0.13.0-alpha.1 here!
[dependencies] hyper = "=0.13.0-alpha.1"
0 notes