/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.frontend.image.editor.capability.rotate.internal; import com.liferay.frontend.image.editor.capability.BaseImageEditorCapability; import com.liferay.frontend.image.editor.capability.ImageEditorCapability; import com.liferay.portal.kernel.util.ResourceBundleUtil; import java.util.Locale; import java.util.ResourceBundle; import javax.servlet.ServletContext; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; /** * @author Bruno Basto */ @Component( immediate = true, property = { "com.liferay.frontend.image.editor.capability.category=transform", "com.liferay.frontend.image.editor.capability.controls=rotate", "com.liferay.frontend.image.editor.capability.icon=transform", "com.liferay.frontend.image.editor.capability.name=rotate", "com.liferay.frontend.image.editor.capability.type=tool" }, service = ImageEditorCapability.class ) public class ImageEditorCapabilityRotate extends BaseImageEditorCapability { @Override public String getLabel(Locale locale) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle( "content.Language", locale, getClass()); return ResourceBundleUtil.getString(resourceBundle, "rotate"); } @Override public String getName() { return "rotate"; } @Override public ServletContext getServletContext() { return _servletContext; } @Reference( target = "(osgi.web.symbolicname=com.liferay.frontend.image.editor.capability.rotate)" ) private ServletContext _servletContext; }