Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.service.orchestration.model

File TemplateEvents.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

0
13
8
2
71
60
8
0.62
1.62
4
1

Classes

Class Line # Actions
TemplateEvents 9 2 2
0.00%
TemplateEvents.ContentSavedEvent 30 11 6
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.service.orchestration.model;
2   
3    import io.sunshower.common.Identifier;
4    import io.sunshower.service.graph.service.ContentResolver;
5    import io.sunshower.service.hal.core.Content;
6    import io.sunshower.service.hal.core.Element;
7    import io.sunshower.service.model.PropertyAwareObject;
8   
 
9    public final class TemplateEvents {
10   
 
11  0 toggle public static TemplateEvent<ContentSavedEvent> contentSaved(
12    final Content content,
13    final Identifier entityId,
14    final Class<?> entityType,
15    final Template template,
16    final ContentResolver resolver) {
17  0 return new ContentSavedEvent(content, entityId, entityType, template, resolver);
18    }
19   
 
20  0 toggle public static TemplateEvent contentWritten(
21    Content content,
22    Template entity,
23    String s,
24    Identifier targetId,
25    Class<? extends PropertyAwareObject> targetType,
26    Element target) {
27  0 return new ContentWrittenEvent(entity, s, targetId, targetType, content, target);
28    }
29   
 
30    public static final class ContentSavedEvent extends TemplateEvent<ContentSavedEvent> {
31    private final Content content;
32    private final Identifier elementId;
33    private final Class<?> elementType;
34    private final Template owner;
35    private final ContentResolver contentResolver;
36   
 
37  0 toggle public ContentSavedEvent(
38    Content content,
39    Identifier elementId,
40    Class<?> elementType,
41    Template owner,
42    ContentResolver contentResolver) {
43  0 super(Type.ContentSaved);
44  0 this.owner = owner;
45  0 this.content = content;
46  0 this.elementId = elementId;
47  0 this.elementType = elementType;
48  0 this.contentResolver = contentResolver;
49    }
50   
 
51  0 toggle public Identifier getElementId() {
52  0 return elementId;
53    }
54   
 
55  0 toggle public Class<?> getElementType() {
56  0 return elementType;
57    }
58   
 
59  0 toggle public Content getContent() {
60  0 return content;
61    }
62   
 
63  0 toggle public Template getOwner() {
64  0 return owner;
65    }
66   
 
67  0 toggle public ContentResolver getContentResolver() {
68  0 return contentResolver;
69    }
70    }
71    }