BrightSide Workbench Full Report + Source Code
DescriptorValueStubverb.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2023 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.dossier.stub;
20 
21 import org.turro.dossier.entity.DescriptorValue;
22 import org.turro.mail.message.MailUtils;
23 import org.turro.reflection.stub.DefaultStub;
24 
29 public class DescriptorValueStubverb extends DefaultStub {
30 
31  private DescriptorDefinitionStubverb descriptorDefinition;
32  private String text;
33 
34  public DescriptorValueStubverb(DescriptorValue descriptorValue) {
35  silentlyInitializeValues(descriptorValue, (k, v) -> {
36  if(k instanceof String sk) {
37  if(v != null && "text".equals(sk)) {
38  return MailUtils.toAbsolute((String) v);
39  }
40  }
41  return v;
42  });
43  }
44 
46  return descriptorDefinition;
47  }
48 
49  public void setDescriptorDefinition(DescriptorDefinitionStubverb descriptorDefinition) {
50  this.descriptorDefinition = descriptorDefinition;
51  }
52 
53  public String getText() {
54  return text;
55  }
56 
57  public void setText(String text) {
58  this.text = text;
59  }
60 
61 }
62 
void setDescriptorDefinition(DescriptorDefinitionStubverb descriptorDefinition)
DescriptorValueStubverb(DescriptorValue descriptorValue)