1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.spring;
17
18 import org.kuali.common.util.Artifact;
19 import org.kuali.common.util.RepositoryUtils;
20 import org.springframework.beans.factory.FactoryBean;
21 import org.springframework.util.Assert;
22
23 public class ArtifactFilenameFactoryBean extends Artifact implements FactoryBean<String> {
24
25 @Override
26 public String getObject() throws Exception {
27
28 Assert.notNull(getGroupId());
29 Assert.notNull(getArtifactId());
30 Assert.notNull(getVersion());
31 Assert.notNull(getPackaging());
32
33 return RepositoryUtils.getFilename(this);
34 }
35
36 @Override
37 public Class<String> getObjectType() {
38 return String.class;
39 }
40
41 @Override
42 public boolean isSingleton() {
43 return false;
44 }
45 }