Class TdbProcedure
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
,TdbControlObjectProvider
,Iterable<String>
-
Constructor Summary
ConstructorsConstructorDescriptionTdbProcedure
(TdbSession session) Constructor, creates a blank instance.TdbProcedure
(TdbSession session, TdbControlObject ob) Constructor, creates a container for the referenced stored procedure. -
Method Summary
Modifier and TypeMethodDescriptioncontent()
Retrieve the collection of lines that comprise the procedurevoid
copy
(String newowner, String newname, TdbControlObject newobject) Copy the current procedure to a new owner, or to a new name under the same owner.void
Create a new procedure.void
delete()
Delete the current stored procedure from the server.void
Delete a stored procedure from the server.void
Export the content of the current stored procedure to a named file.void
Export the content of the stored procedure to a named file.void
get()
Retrieve the content of the current stored procedure from the server.void
Retrieve the content of a stored procedure from the server.Retrieve any comment associated with the proceduregetName()
Retrieve the name of the procedureRetrieve the name of the user or group with which this procedure is associatedvoid
importProcedure
(String filename, String owner, String name) Import a new procedure from a file.void
importUpdate
(String filename) Update the current procedure with a definition stored in a file.void
importUpdate
(String filename, String owner, String name) Update a procedure with a definition stored in file.iterator()
Retrieve an iterator over the collection of lines that comprise the procedurevoid
put()
Save the current procedure to the server.void
Rename the procedure maintaining the current owner.void
saveSearch
(int searchSetNumber, String owner, String name, String comment) Save the CCL commands for a search set as a procedure.void
setComment
(String comment) Establish a comment to associate with the procedurevoid
setContent
(Collection<String> lines) Set the collection of lines that comprise the procedureMethods inherited from class com.tietoenator.trip.jxp.session.TdbSerializableObject
getControlObject
Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TdbProcedure
Constructor, creates a container for the referenced stored procedure.- Parameters:
session
- Active sessionob
- Control object referencing the procedure desired- Throws:
TdbException
-
TdbProcedure
Constructor, creates a blank instance.- Parameters:
session
- Active session- Throws:
TdbException
-
-
Method Details
-
getOwnerName
Retrieve the name of the user or group with which this procedure is associated- Returns:
- Owner name
-
getName
Retrieve the name of the procedure- Returns:
- The procedure name
-
getComment
Retrieve any comment associated with the procedure- Returns:
- Comment, if any
-
setComment
Establish a comment to associate with the procedure- Parameters:
comment
- The comment, if any
-
content
Retrieve the collection of lines that comprise the procedure- Returns:
- The procedure's content
-
iterator
Retrieve an iterator over the collection of lines that comprise the procedure -
setContent
Set the collection of lines that comprise the procedure- Parameters:
lines
- The procedure's new content
-
get
Retrieve the content of a stored procedure from the server.This method causes network I/O.
- Parameters:
owner
- The owning entity of the stored procedure to be retrieved, null for the calling user.name
- The name of the stored procedure to be retrieved.- Throws:
TdbException
-
get
Retrieve the content of the current stored procedure from the server.This method causes network I/O.
- Throws:
TdbException
-
export
Export the content of the stored procedure to a named file.This method causes network I/O.
- Parameters:
filename
- The name of the file to which the procedure definition should be writtenowner
- The name of the owner of the procedure (group/user), null for the calling username
- The name of the procedure to be exported- Throws:
TdbException
-
export
Export the content of the current stored procedure to a named file.This method causes network I/O.
- Parameters:
filename
- The name of the file to which the procedure definition should be written- Throws:
TdbException
-
copy
Copy the current procedure to a new owner, or to a new name under the same owner.This method causes network I/O.
- Parameters:
newowner
- The name of the entity that will own the newly created procedure, set null for the calling user.newname
- The name of the newly created procedure.newobject
- If not null, this will hold the Control information for the newly created procedure on return.- Throws:
TdbException
-
delete
Delete a stored procedure from the server.This method causes network I/O.
- Parameters:
owner
- The owning entity of the stored procedure to be deleted, set null for the calling user.name
- The name of the stored procedure to be deleted.- Throws:
TdbException
-
delete
Delete the current stored procedure from the server.This method causes network I/O.
- Throws:
TdbException
-
create
Create a new procedure.This method causes network I/O.
- Parameters:
owner
- The owning entity of the stored procedure to be created, set as null for the calling user.name
- The name of the stored procedure to be created.comment
- An optional comment for the new procedure- Throws:
TdbException
-
put
Save the current procedure to the server.This method causes network I/O.
- Throws:
TdbException
-
importProcedure
Import a new procedure from a file.This method causes network I/O.
- Parameters:
filename
- The name of the file containing the procedure definitionowner
- The owner of the new procedure (either a user or a group name), null for the calling user.name
- The name of the new procedure- Throws:
TdbException
-
importUpdate
Update a procedure with a definition stored in file.This method causes network I/O.
- Parameters:
filename
- The name of the file containing the updated procedure definitionowner
- The owner of the procedure to be updated (either a user or a group name), null for the calling user.name
- The name of the procedure to be updated- Throws:
TdbException
-
importUpdate
Update the current procedure with a definition stored in a file.This method causes network I/O.
- Parameters:
filename
- File to read updated definition from- Throws:
TdbException
-
rename
Rename the procedure maintaining the current owner.This method causes network I/O.
- Parameters:
newname
- The new name of the procedure.- Throws:
TdbException
-
saveSearch
public void saveSearch(int searchSetNumber, String owner, String name, String comment) throws TdbException Save the CCL commands for a search set as a procedure.IMPORTANT: This procedure must be executed using the FIND SAVE command.
The CCL command that generated the search set is saved in the procedure, as is all the CCL commands upon which it depends, such as BASE and other search sets that are referred to using the S=<num> expression. All search set references in the procedure are renumbered automatically.
This method causes network I/O.- Parameters:
searchSetNumber
- The number of an existing search setowner
- The owner of the new procedure (user or group name), or null for the calling username
- The name of the new procedurecomment
- A brief comment describing the procedure, or null for no comment- Throws:
TdbException
-