*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
REPORT ZSAPLINK_INSTALLER.
CLASS ZCX_SAPLINK DEFINITION
INHERITING FROM CX_STATIC_CHECK
CREATE PUBLIC
.
public section.
constants ERROR_MESSAGE type SOTR_CONC value '005056C000081ED696E10D9EF345B892'. "#EC NOTEXT
constants EXISTING type SOTR_CONC value '005056C000081ED696E10D9EF345D892'. "#EC NOTEXT
constants INCORRECT_FILE_FORMAT type SOTR_CONC value '005056C000081ED696E10D9EF345F892'. "#EC NOTEXT
constants LOCKED type SOTR_CONC value '005056C000081ED696E10D9EF3461892'. "#EC NOTEXT
data MSG type STRING value '44F7518323DB08BC02000000A7E42BB6'. "#EC NOTEXT
constants NOT_AUTHORIZED type SOTR_CONC value '005056C000081ED696E10D9EF3463892'. "#EC NOTEXT
constants NOT_FOUND type SOTR_CONC value '005056C000081ED696E10D9EF3465892'. "#EC NOTEXT
constants NO_PLUGIN type SOTR_CONC value '005056C000081ED696E10D9EF3467892'. "#EC NOTEXT
constants SYSTEM_ERROR type SOTR_CONC value '005056C000081ED696E10D9EF3469892'. "#EC NOTEXT
constants ZCX_SAPLINK type SOTR_CONC value '005056C000081ED696E10D9EF346B892'. "#EC NOTEXT
data OBJECT type STRING .
methods CONSTRUCTOR
importing
!TEXTID like TEXTID optional
!PREVIOUS like PREVIOUS optional
!MSG type STRING default '44F7518323DB08BC02000000A7E42BB6'
!OBJECT type STRING optional .
protected section.
private section.
ENDCLASS.
CLASS ZSAPLINK DEFINITION
CREATE PUBLIC
ABSTRACT
.
public section.
types:
BEGIN OF gts_version_info,
* Change this if import or export is incompatible to older major versions or if enhancements are so important to force the new version of the plugin
* Please comment changes in major version in class documentation
zsaplink_plugin_major_version TYPE i,
* Change this if bugfixes are being done but the basic structure and im- and exportbehaviour don't change. Reset to 0 when incrementing major version
* Please comment changes in minor version in class documentation
zsaplink_plugin_minor_version TYPE i,
* Change this if cosmetic changes are being done or if internal handling changed but no change to import- or exportbehaviour
* ( i.e. speeding up the plugin will fall into this ). Reset to 0 when incrementeing major or minor version
zsaplink_plugin_build_version TYPE i,
*
zsaplink_plugin_info1 TYPE string, " Plugin info - part 1 - See demoimplementation how this may be used
zsaplink_plugin_info2 TYPE string, " Plugin info - part 2
zsaplink_plugin_info3 TYPE string, " Plugin info - part 3
zsaplink_plugin_info4 TYPE string, " Plugin info - part 4
zsaplink_plugin_info5 TYPE string, " Plugin info - part 5
END OF gts_version_info .
data NUGGET_LEVEL type INT4 read-only value 0. "#EC NOTEXT
class-methods GETOBJECTINFOFROMIXMLDOC
importing
!IXMLDOCUMENT type ref to IF_IXML_DOCUMENT
exporting
!OBJTYPENAME type STRING
!OBJNAME type STRING
raising
ZCX_SAPLINK .
class-methods CONVERTSTRINGTOIXMLDOC
importing
value(XMLSTRING) type STRING
returning
value(IXMLDOCUMENT) type ref to IF_IXML_DOCUMENT .
class-methods CONVERTIXMLDOCTOSTRING
importing
!IXMLDOCUMENT type ref to IF_IXML_DOCUMENT
returning
value(XMLSTRING) type STRING .
class-methods GET_VERSION_INFO_STATIC
importing
!IV_CLASSNAME type CLIKE
returning
value(RS_VERSION_INFO) type GTS_VERSION_INFO .
methods CREATEOBJECTFROMIXMLDOC
abstract
importing
!IXMLDOCUMENT type ref to IF_IXML_DOCUMENT
!DEVCLASS type DEVCLASS default '$TMP'
!OVERWRITE type FLAG optional
returning
value(NAME) type STRING
raising
ZCX_SAPLINK .
methods CREATEIXMLDOCFROMOBJECT
abstract
returning
value(IXMLDOCUMENT) type ref to IF_IXML_DOCUMENT
raising
ZCX_SAPLINK .
methods CREATESTRINGFROMOBJECT
returning
value(STRING) type STRING
raising
ZCX_SAPLINK .
methods CONSTRUCTOR
importing
!NAME type STRING .
methods UPLOADXML
final
importing
!XMLDATA type STRING .
class-methods GETPLUGINS
changing
value(OBJECTTABLE) type TABLE .
methods CHECKEXISTS
abstract
returning
value(EXISTS) type FLAG .
methods VALUEHELP
importing
!I_OBJTYPE type STRING
returning
value(E_OBJNAME) type STRING .
class-methods CHECKOBJECT
importing
!I_IXMLDOCUMENT type ref to IF_IXML_DOCUMENT
exporting
!E_OBJTYPE type STRING
!E_OBJNAME type STRING
!E_PLUGINEXISTS type FLAG
!E_OBJECTEXISTS type FLAG
!E_TARGETOBJECT type ref to ZSAPLINK .
methods GET_VERSION_INFO
returning
value(RS_VERSION_INFO) type GTS_VERSION_INFO .
protected section.
data OBJNAME type STRING .
data IXML type ref to IF_IXML .
data XMLDOC type ref to IF_IXML_DOCUMENT .
methods DELETEOBJECT
abstract
raising
ZCX_SAPLINK .
class-methods SETATTRIBUTESFROMSTRUCTURE
importing
!NODE type ref to IF_IXML_ELEMENT
!STRUCTURE type DATA .
class-methods GETSTRUCTUREFROMATTRIBUTES
importing
!NODE type ref to IF_IXML_ELEMENT
!PRESERVEVERSION type FLAG optional
changing
!STRUCTURE type DATA .
methods CREATEXMLSTRING
final
returning
value(XML) type STRING .
class-methods BUILDTABLEFROMSTRING
importing
!SOURCE type STRING
returning
value(SOURCETABLE) type TABLE_OF_STRINGS .
class-methods BUILDSOURCESTRING
importing
!SOURCETABLE type RSWSOURCET optional
!PAGETABLE type O2PAGELINE_TABLE optional
returning
value(SOURCESTRING) type STRING .
methods GETOBJECTTYPE
abstract
returning
value(OBJECTTYPE) type STRING .
methods CREATEOTRFROMNODE
importing
value(NODE) type ref to IF_IXML_ELEMENT
!DEVCLASS type DEVCLASS default '$TMP'
exporting
!CONCEPT type SOTR_TEXT-CONCEPT
raising
ZCX_SAPLINK .
methods CREATENODEFROMOTR
importing
!OTRGUID type SOTR_CONC
returning
value(NODE) type ref to IF_IXML_ELEMENT .
private section.
types:
BEGIN OF t_objecttable,
classname TYPE string,
object TYPE ko100-object,
text TYPE ko100-text,
END OF t_objecttable .
data STREAMFACTORY type ref to IF_IXML_STREAM_FACTORY .
data XMLDATA type STRING .
data:
objecttable TYPE TABLE OF t_objecttable .
ENDCLASS.
CLA