All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.social.connect.web.thymeleaf.SpringSocialDialect Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2015 the original author or authors.
 *
 * Licensed 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.springframework.social.connect.web.thymeleaf;

import java.util.LinkedHashSet;
import java.util.Set;

import org.thymeleaf.dialect.AbstractDialect;
import org.thymeleaf.processor.IProcessor;

/**
 * 

* Thymeleaf dialect offering Spring Social connectivity integration. * Offers a social:connected attribute that conditional renders content based on whether or not a user has a connection with a given provider. *

* *

* Example: *

* * * <div social:connected="facebook">
*   Only rendered if connected to Facebook
* </div> *
* * @author Craig Walls */ public class SpringSocialDialect extends AbstractDialect { // TODO: Consider implementing IExpressionEnhancingDialect and throwing some social stuff into context // for use in standard/spring dialect expressions public SpringSocialDialect() { super(); } public String getPrefix() { return "social"; } @Override public Set getProcessors() { final Set processors = new LinkedHashSet(); processors.add(new ConnectedAttrProcessor()); return processors; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy