FSAccountFedInfo.java revision f948ca04a28ccfeed9633bf4b0fb0d2c59c37478
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: FSAccountFedInfo.java,v 1.4 2008/06/25 05:46:39 qcheng Exp $
* Portions Copyrighted 2014 ForgeRock AS
*/
/**
* This class handles the information of federated user account.
* @supported.api
* @deprecated since 12.0.0
*/
public class FSAccountFedInfo {
/**
* It will always be a remote provider's ID.
*/
/**
* Contains NameIdentifier sent to other side in federation process.
*/
/**
* Contains NameIdentifier received from other side in federation process.
*/
/**
*/
private boolean isActive = true;
/**
* Represents the federation type
*/
private boolean isAffiliationFed = false;
/*
* Represents that in a specific federation remote deployement
* participated as SP or IDP.
*/
private boolean isRoleIDP = true;
/**
* Default Constructor.
*/
FSAccountFedInfo() {
}
/**
* Constructor.
* in federation process.
* @param nameIdentifierType indicates if IdentifierType is of type
* LOCAL or REMOTE
* @param isRoleIDP Represents that in a specific federation remote
* deployement participated as SP or IDP.
* @throws FSAccountMgmtException if illegal argument passed.
*/
public FSAccountFedInfo(
int nameIdentifierType,
boolean isRoleIDP)
throws FSAccountMgmtException
{
null,
null,
} else {
" Argument : Invalid Name Identifier Type");
throw new FSAccountMgmtException(
}
}
/**
* Constructor.
* @param localNameIdentifier Contains NameIdentifier sent to other side
* in federation process.
* @param remoteNameIdentifier Contains NameIdentifier received from
* other side in federation process.
* @param isRoleIDP Represents that in a specific federation remote
* deployement participated as SP or IDP.
* @throws FSAccountMgmtException if illegal argument passed.
*/
public FSAccountFedInfo(
boolean isRoleIDP)
throws FSAccountMgmtException
{
}
/**
* Initializes the account federation information object.
* Always Remote provider.
* @param localNameIdentifier Contains NameIdentifier sent to other side
* in federation process.
* @param remoteNameIdentifier Contains NameIdentifier received from
* other side in federation process.
* @param isRoleIDP Represents that in a specific federation remote
* deployement participated as SP or IDP.
* @throws FSAccountMgmtException if illegal argument passed.
*/
private void init(
boolean isRoleIDP)
throws FSAccountMgmtException
{
"FSAccountFedInfo.init(): Invalid Argument: providerID is " +
throw new
}
"Argument: both NameIdentifiers are null");
throw new FSAccountMgmtException(
}
this.providerID = providerID;
this.isActive = true;
"providerID :: " + this.providerID +
", isRoleIDP :: " + this.isRoleIDP);
if (localNameIdentifier != null ) {
"FSAccountFedInfo.init() : localNameIdentifier" +
this.localNameIdentifier.toString());
}
if (remoteNameIdentifier != null ) {
"FSAccountFedInfo.init() : remoteNameIdentifier" +
this.remoteNameIdentifier.toString());
}
}
}
/**
* @return remote provider's id
* @supported.api
*/
public String getProviderID() {
return this.providerID;
}
/**
* Sets provider's ID.
* @param providerID - remote provider's id
*/
this.providerID = providerID;
}
/**
* Sets value in local field.
* @param localNameIdentifier Contains NameIdentifier sent to other
* side in federation process.
*/
public void setLocalNameIdentifier(
{
}
/**
* @return local NameIdentifier sent to other side
* @supported.api
*/
public NameIdentifier getLocalNameIdentifier() {
return this.localNameIdentifier;
}
/**
* Sets value in local field.
* @param remoteNameIdentifier Contains NameIdentifier received from
* other side in federation process.
*/
public void setRemoteNameIdentifier(
{
}
/**
* @return remote NameIdentifier received from other side
* @supported.api
*/
public NameIdentifier getRemoteNameIdentifier() {
return this.remoteNameIdentifier;
}
/**
* Sets Federation Status as active.
*/
public void activateFedStatus() {
this.isActive = true;
}
/**
* Sets Federation Status as Inactive.
*/
public void deActivateFedStatus() {
this.isActive = false;
}
/**
*/
public boolean isFedStatusActive() {
return this.isActive;
}
/**
* Represents that in a specific federation remote
* deployement participated as SP or IDP.
* @return true if in a specific federation remote
* deployement participated as IDP.
* And returns false if as SP.
* @supported.api
*/
public boolean isRoleIDP() {
return this.isRoleIDP;
}
/**
* Represents that in a specific federation remote
* deployement participated as SP or IDP.
* @param isRoleIDP Represents that in a specific federation remote
* deployement participated as SP or IDP.
*/
}
/**
* Sets the affiliation flag.
* @param isAffiliationFed true if the federation is affiliation type.
*/
public void setAffiliation(boolean isAffiliationFed) {
this.isAffiliationFed = isAffiliationFed;
}
/**
* Gets the affiliation federation type.
* @return true if the federation is of affiliation type.
* @supported.api
*/
public boolean getAffiliation() {
return isAffiliationFed;
}
}