org.apache.felix.webconsole.DefaultBrandingPlugin Maven / Gradle / Ivy
Show all versions of aem-sdk-api Show documentation
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.webconsole;
import org.apache.felix.webconsole.internal.servlet.BrandingPluginImpl;
/**
* The DefaultBrandingPlugin
class is the default implementation
* of the {@link BrandingPlugin} interface. The singleton instance of this
* class is used as branding plugin if no BrandingPlugin service is registered
* in the system.
*
* This default implementation provides Apache Felix based default branding
* as follows:
*
* Web Console Branding Properties
* Name Property Name Default Value
*
* Brand Name
* webconsole.brand.name
* Apache Felix Web Console
*
*
* Product Name
* webconsole.product.name
* Apache Felix
*
*
* Product URL
* webconsole.product.url
* https://felix.apache.org
*
*
* Product Image
* webconsole.product.image
* /res/imgs/logo.png
*
*
* Vendor Name
* webconsole.vendor.name
* The Apache Software Foundation
*
*
* Vendor URL
* webconsole.vendor.url
* https://www.apache.org
*
*
* Vendor Image
* webconsole.vendor.image
* /res/imgs/logo.png
*
*
* Favourite Icon
* webconsole.favicon
* /res/imgs/favicon.ico
*
*
* Main Stylesheet
* webconsole.stylesheet
* /res/ui/admin.css
*
*
*
* If a properties file META-INF/webconsole.properties
is available
* through the class loader of this class, the properties overwrite the default
* settings according to the property names listed above. The easiest way to
* add such a properties file is to provide a fragment bundle with the file.
*
* @deprecated Plugins should never use the branding plugin directly
*/
@Deprecated
public class DefaultBrandingPlugin implements BrandingPlugin {
private static volatile DefaultBrandingPlugin instance;
private final BrandingPluginImpl delegate;
private DefaultBrandingPlugin() {
this.delegate = new BrandingPluginImpl();
}
/**
* Retrieves the shared instance
*
* @return the singleton instance of the object
*/
public static DefaultBrandingPlugin getInstance() {
if ( instance == null ) {
instance = new DefaultBrandingPlugin();
}
return instance;
}
@Override
public String getBrandName() {
return delegate.getBrandName();
}
@Override
public String getFavIcon() {
return delegate.getFavIcon();
}
@Override
public String getMainStyleSheet() {
return delegate.getMainStyleSheet();
}
@Override
public String getProductImage() {
return delegate.getProductImage();
}
@Override
public String getProductName() {
return delegate.getProductName();
}
@Override
public String getProductURL() {
return delegate.getProductURL();
}
@Override
public String getVendorImage() {
return delegate.getVendorImage();
}
@Override
public String getVendorName() {
return delegate.getVendorName();
}
@Override
public String getVendorURL() {
return delegate.getVendorURL();
}
}