Skip to content

Method: build(ResourceProperties.Builder)

1: /*
2: * #%L
3: * *********************************************************************************************************************
4: *
5: * NorthernWind - lightweight CMS
6: * http://northernwind.tidalwave.it - git clone git@bitbucket.org:tidalwave/northernwind-rca-src.git
7: * %%
8: * Copyright (C) 2013 - 2021 Tidalwave s.a.s. (http://tidalwave.it)
9: * %%
10: * *********************************************************************************************************************
11: *
12: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
13: * the License. You may obtain a copy of the License at
14: *
15: * http://www.apache.org/licenses/LICENSE-2.0
16: *
17: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
18: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
19: * specific language governing permissions and limitations under the License.
20: *
21: * *********************************************************************************************************************
22: *
23: *
24: * *********************************************************************************************************************
25: * #L%
26: */
27: package it.tidalwave.northernwind.model.impl.admin;
28:
29: import javax.annotation.Nonnull;
30: import it.tidalwave.northernwind.core.model.Content;
31: import it.tidalwave.northernwind.core.model.Resource;
32: import it.tidalwave.northernwind.core.model.ResourceFile;
33: import it.tidalwave.northernwind.core.model.ResourceProperties;
34: import it.tidalwave.northernwind.core.model.Site;
35: import it.tidalwave.northernwind.core.model.SiteNode;
36: import it.tidalwave.northernwind.core.model.spi.ModelFactorySupport;
37: import it.tidalwave.northernwind.core.impl.model.DefaultResourceProperties;
38:
39: /***********************************************************************************************************************
40: *
41: * @author Fabrizio Giudici
42: *
43: **********************************************************************************************************************/
44: public class AdminModelFactory extends ModelFactorySupport
45: {
46: @Override @Nonnull
47: public Resource build (@Nonnull final Resource.Builder builder)
48: {
49: return new AdminResource(builder);
50: }
51:
52: @Override @Nonnull
53: public Content build (@Nonnull final Content.Builder builder)
54: {
55: return new AdminContent(builder);
56: }
57:
58: @Override @Nonnull
59: public SiteNode createSiteNode (@Nonnull final Site site, @Nonnull final ResourceFile file)
60: {
61: return new AdminSiteNode(site, this, file);
62: }
63:
64: @Override @Nonnull
65: public ResourceProperties build (@Nonnull final ResourceProperties.Builder builder)
66: {
67: return new DefaultResourceProperties(builder);
68: }
69: }