[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1495) Add option to overide ImageCaptchaService service in CaptchaImage

Mariusz Smykula (JIRA) jira-events at lists.jboss.org
Tue Jun 19 03:57:11 EDT 2007


Add option to overide ImageCaptchaService service in CaptchaImage
-----------------------------------------------------------------

                 Key: JBSEAM-1495
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1495
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Security
    Affects Versions: 1.3.0.ALPHA
            Reporter: Mariusz Smykula


This is necessary to extend this class and make my own implementation (simpler than default). Making service protected or adding setter can help.

I need to implement my own create() method. If there is other solution, please give me advice.

	@Create
	public void create() {
		// service = new DefaultManageableImageCaptchaService();

		SimpleListImageCaptchaEngine engine = new SimpleListImageCaptchaEngine();
		engine
				.addFactory(new GimpyFactory(new RandomWordGenerator(
						"ABCDEFGHIJKLMNOPQRSTUVWXYZ"), new ComposedWordToImage(
						new RandomFontGenerator(new Integer(12),
								new Integer(16)), new FunkyBackgroundGenerator(
								new Integer(200), new Integer(100)),
						new RandomTextPaster(new Integer(6), new Integer(10),
								Color.BLACK))));
		service = new DefaultManageableImageCaptchaService(
				new FastHashMapCaptchaStore(), engine, 180, 100000, 75000);			

	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list