Skip to content

Commit

Permalink
LPS-75216 Add CE portal profile
Browse files Browse the repository at this point in the history
  • Loading branch information
mtambara authored and brianchandotcom committed Oct 17, 2017
1 parent 3bd9ec5 commit ec1f0c0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ dependencies {

provided group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
provided group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"
provided group: "com.liferay", name: "com.liferay.portal.profile", version: "1.0.0"
provided group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
provided group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
provided group: "org.osgi", name: "org.osgi.core", version: "5.0.0"
provided group: "org.osgi", name: "org.osgi.service.component", version: "1.3.0"
provided group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
@Component(
configurationPid = "com.liferay.portal.mobile.device.detection.fiftyonedegrees.configuration.FiftyOneDegreesConfiguration",
immediate = true, property = {"service.ranking:Integer=1"},
enabled = false, immediate = true, property = {"service.ranking:Integer=1"},
service = DataFileProvider.class
)
public class FiftyOneDegreesDataFileProvider implements DataFileProvider {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* 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.portal.mobile.device.detection.fiftyonedegrees.internal.portal.profile;

import com.liferay.portal.mobile.device.detection.fiftyonedegrees.internal.data.FiftyOneDegreesDataFileProvider;
import com.liferay.portal.profile.BaseDSModulePortalProfile;
import com.liferay.portal.profile.PortalProfile;

import java.util.Collections;

import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;

/**
* @author Matthew Tambara
*/
@Component(immediate = true, service = PortalProfile.class)
public class ModulePortalProfile extends BaseDSModulePortalProfile {

@Activate
public void activate(ComponentContext componentContext) {
init(
componentContext,
Collections.singleton(PortalProfile.PORTAL_PROFILE_NAME_CE),
FiftyOneDegreesDataFileProvider.class.getName());
}

}

0 comments on commit ec1f0c0

Please sign in to comment.