Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (C) 2009 eXo Platform SAS.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
   * the License, or (at your option) any later version.
   *
   * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.exoplatform.services.jcr.ext.backup.server.bean.response;
 
 
Created by The eXo Platform SAS.
Date: 13.04.2009

Author(s):
Alex Reshetnyak
Version:
$Id: ShortInfo.java 111 2008-11-11 11:11:11Z rainf0x $
 
 public class ShortInfo
 {

   
The type for current backup.
 
    public static final int CURRENT = -1;

   
The type for completed backup.
 
    public static final int COMPLETED = 0;

   
The type for current restore.
 
    public static final int RESTORE = 1;

   
The type of ShortInfo (current, completed, restore).
 
    private Integer type;

   
The backup identifier.
 
    private String backupId;

   
The backup type (full or full+incremental).
 
    private Integer backupType;

   
The repository name.
 
    private String repositoryName;

   
The workspace name.
 
    private String workspaceName;

   
The state of backup or restore.
 
    private Integer state;

   
The started time of backup or restore. The date in format RFC 1123.
 
    private String startedTime;

   
The finished time of backup or restore. The date in format RFC 1123.
 
    private String finishedTime;

   
ShortInfo. Empty constructor.
   public ShortInfo()
   {
   }

   
ShortInfo constructor.

Parameters:
type int, the tupe of short info
chain BackupChain, the backup chain for current backup.
   public ShortInfo(int typeBackupChain chain)
   {
      this. = type;
      this. = chain.getBackupConfig().getBackupType();
      this. = chain.getBackupId();
      this. = chain.getBackupConfig().getRepository();
      this. = chain.getBackupConfig().getWorkspace();
      this. = chain.getFullBackupState();
      this. = df.format(chain.getStartedTime().getTime());
      // no applicable
      this. = "";
   }

   
ShortInfo constructor.

Parameters:
type int, the tupe of short info
chain RepositoryBackupChain, the backup chain for current backup.
   public ShortInfo(int typeRepositoryBackupChain chain)
   {
      this. = type;
      this. = chain.getBackupConfig().getBackupType();
      this. = chain.getBackupId();
      this. = chain.getBackupConfig().getRepository();
      this. = chain.getState();
      this. = df.format(chain.getStartedTime().getTime());
      // no applicable
      this. = "";
      this. = "";
   }

   
ShortInfo constructor.

Parameters:
type int, the tupe of short info
chainLog BackupChainLog, the backup chain log for completed backup.
   public ShortInfo(int typeBackupChainLog chainLog)
   {
      this. = type;
      this. = chainLog.getBackupConfig().getBackupType();
      this. = chainLog.getBackupId();
      this. = chainLog.getBackupConfig().getRepository();
      this. = chainLog.getBackupConfig().getWorkspace();
      // do not use
      this. = 0;
      this. = df.format(chainLog.getStartedTime().getTime());
      this. = df.format(chainLog.getFinishedTime().getTime());;
   }

   
ShortInfo constructor.

Parameters:
type int, the tupe of short info
chainLog BackupChainLog, the backup chain log for completed backup.
   public ShortInfo(int typeRepositoryBackupChainLog chainLog)
   {
      this. = type;
      this. = chainLog.getBackupConfig().getBackupType();
      this. = chainLog.getBackupId();
      this. = chainLog.getBackupConfig().getRepository();
      this. = "";
      // do not use
      this. = 0;
      this. = df.format(chainLog.getStartedTime().getTime());
      this. = df.format(chainLog.getFinishedTime().getTime());;
   }

   
ShortInfo constructor. For restore.

Parameters:
type int, the tupe of short info
chainLog BackupChainLog, the backup chain log for completed backup.
startedTime Calendar, the stated time
finishedTime Calendar, the finished time
state int, the state of restore
   public ShortInfo(int typeBackupChainLog chainLogCalendar startedTimeCalendar finishedTimeint state)
   {
      this. = type;
      this. = chainLog.getBackupConfig().getBackupType();
      this. = chainLog.getBackupId();
      this. = chainLog.getBackupConfig().getRepository();
      this. = chainLog.getBackupConfig().getWorkspace();
      this. = state;
      this. = df.format(startedTime.getTime());
      if (finishedTime != null)
         this. = df.format(finishedTime.getTime());
      else
         this. = "";
   }

   
ShortInfo constructor. For restore.

Parameters:
type int, the type of short info
chainLog RepositoryBackupChainLog, the backup chain log for completed backup.
startedTime Calendar, the stated time
finishedTime Calendar, the finished time
state int, the state of restore
   public ShortInfo(int typeRepositoryBackupChainLog chainLogCalendar startedTimeCalendar finishedTimeint state)
   {
      this. = type;
      this. = chainLog.getBackupConfig().getBackupType();
      this. = chainLog.getBackupId();
      this. = chainLog.getBackupConfig().getRepository();
      this. = state;
      this. = df.format(startedTime.getTime());
      if (finishedTime != null)
         this. = df.format(finishedTime.getTime());
      else
         this. = "";
   }

   
ShortInfo constructor. For restore.

Parameters:
type int, the tupe of short info
chainLog BackupChainLog, the backup chain log for completed backup.
startedTime Calendar, the stated time
finishedTime Calendar, the finished time
state int, the state of restore
repositroryName String, the repository name
workspaceName String, the workspace name
   public ShortInfo(int typeBackupChainLog chainLogCalendar startedTimeCalendar finishedTimeint state,
      String repositroryNameString workspaceName)
   {
      this(typechainLogstartedTimefinishedTimestate);
      this. = repositroryName;
      this. = workspaceName;
   }

   
ShortInfo constructor. For restore.

Parameters:
type int, the tupe of short info
chainLog BackupChainLog, the backup chain log for completed backup.
startedTime Calendar, the stated time
finishedTime Calendar, the finished time
state int, the state of restore
repositroryName String, the repository name
   public ShortInfo(int typeRepositoryBackupChainLog chainLogCalendar startedTimeCalendar finishedTime,
      int stateString repositroryName)
   {
      this(typechainLogstartedTimefinishedTimestate);
      this. = repositroryName;
      // no applicable
      this. = "";
   }

   
getState.

Returns:
Integer the state of backup or restore
   public Integer getState()
   {
      return ;
   }

   
setState.

Parameters:
state Integer, the state of backup or restore
   public void setState(Integer state)
   {
      this. = state;
   }

   
getBackupId.

Returns:
String return the backup identifier
   public String getBackupId()
   {
      return ;
   }

   
setBackupId.

Parameters:
backupId the backup identifier
   public void setBackupId(String backupId)
   {
      this. = backupId;
   }

   
getRepositoryName.

Returns:
String return the repository name
   public String getRepositoryName()
   {
      return ;
   }

   
setRepositoryName.

Parameters:
repositoryName String, repository name
   public void setRepositoryName(String repositoryName)
   {
      this. = repositoryName;
   }

   
getWorkspaceName.

Returns:
String return the workspace name
   public String getWorkspaceName()
   {
      return ;
   }

   
setWorkspaceName.

Parameters:
workspaceName String, the workspace name
   public void setWorkspaceName(String workspaceName)
   {
      this. = workspaceName;
   }

   
getStartedTime.

Returns:
String return the started time of backup or restore
   public String getStartedTime()
   {
      return ;
   }

   
setStartedTime.

Parameters:
startedTime String, the started time of backup or restore
   public void setStartedTime(String startedTime)
   {
      this. = startedTime;
   }

   
getFinishedTime.

Returns:
String return the finished time of backup or restore
   public String getFinishedTime()
   {
      return ;
   }

   
setFinishedTime.

Parameters:
finishedTime String, the finished time of backup or restore
   public void setFinishedTime(String finishedTime)
   {
      this. = finishedTime;
   }

   
getType.

Returns:
Integer return the type of ShortInfo
   public Integer getType()
   {
      return ;
   }

   
setType.

Parameters:
type Integer, the type of ShortInfo
   public void setType(Integer type)
   {
      this. = type;
   }

   
getBackupType.

Returns:
Integer return the backup type
   public Integer getBackupType()
   {
      return ;
   }

   
setBackupType.

Parameters:
backupType Integer, the backup type
   public void setBackupType(Integer backupType)
   {
      this. = backupType;
   }
New to GrepCode? Check out our FAQ X