Initial commit

This commit is contained in:
Isaac Parenteau committed 2018-07-07 20:43:51 -05:00
commit 880e39de2e
511 files changed
+38363

No files matched your search

+144
View File
@@ -0,0 +1,144 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FILE : macros.tex
% SUBJECT : File to hold the macros defined in the portal project.
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%------------
% New Commands
% ------------
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
% Add commands in alphabetical order.
\newcommand{\command}[1]{\texttt{#1}} % For formatting commands.
\newcommand{\filename}[1]{\texttt{#1}} % For formatting file names.
\newcommand{\newterm}[1]{\textit{#1}} % For formatting terms when they are first introduced.
\newcommand{\bold}[1]{\textbf{#1}} % For bold font
\newcommand{\italic}[1]{\textit{#1}} % For italic font
\newcommand{\nn}[0]{\newline\newline} % for double space
\newcommand{\portal}{Portal\xspace} % For formatting ``Portal.''
\newcommand{\Client}{\portal Client\xspace}
\newcommand{\Server}{\portal Server\xspace}
\newcommand{\Blue}[1]{\textcolor{blue}{#1}}
\newcommand{\Gray}[1]{\textcolor{gray}{#1}}
\newcommand{\Red}[1]{\textcolor{red}{#1}}
\newcommand{\Required}[2]{
\makebox[3.3cm][l]{\texttt{\bold{\Red{#1}}}}: \begin{minipage}[t]{7cm}#2\end{minipage}
}
\newcommand{\Optional}[2]{
\makebox[3.35cm][l]{\texttt{\bold{\Gray{#1}}}}: \begin{minipage}[t]{7cm}#2\end{minipage}
}
\newcommand{\ApiData}[2] {
\begin{tabular}{| C{0.5\textwidth} | C{0.5\textwidth} |} \hline
\bold{Sample Request} & \bold{Sample Response} \\ \hline
#1 & #2 \\ \hline
\end{tabular}
}
\newcommand{\ngasCommonsVersion}{1.0.0-RELEASE\xspace}
\newcommand{\EclipseVersion}{Oxygen.2 Release (4.7.2)\xspace}
\newcommand{\JavaVersion}{1.8.0\xspace}
\newcommand{\MavenVersion}{3.5.3\xspace}
\newcommand{\AntVersion}{1.9.10\xspace}
\newcommand{\AngularJsVersion}{1.6.9\xspace}
\newcommand{\SpringVersion}{5.0.5-RELEASE\xspace}
\newcommand{\NodeVersion}{v.8.9.4\xspace}
\newcommand{\YarnVersion}{1.3.2\xspace}
\newcommand{\HibernateVersion}{5.2.16.Final\xspace}
\newcommand{\FlywayVersion}{5.0.7\xspace}
\newcommand{\MySQLVersion}{5.7\xspace}
\newcommand{\TomcatVersion}{8.5.24\xspace}
\newcommand{\QuartzVerson}{2.3.0\xspace}
\newcommand{\JSchVersion}{0.1.54\xspace}
\newcommand{\JGitVersion}{4.11.0.201803080745-r\xspace}
\newcommand{\NetBeansVersion}{8.2\xspace}
\let\Oldsection\section
\renewcommand{\section}{\FloatBarrier\Oldsection}
\let\Oldsubsection\subsection
\renewcommand{\subsection}{\FloatBarrier\Oldsubsection}
\let\Oldsubsubsection\subsubsection
\renewcommand{\subsubsection}{\FloatBarrier\Oldsubsubsection}
% An environment for displaying api methods.
% This environment takes four parameters:
% \param #1: The name of the api method.
% \param #2: The endpoint url.
% \param #3: if its a post or get operations.
% \param #4: if the method requires authentication.
%
% The body of the environment is the required parameters.
\newsavebox{\ApiName} % Create some boxes to hold the necessary text.
\newsavebox{\ApiUrl} % We need to do this because we can't use the
\newsavebox{\ApiMethod} % environment parameters in the 'end' definition.
\newsavebox{\ApiAuthReq}
\newsavebox{\ApiRequired}
\newenvironment{apimethod}[4]
{
\sbox{\ApiName}{\bfseries #1} % The name is easy.
\sbox{\ApiUrl}{\vspace{2mm}#2\vspace{2mm}}
\sbox{\ApiMethod}{\vspace{2mm}#3\vspace{2mm}} % The actor is easy.
\sbox{\ApiAuthReq}{\vspace{2mm}#4\vspace{2mm}}
\begin{lrbox}{\ApiRequired} % The environment body becomes the action.
\begin{minipage}{1\textwidth}\vspace{2mm}
}{
\vspace{2mm}
\end{minipage}
\end{lrbox}
% Now spew forth the table using the information collected above.
\begin{tabular}{|p{0.25\textwidth}||p{0.745\textwidth}|} \hline
\multicolumn{2}{|c|}{\usebox{\ApiName}} \\ \hline
Endpoint URL & \usebox{\ApiUrl} \\ \hline
Method & \usebox{\ApiMethod} \\ \hline
Requires Authentication & \usebox{\ApiAuthReq} \\ \hline
Parameters & \usebox{\ApiRequired} \\ \hline
\end{tabular}
}
% An environment for displaying use cases.
% This environment takes three parameters:
% \param #1: The name of the use case.
% \param #2: The actor who participates in the use case.
% \param #3: The context in which the use case executes.
%
% The body of the environment is the action associated with the use case.
\newsavebox{\UseCaseName} % Create some boxes to hold the necessary text.
\newsavebox{\UseCaseActor} % We need to do this because we can't use the
\newsavebox{\UseCaseContext} % environment parameters in the 'end' definition.
\newsavebox{\UseCaseAction}
\newenvironment{usecase}[3]
{
\sbox{\UseCaseName}{\bfseries #1} % The name is easy.
\sbox{\UseCaseActor}{\vspace{2mm}#2\vspace{2mm}}
\begin{lrbox}{\UseCaseContext} % Format the context in a minipage.
\begin{minipage}{0.825\textwidth}
#3
\end{minipage}
\end{lrbox}
\begin{lrbox}{\UseCaseAction} % The environment body becomes the action.
\begin{minipage}{0.825\textwidth}\vspace{2mm}
}{
\vspace{2mm}
\end{minipage}
\end{lrbox}
% Now spew forth the table using the information collected above.
\begin{tabular}{|R{0.1\textwidth}||L{0.85\textwidth}|} \hline
\multicolumn{2}{|c|}{\usebox{\UseCaseName}} \\ \hline
Actor & \usebox{\UseCaseActor} \\ \hline
Context & \usebox{\UseCaseContext} \\ \hline
Action & \usebox{\UseCaseAction} \\ \hline
\end{tabular}
}