This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void shouldSubscribeAlreadyConfirmedRecipientByExternalApplication() throws Exception { | |
Recipient rcp = recipientListManager.createNewRecipient(); | |
rcp.setName("Uďo"); | |
rcp.setAddress(new EmailAddress("novotnaci+udo@gmail.com")); | |
recipientListManager.subscribeConfirmedRecipient(rcp); | |
Recipient createdRcpt = recipientListManager.getRecipientByAddress("novotnaci+udo@gmail.com"); | |
assertNotNull(createdRcpt); | |
assertEquals(RecipientState.Confirmed, createdRcpt.getState()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RunAsSupportTestExecutionListener extends AbstractTestExecutionListener { | |
private static final ThreadLocal<User> savedAuthentication = new ThreadLocal<User>(); | |
@Override | |
public void prepareTestInstance(TestContext testContext) throws Exception { | |
super.prepareTestInstance(testContext); | |
try { | |
testContext.getApplicationContext().getBean(CpsModuleSecuritySupport.class); | |
} catch (NoSuchBeanDefinitionException ignored) { | |
CpsModuleSupport moduleSupport = mock(CpsModuleSupport.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void render(RequestContext context, WidgetDefinition widgetDefinition, TemplateReference templateReference, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) throws TemplateNotFoundException, TemplateProcessingException { | |
try { | |
//we have to set encoding before writer is fetche | |
try { | |
response.setCharacterEncoding(configuration.getDefaultEncoding()); | |
} catch (NoSuchMethodError e) { | |
// servlet spec 2.3 | |
response.setContentType("text/html; encoding=" + configuration.getDefaultEncoding()); | |
} | |
PageDefinition pageDefinition = (PageDefinition) context.getRequestable(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<dictionary> | |
<widgets> | |
<rowFluid extends="widgetContainer" template="inherit"> | |
<metadata> | |
<htmlClass>row-fluid</htmlClass> | |
</metadata> | |
</rowFluid> | |
<span1 extends="widgetContainer" template="inherit"> | |
<metadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.sourceforge.stripes.controller; | |
import net.sourceforge.stripes.action.ActionBean; | |
import net.sourceforge.stripes.exception.StripesServletException; | |
import net.sourceforge.stripes.util.HttpUtil; | |
import net.sourceforge.stripes.util.Log; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.Node; | |
import org.w3c.dom.NodeList; | |
import org.xml.sax.SAXException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fg.doxx.gastro.web.user.validator; | |
import com.fg.doxx.gastro.business.GastroUserManager; | |
import com.fg.doxx.gastro.model.user.GastroUser; | |
import com.fg.form.core.context.RequestContext; | |
import com.fg.form.core.data.state.State; | |
import com.fg.form.core.lifecycle.validate.impl.AbstractSingleValueWidgetValidator; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.util.StringUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Partial update allows AJAX partial update of the DOM structure by communicating with component background implemented | |
* in RamJet technology. | |
* | |
* Custom settings: | |
* | |
* alterHistory - boolean true - if browser history is ought to be altered, | |
* - boolean false - if browser history should remain untouched | |
* - (default) not set - only links/forms targeting the same page will alter the history | |
* historyScope - parameters - keeps only parameter values in history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static class SerializableProxyDescriptor implements Serializable { | |
private static final long serialVersionUID = 8401525823871149500L; | |
private final Class mainClass; | |
private final Class[] interfaces; | |
private final Object target; | |
private final DeserializationProxyFactory deserializationProxyFactory; | |
private final Map<String, Object> pojoFields = new HashMap<String, Object>(); | |
private SerializableProxyDescriptor(Class mainClass, Class[] interfaces, Object target, DeserializationProxyFactory deserializationProxyFactory) { | |
this.mainClass = mainClass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fg.http.csrf; | |
import org.apache.commons.codec.binary.Base32; | |
import org.springframework.web.util.WebUtils; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpSession; | |
import java.security.SecureRandom; | |
import java.util.Random; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<beans:beans xmlns="http://www.springframework.org/schema/security" | |
xmlns:beans="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/security | |
http://www.springframework.org/schema/security/spring-security.xsd"> | |
<http pattern="/css/**" security="none"/> |