1 /*
2 * MoneyWise: Finance Application
3 * Copyright 2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18 package io.github.tonywasher.joceanus.moneywise.quicken.file;
19
20 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWisePayee;
21 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWisePortfolio;
22 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWiseSecurity;
23 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWiseTransAsset;
24 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWiseTransCategory;
25 import io.github.tonywasher.joceanus.moneywise.data.basic.MoneyWiseTransTag;
26 import io.github.tonywasher.joceanus.moneywise.quicken.definitions.MoneyWiseQIFType;
27
28 /**
29 * Register interface.
30 */
31 public interface MoneyWiseQIFRegister {
32 /**
33 * Obtain the file type.
34 *
35 * @return the file type
36 */
37 MoneyWiseQIFType getFileType();
38
39 /**
40 * Obtain account.
41 *
42 * @param pName the name of the account
43 * @return the account
44 */
45 MoneyWiseQIFAccount getAccount(String pName);
46
47 /**
48 * Obtain category.
49 *
50 * @param pName the name of the category
51 * @return the category
52 */
53 MoneyWiseQIFEventCategory getCategory(String pName);
54
55 /**
56 * Obtain class.
57 *
58 * @param pName the name of the class
59 * @return the class
60 */
61 MoneyWiseQIFClass getClass(String pName);
62
63 /**
64 * Obtain security.
65 *
66 * @param pName the name of the security
67 * @return the security
68 */
69 MoneyWiseQIFSecurity getSecurity(String pName);
70
71 /**
72 * Obtain security by Symbol.
73 *
74 * @param pSymbol the symbol of the security
75 * @return the security
76 */
77 MoneyWiseQIFSecurity getSecurityBySymbol(String pSymbol);
78
79 /**
80 * Register account.
81 *
82 * @param pAccount the account
83 * @return the QIFAccount representation
84 */
85 MoneyWiseQIFAccountEvents registerAccount(MoneyWiseTransAsset pAccount);
86
87 /**
88 * Register holding account.
89 *
90 * @param pPortfolio the portfolio
91 * @return the QIFAccount representation
92 */
93 MoneyWiseQIFAccountEvents registerHoldingAccount(MoneyWisePortfolio pPortfolio);
94
95 /**
96 * Register security.
97 *
98 * @param pSecurity the security
99 * @return the QIFSecurity representation
100 */
101 MoneyWiseQIFSecurity registerSecurity(MoneyWiseSecurity pSecurity);
102
103 /**
104 * Register payee.
105 *
106 * @param pPayee the payee
107 * @return the QIFPayee representation
108 */
109 MoneyWiseQIFPayee registerPayee(MoneyWisePayee pPayee);
110
111 /**
112 * Register payee.
113 *
114 * @param pPayee the payee
115 * @return the QIFPayee representation
116 */
117 MoneyWiseQIFPayee registerPayee(String pPayee);
118
119 /**
120 * Register category.
121 *
122 * @param pCategory the category
123 * @return the QIFEventCategory representation
124 */
125 MoneyWiseQIFEventCategory registerCategory(MoneyWiseTransCategory pCategory);
126
127 /**
128 * Register class.
129 *
130 * @param pClass the class
131 * @return the QIFClass representation
132 */
133 MoneyWiseQIFClass registerClass(MoneyWiseTransTag pClass);
134
135 /**
136 * Register class.
137 *
138 * @param pClass the class
139 */
140 void registerClass(MoneyWiseQIFClass pClass);
141 }