DBA Data[Home] [Help]

PACKAGE: APPS.FND_OAM_DSCFG_INSTANCES_PKG

Source


1 PACKAGE FND_OAM_DSCFG_INSTANCES_PKG AUTHID CURRENT_USER as
2 /* $Header: AFOAMDSCINSTS.pls 120.1 2005/12/19 09:50 ilawler noship $ */
3 
4    ---------------
5    -- Constants --
6    ---------------
7    -- Config Instance Types are stored in DSCFG_API_PKG
8 
9    ---------------------------------
10    -- Public Procedures/Functions --
11    ---------------------------------
12 
13    -- Accessor function, checks if internal state is initialized.
14    -- Invariants:
15    --   None
16    -- Parameters:
17    --   None
18    -- Returns:
19    --   Boolean where TRUE=Initialized
20    -- Exceptions:
21    --   None
22    FUNCTION IS_INITIALIZED
23       RETURN BOOLEAN;
24 
25    -- Accessor function, obtains the config_instance_id.
26    -- Invariants:
27    --   Only has a value during import after the configuration instance has been initialized.
28    -- Parameters:
29    --   None
30    -- Returns:
31    --   The config_instance_id stored in the package state from the last sucessful ADD_CONFIG_INSTANCE
32    --   or SET_CURRENT_CONFIG_INSTANCE call.
33    -- Exceptions:
34    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
35    FUNCTION GET_CURRENT_ID
36       RETURN NUMBER;
37 
38    -- Accessor function, obtains the config_instance_type.
39    -- Invariants:
40    --   Only has a value during import after the configuration instance has been initialized.
41    -- Parameters:
42    --   None
43    -- Returns:
44    --   The config_instance_type stored in the package state from the last sucessful ADD_CONFIG_INSTANCE
45    --   or SET_CURRENT_CONFIG_INSTANCE call.
46    -- Exceptions:
47    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
48    FUNCTION GET_CURRENT_TYPE
49       RETURN VARCHAR2;
50 
51    -- Accessor function, obtains the DBNAME of the original source database.  This column may be used along
52    -- with the clone_key/policyset_id in custom import procedures to identify what steps need to be taken.
53    -- Invariants:
54    --   Only has a value during import after the configuration instance has been initialized.
55    -- Parameters:
56    --   None
57    -- Returns:
58    --   The source database's DBNAME or NULL if it wasn't provided or is irrelevant.
59    -- Exceptions:
60    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
61    FUNCTION GET_CURRENT_SOURCE_DBNAME
62       RETURN VARCHAR2;
63 
64    -- Accessor function, obtains the clone key associated with currently importing configuration instance.
65    -- Invariants:
66    --   Only has a value during import after the configuration instance has been initialized.
67    -- Parameters:
68    --   None
69    -- Returns:
70    --   The clone key associated with the in-progress configuration instance, may be NULL
71    --   if the configuration instance type is not CLONING.
72    -- Exceptions:
73    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
74    FUNCTION GET_CURRENT_CLONE_KEY
75       RETURN VARCHAR2;
76 
77    -- Accessor function, obtains the policyset_id associated with currently importing configuration instance.
78    -- Invariants:
79    --   Only has a value during import after the configuration instance has been initialized.
80    -- Parameters:
81    --   None
82    -- Returns:
83    --   The numerical ID of the Policy Set associated with the in-progress configuration instance, may be NULL
84    --   if there is no policyset_id associated with this instance.
85    -- Exceptions:
86    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
87    FUNCTION GET_CURRENT_POLICYSET_ID
88       RETURN NUMBER;
89 
90    -- Setter/Getter for field LAST_IMPORTED of the current configuration instance.
91    -- Invariants:
92    --   Should only be called after the configuration instance has been initialized.
93    -- Parameters:
94    --   Self-exlanatory.
95    -- Returns:
96    --   None
97    -- Exceptions:
98    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
99    PROCEDURE SET_LAST_IMPORTED(p_last_imported  IN DATE);
100    FUNCTION GET_LAST_IMPORTED
101       RETURN DATE;
102 
103    -- Setter/Getter for field IMPORT_DURATION of the current configuration instance.
104    -- Invariants:
105    --   Should only be called after the configuration instance has been initialized.
106    -- Parameters:
107    --   Self-exlanatory.
108    -- Returns:
109    --   None
110    -- Exceptions:
111    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
112    PROCEDURE SET_IMPORT_DURATION(p_import_duration  IN NUMBER);
113    FUNCTION GET_IMPORT_DURATION
114       RETURN NUMBER;
115 
116    -- Setter/Getter for field LAST_COMPILED of the current configuration instance.
117    -- Invariants:
118    --   Should only be called after the configuration instance has been initialized.
119    -- Parameters:
120    --   Self-exlanatory.
121    -- Returns:
122    --   None
123    -- Exceptions:
124    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
125    PROCEDURE SET_LAST_COMPILED(p_last_compiled  IN DATE);
126    FUNCTION GET_LAST_COMPILED
127       RETURN DATE;
128 
129    -- Setter/Getter for field COMPILE_DURATION of the current configuration instance.
130    -- Invariants:
131    --   Should only be called after the configuration instance has been initialized.
132    -- Parameters:
133    --   Self-exlanatory.
134    -- Returns:
135    --   None
136    -- Exceptions:
137    --   If the configuration instance state isn't initialized, a NO_DATA_FOUND exception is thrown.
138    PROCEDURE SET_COMPILE_DURATION(p_compile_duration  IN NUMBER);
139    FUNCTION GET_COMPILE_DURATION
140       RETURN NUMBER;
141 
142    -- This procedure checks to see if a configuration already exists for the provided type and associated state.
143    -- Invariants:
144    --   None
145    -- Parameters:
146    --   p_target_dbname         Name of the database for which this configuration instance is being created - may be
147    --                           different from database where configuration is being done.
148    --   p_config_instance_type  Configuration Instance Type, defined in API_PKG.G_INSTTYPE_*.
149    --   p_clone_key             [OPTIONAL]Clone key associated with instance when p_type=G_ITYPE_CLONING.
150    --   p_policyset_id          [OPTIONAL]Policy Set ID associated with configuration, may be NULL if unspecified or irrelevant.
151    --
152    --   x_config_instance_id:   The corresponding ID of the existing configuration instance, NULL if none found.
153    -- Return Statuses:
154    --   Swallows all errors, returns TRUE if x_config_instance_id holds a valid ID, FALSE otherwise.
155    FUNCTION CONFIG_INSTANCE_EXISTS(p_target_dbname              IN VARCHAR2,
156                                    p_config_instance_type       IN VARCHAR2,
157                                    p_clone_key                  IN VARCHAR2     DEFAULT NULL,
158                                    p_policyset_id               IN NUMBER       DEFAULT NULL,
159                                    x_config_instance_id         OUT NOCOPY NUMBER)
160       RETURN BOOLEAN;
161 
162    -- This procedure creates a new configuration instance.  This procedure makes sure the database is in a state
163    -- where configuration changes can be made and initializes package state on success.
164    -- Invariants:
165    --   None
166    -- Parameters:
167    --   p_target_dbname         Name of the database for which this configuration instance is being created - may be
168    --                           different from database where configuration is being done.
169    --   p_config_instance_type  Configuration Instance Type, defined in API_PKG.G_INSTTYPE_*.
170    --   p_name                  Name of the configuration instance.
171    --   p_description           Description of the configuration instance.
172    --   p_language              Language used for the name/description, defaults to USERENV('LANG') if null.
173    --   p_clone_key             [OPTIONAL]Clone key associated with instance when p_type=G_ITYPE_CLONING.
174    --   p_policyset_id          [OPTIONAL]Policy Set ID associated with configuration, may be NULL if unspecified or irrelevant.
175    --
176    --   x_config_instance_id:   The corresponding ID of the newly created configuration instance.
177    -- Return Statuses:
178    --   Throws PROGRAM_ERROR if scrambling configuration changes are not allowed.
179    PROCEDURE ADD_CONFIG_INSTANCE(p_target_dbname        IN VARCHAR2,
180                                  p_config_instance_type IN VARCHAR2,
181                                  p_name                 IN VARCHAR2,
182                                  p_description          IN VARCHAR2     DEFAULT NULL,
183                                  p_language             IN VARCHAR2     DEFAULT NULL,
184                                  p_source_dbname        IN VARCHAR2     DEFAULT NULL,
185                                  p_clone_key            IN VARCHAR2     DEFAULT NULL,
186                                  p_policyset_id         IN NUMBER       DEFAULT NULL,
187                                  x_config_instance_id   OUT NOCOPY NUMBER);
188 
189    -- This procedure uses an existing configuration instance.  This procedure makes sure the database is in a state
190    -- where configuration changes can be made and initializes package state on success.
191    -- Invariants:
192    --   Config Instance ID should be retrieved via a previous call to CONFIG_INSTANCE_EXISTS.
193    -- Parameters:
194    --   p_config_instance_id:   The configuration instance ID we want to use
195    -- Return Statuses:
196    --   Throws NO_DATA_FOUND if config instance does not exist or is invalid.
197    --   Also, throws PROGRAM_ERROR if scrambling configuration is not allowed.
198    PROCEDURE SET_CURRENT_CONFIG_INSTANCE(p_config_instance_id   IN NUMBER);
199 
200    -- This procedure deletes a configuration instance.
201    -- Invariants:
202    --   None
203    -- Parameters:
204    --   p_config_instance_id:   The configuration instance ID
205    --   p_recurse               FND_API.G_TRUE/G_FALSE indicating whether to recurse and delete child objects/properties
206    -- Return Statuses:
207    --   Throws NO_DATA_FOUND if config instance does not exist.
208    FUNCTION DELETE_CONFIG_INSTANCE(p_config_instance_id IN NUMBER,
209                                    p_recurse_config     IN VARCHAR2 DEFAULT NULL,
210                                    p_recurse_engine     IN VARCHAR2 DEFAULT NULL)
211       RETURN BOOLEAN;
212 
213 END FND_OAM_DSCFG_INSTANCES_PKG;