1 16 17 package org.springframework.context.support; 18 19 import org.springframework.context.MessageSource; 20 import org.springframework.context.MessageSourceAware; 21 import org.springframework.core.io.Resource; 22 23 27 public class Service implements MessageSourceAware { 28 29 private MessageSource messageSource; 30 31 private Resource[] resources; 32 33 public void setMessageSource(MessageSource messageSource) { 34 if (this.messageSource != null) { 35 throw new IllegalArgumentException ("MessageSource should not be set twice"); 36 } 37 this.messageSource = messageSource; 38 } 39 40 public MessageSource getMessageSource() { 41 return messageSource; 42 } 43 44 public void setResources(Resource[] resources) { 45 this.resources = resources; 46 } 47 48 public Resource[] getResources() { 49 return resources; 50 } 51 52 } 53 | Popular Tags |